diff options
author | Tomer Kimia <tkimia@purdue.edu> | 2014-03-01 22:53:08 -0500 |
---|---|---|
committer | Tomer Kimia <tkimia@purdue.edu> | 2014-03-01 22:53:08 -0500 |
commit | c1f3f731cdf3201905fd8797dd4fe33783f2bc53 (patch) | |
tree | cc4f81f56711799c717cd7343d6b732f93f116b3 | |
parent | 9d64e8898f767b42ce231b34abe4333007d7d0df (diff) |
quick and dirty css
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 38 | ||||
-rw-r--r-- | app/assets/stylesheets/scaffolds.css.scss | 78 | ||||
-rw-r--r-- | app/views/games/index.html.erb | 35 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 14 | ||||
-rw-r--r-- | app/views/tournaments/index.html.erb | 27 | ||||
-rw-r--r-- | config/routes.rb | 2 |
7 files changed, 190 insertions, 6 deletions
@@ -3,7 +3,6 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.2' -gem 'bootstrap-sass' # bcrypt is used for password digesting gem 'bcrypt-ruby', '3.1.2' @@ -23,6 +22,7 @@ end # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0' +gem 'bootstrap-sass' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index 75d27b8..b47c41e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,9 +27,18 @@ GEM tzinfo (~> 0.3.37) arel (4.0.2) atomic (1.1.14) + bcrypt-ruby (3.1.2) bootstrap-sass (3.1.1.0) sass (~> 3.2) builder (3.1.4) + capybara (2.1.0) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + childprocess (0.5.1) + ffi (~> 1.0, >= 1.0.11) coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) @@ -37,8 +46,10 @@ GEM coffee-script-source execjs coffee-script-source (1.7.0) + diff-lcs (1.2.5) erubis (2.7.0) execjs (2.0.2) + ffi (1.9.3) hike (1.2.3) i18n (0.6.9) jbuilder (1.5.3) @@ -53,8 +64,11 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) + mini_portile (0.5.2) minitest (4.7.5) multi_json (1.8.4) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) polyglot (0.3.4) rack (1.5.2) rack-test (0.6.2) @@ -76,6 +90,18 @@ GEM rdoc (4.1.1) json (~> 1.4) ref (1.0.5) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + rspec-rails (2.13.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rubyzip (0.9.9) sass (3.2.14) sass-rails (4.0.1) railties (>= 4.0.0, < 5.0) @@ -84,6 +110,11 @@ GEM sdoc (0.4.0) json (~> 1.8) rdoc (~> 4.0, < 5.0) + selenium-webdriver (2.35.1) + childprocess (>= 0.2.5) + multi_json (~> 1.0) + rubyzip (< 1.0.0) + websocket (~> 1.0.4) sprockets (2.10.1) hike (~> 1.2) multi_json (~> 1.0) @@ -110,18 +141,25 @@ GEM uglifier (2.4.0) execjs (>= 0.3.0) json (>= 1.8.0) + websocket (1.0.7) + xpath (2.0.0) + nokogiri (~> 1.3) PLATFORMS ruby DEPENDENCIES + bcrypt-ruby (= 3.1.2) bootstrap-sass + capybara (= 2.1.0) coffee-rails (~> 4.0.0) jbuilder (~> 1.2) jquery-rails rails (= 4.0.2) + rspec-rails (= 2.13.1) sass-rails (~> 4.0.0) sdoc + selenium-webdriver (= 2.35.1) sqlite3 therubyracer turbolinks diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss new file mode 100644 index 0000000..7561529 --- /dev/null +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -0,0 +1,78 @@ +body { + background-color: #909090; + color: #333; + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; + + h1, h2, h3, h4, h5{ + color: #F0F0F0; + } +} + +p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; +} + +a { + color: #000; + &:visited { + color: #666; + } + &:hover { + color: #fff; + background-color: #000; + } +} + +div { + &.field, &.actions { + margin-bottom: 10px; + } +} + +#notice { + color: green; +} + +.field_with_errors { + padding: 2px; + background-color: red; + display: table; +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0px; + background-color: #c00; + color: #fff; + } + ul li { + font-size: 12px; + list-style: square; + } +} + + +#footer{ + text-align: center; +} diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb new file mode 100644 index 0000000..2c178f5 --- /dev/null +++ b/app/views/games/index.html.erb @@ -0,0 +1,35 @@ +<h1>Listing games</h1> + +<table class="table table-hover"> + <thead> + <tr> + <th>Name</th> + <th>Players per team</th> + <th>Teams per match</th> + <th>Set rounds</th> + <th>Randomized teams</th> + <th></th> + <th></th> + <th></th> + </tr> + </thead> + + <tbody> + <% @games.each do |game| %> + <tr> + <td><%= game.name %></td> + <td><%= game.players_per_team %></td> + <td><%= game.teams_per_match %></td> + <td><%= game.set_rounds %></td> + <td><%= game.randomized_teams %></td> + <td><%= link_to 'Show', game %></td> + <td><%= link_to 'Edit', edit_game_path(game) %></td> + <td><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> +</table> + +<br> + +<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e2b8e02..0deede3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,17 +7,21 @@ <%= csrf_meta_tags %> </head> <body> +<div role="navigation" class="navbar navbar-inverse"> <header> - <h1 id="logo"> Leaguer </h1> - <%= form_tag("/search", method: "get", :id => "search-bar") do %> + <div class="navbar-brand"> Leaguer </div> + <div> + <%= form_tag("/search", method: "get", :class => "navbar-form navbar-right") do %> <%= text_field_tag(:query, nil, :placeholder => "Search") %> - <%= submit_tag("Go") %> + <%= submit_tag("Go", {:class => "btn btn-warning"}) %> <% end %> + </div> </header> - + </div> <%= yield %> -<footer > +<hr> +<footer id="footer"> <p> Tomer Kimia Andrew Murrell Luke Shumaker Nathaniel Foy Davis Webb Guntas Grewal </p> <p> The Leaguer System © <%= Time.now.year %> </p> </footer> diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb new file mode 100644 index 0000000..8ab3c15 --- /dev/null +++ b/app/views/tournaments/index.html.erb @@ -0,0 +1,27 @@ +<h1>Listing tournaments</h1> + +<table class="table table-hover"> + <thead> + <tr> + <th>Game</th> + <th></th> + <th></th> + <th></th> + </tr> + </thead> + + <tbody> + <% @tournaments.each do |tournament| %> + <tr> + <td><%= %></td> + <td><%= link_to 'Show', tournament %></td> + <td><%= link_to 'Edit', edit_tournament_path(tournament) %></td> + <td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> +</table> + +<br> + +<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning" %> diff --git a/config/routes.rb b/config/routes.rb index bc29e15..3c49858 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,8 @@ Leaguer::Application.routes.draw do resources :games + root "tournaments#index" + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". |