Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Add layout and render view for dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Aug 26, 2011
1 parent 416000c commit f602a6b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/gaskit.rb
Expand Up @@ -2,11 +2,15 @@
Bundler.require

module Gaskit
def self.repo
@repo ||= Grit::Repo.new(File.expand_path('../../testrepo', __FILE__))
autoload :App, 'gaskit/app'

def self.root
@root ||= Pathname(File.expand_path('../..', __FILE__))
end

autoload :App, 'gaskit/app'
def self.repo
@repo ||= Grit::Repo.new(root.join('testrepo'))
end
end

require 'gaskit/task'
4 changes: 3 additions & 1 deletion lib/gaskit/app.rb
@@ -1,7 +1,9 @@
module Gaskit
class App < Sinatra::Base
set :root, Gaskit.root

get '/' do
"Hello World"
erb :dashboard
end

post '/tasks' do
Expand Down
Empty file added views/dashboard.erb
Empty file.
28 changes: 28 additions & 0 deletions views/layout.erb
@@ -0,0 +1,28 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Gaskit</title>
<meta name="viewport" content="user-scalable=no; width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="/stylesheets/application.css" type="text/css" media="screen">
</head>
<body>
<header>
<h1><a href="/">Gaskit</a></h1>
</header>
<div id="main">
<%= yield %>
</div>
<footer>
</footer>
</body>
</html>

0 comments on commit f602a6b

Please sign in to comment.