Permalink
Browse files

Cleanup.

  • Loading branch information...
1 parent 0697b57 commit 4353f7e089d10336ec901a61cdea611b103f07b7 @mfine mfine committed Apr 12, 2012
Showing with 28 additions and 29 deletions.
  1. +12 −3 lib/ranked/api.rb
  2. +1 −1 lib/ranked/{event.rb → result.rb}
  3. +0 −2 views/footer.haml
  4. +2 −17 views/layout.haml
  5. +3 −6 views/navbar.haml
  6. +5 −0 views/players.haml
  7. +5 −0 views/results.haml
View
@@ -18,16 +18,25 @@ def data
end
end
- get "/users" do
- authenticate
+ before do
@user = session['user']
- haml :users
end
get "/" do
+ authenticate
haml :index
end
+ get "/players" do
+ authenticate
+ haml :players
+ end
+
+ get "/results" do
+ authenticate
+ haml :results
+ end
+
error do
puts env['sinatra.error']
500
@@ -1,5 +1,5 @@
module Ranked
- class Event < Sequel::Model
+ class Result < Sequel::Model
plugin :optimistic_locking
plugin :timestamps
View
@@ -1,3 +1 @@
.footer
- %p
- &copy; Company 2012
View
@@ -1,26 +1,14 @@
%html
%head
%meta{:charset => "utf-8"}
- %title sinatra-rack-vlad-template
- %meta{:name => "description", :content => ""}
- %meta{:name => "author", :content => ""}
+ %title Ranked
- :plain
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- / Le styles
%link{ :href => "/bootstrap/css/bootstrap.css", :type => "text/css", :rel => "stylesheet" }
- / add body padding styles
%link{ :href => "/css/styles.css", :type => "text/css", :rel => "stylesheet" }
-
%link{ :href => "/bootstrap/css/bootstrap-responsive.css", :type => "text/css", :rel => "stylesheet" }
- / Le fav and touch icons
%link{ rel: "apple-touch-icon", href: "/bootstrap/images/apple-touch-icon.png"}
%link{ rel: "shortcut icon", href: "/bootstrap/images/favicon.ico"}
%link{ rel: "apple-touch-icon", sizes: "72x72", href: "/bootstrap/images/apple-touch-icon-72x72.png"}
@@ -32,11 +20,8 @@
%div= yield
+ %div= haml :footer
-
-
-
- / Placed at the end of the document so the pages load faster
%script{ :type => "text/javascript", :src =>"/bootstrap/js/jquery.js"}
%script{ :type => "text/javascript", :src =>"/bootstrap/js/basic/bootstrap-transition.js"}
%script{ :type => "text/javascript", :src =>"/bootstrap/js/basic/bootstrap-alert.js"}
View
@@ -5,13 +5,10 @@
%span.icon-bar
%span.icon-bar
%span.icon-bar
- %a.brand{:href => '/'} Project name
+ %a.brand{:href => '/'} Ranked
.nav-collapse
%ul.nav
%li
- %a{:href => '/'}Home
+ %a{:href => '/players'}Players
%li
- %a{:href => '/'}About
- %li
- %a{:href => '/'}Contact
-
+ %a{:href => '/results'}Results
View
@@ -0,0 +1,5 @@
+.container
+ %h1
+ Bootstrap starter template
+ %p
+ Use this document as a way to quick start any new project.<br> All you get is this message and a barebones HTML document.
View
@@ -0,0 +1,5 @@
+.container
+ %h1
+ Bootstrap starter template
+ %p
+ Use this document as a way to quick start any new project.<br> All you get is this message and a barebones HTML document.

0 comments on commit 4353f7e

Please sign in to comment.