Skip to content

Commit b0f1571

Browse files
committed
Adding in the basic bootstrap layout
1 parent 6afd641 commit b0f1571

File tree

8 files changed

+51
-318
lines changed

8 files changed

+51
-318
lines changed

app/assets/images/bg_pattern.png

31.4 KB
Loading
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
@import "variables";
22
@import "bootstrap";
3-
@import "errors";
43

54
body {
65
padding-top: 50px;
76
padding-bottom: 70px;
87
background: image_url('bg_pattern.png');
98
}
10-
11-
fieldset {
12-
margin-bottom: 40px;
13-
}
14-
15-
#specific-days {
16-
display: none;
17-
}
18-
19-
img {
20-
max-width: 100%;
21-
}
22-
23-
.initially_hidden, .hidden {
24-
display: none;
25-
}

app/controllers/players_controller.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class PlayersController < ApplicationController
2+
respond_to :html
3+
4+
def index
5+
end
6+
end

app/controllers/scores_controller.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class ScoresController < ApplicationController
2+
respond_to :json
3+
4+
def create
5+
binding.pry
6+
end
7+
end
Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>RubywarriorScoreboard</title>
5-
<%= stylesheet_link_tag "application", :media => "all" %>
6-
<%= javascript_include_tag "application" %>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<title>Ruby Warrior Scoreboard</title>
76
<%= csrf_meta_tags %>
7+
<%= stylesheet_link_tag "application" %>
8+
<%= javascript_include_tag "application" %>
9+
<%= yield :head %>
10+
11+
<!--[if lt IE 9]>
12+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
13+
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
14+
<![endif]-->
815
</head>
916
<body>
17+
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
18+
<div class="container">
19+
<div class="navbar-header">
20+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
21+
<span class="sr-only">Toggle navigation</span>
22+
<span class="icon-bar"></span>
23+
<span class="icon-bar"></span>
24+
<span class="icon-bar"></span>
25+
</button>
26+
<%= link_to 'Home', root_path, class: 'navbar-brand' %>
27+
</div>
28+
</div>
29+
</div>
1030

11-
<%= yield %>
12-
31+
<div class="container">
32+
<% if flash[:notice] %>
33+
<div class="row">
34+
<div class="col-md-12">
35+
<div class="alert alert-info">
36+
<%= flash[:notice] %>
37+
</div>
38+
</div>
39+
</div>
40+
<% end %>
41+
<%= yield %>
42+
</div><!-- /.container -->
1343
</body>
1444
</html>

app/views/players/index.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nothing

config/routes.rb

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,5 @@
11
RubywarriorScoreboard::Application.routes.draw do
2-
# The priority is based upon order of creation:
3-
# first created -> highest priority.
2+
resources :scores, only: [:create]
43

5-
# Sample of regular route:
6-
# match 'products/:id' => 'catalog#view'
7-
# Keep in mind you can assign values other than :controller and :action
8-
9-
# Sample of named route:
10-
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11-
# This route can be invoked with purchase_url(:id => product.id)
12-
13-
# Sample resource route (maps HTTP verbs to controller actions automatically):
14-
# resources :products
15-
16-
# Sample resource route with options:
17-
# resources :products do
18-
# member do
19-
# get 'short'
20-
# post 'toggle'
21-
# end
22-
#
23-
# collection do
24-
# get 'sold'
25-
# end
26-
# end
27-
28-
# Sample resource route with sub-resources:
29-
# resources :products do
30-
# resources :comments, :sales
31-
# resource :seller
32-
# end
33-
34-
# Sample resource route with more complex sub-resources
35-
# resources :products do
36-
# resources :comments
37-
# resources :sales do
38-
# get 'recent', :on => :collection
39-
# end
40-
# end
41-
42-
# Sample resource route within a namespace:
43-
# namespace :admin do
44-
# # Directs /admin/products/* to Admin::ProductsController
45-
# # (app/controllers/admin/products_controller.rb)
46-
# resources :products
47-
# end
48-
49-
# You can have the root of your site routed with "root"
50-
# just remember to delete public/index.html.
51-
# root :to => 'welcome#index'
52-
53-
# See how all your routes lay out with "rake routes"
54-
55-
# This is a legacy wild controller route that's not recommended for RESTful applications.
56-
# Note: This route will make all actions in every controller accessible via GET requests.
57-
# match ':controller(/:action(/:id))(.:format)'
4+
root :to => 'players#index'
585
end

public/index.html

Lines changed: 0 additions & 241 deletions
This file was deleted.

0 commit comments

Comments
 (0)