Permalink
Browse files

Configured assetpack, extracted css,

  • Loading branch information...
1 parent 83218d8 commit eba5e44073dbabbd3d2a9f9ab374d93e70d29dcf @jhwist committed Apr 17, 2012
Showing with 25 additions and 10 deletions.
  1. +4 −0 app/css/main.css
  2. +1 −0 config.ru
  3. +6 −5 loctrack.rb
  4. BIN public/favicon.ico
  5. +2 −5 views/index.erb
  6. +12 −0 views/layout.erb
View
@@ -0,0 +1,4 @@
+html { height: 100% }
+body { height: 100%; margin: 0; padding: 0 }
+#map_canvas { height: 100% }
+
View
@@ -1,5 +1,6 @@
require 'rubygems'
require 'sinatra'
+require 'sinatra/assetpack'
require 'mongoid'
require './loctrack'
run Loctrack
View
@@ -1,5 +1,3 @@
-require 'sinatra/assetpack'
-
class Counter
include Mongoid::Document
@@ -18,13 +16,16 @@ class Loctrack < Sinatra::Base
set :root, File.dirname(__FILE__)
register Sinatra::AssetPack
assets {
+ serve '/js', :from => 'app/js'
+ serve '/css', :from => 'app/css'
+ serve '/images', :from => 'app/images'
+
js :app, '/js/app.js', [
'/js/vendor/**/*.js',
'/js/app/**/*.js'
]
-
- css :application, '/css/application.css', [
- '/css/screen.css'
+ css :app, '/css/app.css', [
+ '/css/main.css'
]
}
end
View
Binary file not shown.
View
@@ -1,5 +1,2 @@
-<html>
- <body>
- <div>Hello, you are visitor Nr. <%= @counter %> </div>
- </body>
-</html>
+<div>Hello, you are visitor Nr. <%= @counter %> </div>
+<div id="map_canvas"></div>
View
@@ -0,0 +1,12 @@
+<html>
+ <head>
+ <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
+ <%= css :app %>
+ <script type="text/javascript"
+ src="http://maps.googleapis.com/maps/api/js?key=AIzaSyD6QY0GW8Sea6j4GnKuzJcHNRhZfoLgUNc&sensor=false">
+ </script>
+ </head>
+ <body>
+ <%= yield %>
+ </body>
+</html>

0 comments on commit eba5e44

Please sign in to comment.