diff --git a/app/assets/stylesheets/components/_comments.scss b/app/assets/stylesheets/components/_comments.scss index bbdc4f7..a9ba2f1 100644 --- a/app/assets/stylesheets/components/_comments.scss +++ b/app/assets/stylesheets/components/_comments.scss @@ -1,25 +1,19 @@ +/* + Thread List +*/ + #comments-thread { @include span-columns(12); h3 { margin: 1em 0; } - - .comment-form { - @include span-columns(12); - margin-bottom: em(20); - - h5 { - margin-top: 0; - margin-bottom: 1em; - } - - .fields { - margin-bottom: em(20); - } - } } +/* + Comment +*/ + .comment { $comment-gutter: 1.4em; $comment-image-padding: .7em; @@ -100,3 +94,22 @@ } } } + +/* + Comment Form +*/ + +.comment-form { + @include span-columns(12); + margin-bottom: em(20); + + h1, + h5 { + margin-top: 0; + margin-bottom: 1em; + } + + .fields { + margin-bottom: em(20); + } +} diff --git a/app/assets/stylesheets/components/_shoutbox.scss b/app/assets/stylesheets/components/_shoutbox.scss index bc6f609..53241e1 100644 --- a/app/assets/stylesheets/components/_shoutbox.scss +++ b/app/assets/stylesheets/components/_shoutbox.scss @@ -6,12 +6,6 @@ margin-bottom: em(5); .timestamp { - font-size: em(14); - border-radius: em(3); - background: $blue; - color: white; - display: inline-block; - font-style: italic; - padding: 0 em(6); + @extend .highlight; } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/layout/_body.scss b/app/assets/stylesheets/layout/_body.scss index 556ef98..c00c71e 100644 --- a/app/assets/stylesheets/layout/_body.scss +++ b/app/assets/stylesheets/layout/_body.scss @@ -56,6 +56,7 @@ body { h1, h2, h3, h4, h5, h6 { &.fancy { + clear: both; text-align: center; position: relative; background-color: white; diff --git a/app/assets/stylesheets/layout/_navigation.scss b/app/assets/stylesheets/layout/_navigation.scss index f7f692d..f6db7c3 100644 --- a/app/assets/stylesheets/layout/_navigation.scss +++ b/app/assets/stylesheets/layout/_navigation.scss @@ -26,7 +26,7 @@ ul.navigation { > li { float: left; - width: ($max-width - em(1))/7; + width: (100%/7); border-right: em(1) solid transparent; .count { diff --git a/app/assets/stylesheets/mixins/_buttons.scss b/app/assets/stylesheets/mixins/_buttons.scss index a377896..cd51c00 100644 --- a/app/assets/stylesheets/mixins/_buttons.scss +++ b/app/assets/stylesheets/mixins/_buttons.scss @@ -24,7 +24,8 @@ } button, -a.button { +a.button, +.button { @include button; &.tiny { diff --git a/app/assets/stylesheets/mixins/_flashes.scss b/app/assets/stylesheets/mixins/_flashes.scss index 201ce22..f57e478 100644 --- a/app/assets/stylesheets/mixins/_flashes.scss +++ b/app/assets/stylesheets/mixins/_flashes.scss @@ -29,3 +29,17 @@ text-align: center; } } + +/* + Text Highlights +*/ + +.highlight { + font-size: em(14); + border-radius: em(3); + background: $blue; + color: white; + display: inline-block; + font-style: italic; + padding: 0 em(6); +} diff --git a/app/assets/stylesheets/pages/_contests.scss b/app/assets/stylesheets/pages/_contests.scss index ad2f39a..25cb5c5 100644 --- a/app/assets/stylesheets/pages/_contests.scss +++ b/app/assets/stylesheets/pages/_contests.scss @@ -71,6 +71,23 @@ table.contest { } } +div.widget.contest { + + a.button { + margin: em(20) 0 0; + text-align: center; + width: 100%; + } +} + +/* + Standings +*/ + +div.standings { + @include span-columns(12); +} + /* Brackets */ diff --git a/app/assets/stylesheets/pages/_forums.scss b/app/assets/stylesheets/pages/_forums.scss index 1ca1108..f7ec776 100644 --- a/app/assets/stylesheets/pages/_forums.scss +++ b/app/assets/stylesheets/pages/_forums.scss @@ -147,6 +147,17 @@ div#categories { @include span-columns(12); padding: em(20) 0; } + + .text { + border-radius: $base-border-radius; + background: $light-gray; + margin-top: em(20); + padding: em(20); + + fieldset { + border-color: $light-blue; + } + } } .header { diff --git a/app/assets/stylesheets/pages/_matches.scss b/app/assets/stylesheets/pages/_matches.scss index e6a2fb5..5fe69e8 100644 --- a/app/assets/stylesheets/pages/_matches.scss +++ b/app/assets/stylesheets/pages/_matches.scss @@ -21,4 +21,209 @@ table#matches { width: 10%; text-align: right; } -} \ No newline at end of file +} + +/* + Match Page +*/ + +div#match { + @include span-columns(12); + border-bottom: em(3) solid $light-gray; + + .contesters, + .details, + .referee, + .predictions, + .report { + @include span-columns(12); + } + + .contesters { + margin-bottom: em(20); + + .vs { + margin: 0 auto; + display: block; + font: 50px $montserrat; + border-radius: 50px; + background: $blue; + width: 100px; + height: 100px; + text-align: center; + line-height: 100px; + color: white; + font-style: italic; + text-transform: uppercase; + padding-right: 10px; + font-weight: bold; + } + + .team-1, + .team-2 { + max-height: 100px; + overflow: hidden; + } + + .team-1 { + @include span-columns(5); + line-height: 100px; + text-align: right; + } + + .team-2 { + @include span-columns(5); + line-height: 100px; + text-align: left; + } + + .versus { + @include span-columns(2); + position: relative; + font-weight: bold; + + &.split:before { + content: ""; + display: block; + position: absolute; + background: white; + width: 1px; + height: 100px; + margin: 0 auto; + left: 50%; + top: 0; + } + + .score-1, + .score-2 { + font: 50px $montserrat; + color: white; + width: 50%; + position: absolute; + top: 0; + text-align: center; + line-height: 100px; + font-weight: bold; + } + + .score-1 { + padding-left: 15px; + left: 0; + } + + .score-2 { + padding-right: 15px; + right: 0; + } + } + } + + .details { + margin-bottom: em(20); + text-align: center; + + .contest, + .date { + text-align: center; + } + + .date { + font-style: italic; + font-weight: normal; + } + + .contest { + margin-bottom: em(10); + } + } + + .lineups { + @include span-columns(12); + margin: em(20) 0 em(40); + + i { + color: $gold; + } + + .team-1 { + @include span-columns(6); + text-align: right; + + .flag { + margin: 0 0 0 em(10); + } + } + + .team-2 { + @include span-columns(6); + @include omega; + } + + &.shift .team-2 { + @include shift(6); + } + } + + .predictions { + text-align: center; + + h4 { + margin-bottom: 1em; + } + + input { + text-align: center; + } + + .add { + @include span-columns(12); + text-align: center; + + input { + float: none; + margin: em(20) 0 0 0; + } + } + + .team-1 { + @include span-columns(6); + text-align: right; + + .highlight { + margin-left: em(10); + } + } + + .team-2 { + @include span-columns(6); + @include omega; + text-align: left; + + .highlight { + margin-right: em(10); + } + } + } + + .report { + margin: em(20) 0; + padding-top: em(20); + border-top: em(3) solid $light-gray; + } +} + +/* + Map Page +*/ + +div#map { + + .preview { + @include span-columns(12); + text-align: center; + + img { + margin: em(20) 0; + } + } +} diff --git a/app/assets/stylesheets/pages/_news.scss b/app/assets/stylesheets/pages/_news.scss index aa272d8..6d227d4 100644 --- a/app/assets/stylesheets/pages/_news.scss +++ b/app/assets/stylesheets/pages/_news.scss @@ -16,11 +16,7 @@ div.article { margin-bottom: em(40); ul { - list-style-type: disc; - - li { - margin-left: em(20); - } + @extend ul.disc; } } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 54b89d5..5bacc5c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,7 +49,7 @@ module ApplicationHelper end def longdate time - printtime time, "%d %B %Y" + printtime time, "%e %B %Y" end def printtime time, format diff --git a/app/models/match.rb b/app/models/match.rb index 821f1c8..c49c468 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -158,11 +158,11 @@ class Match < ActiveRecord::Base end def team1_lineup - matchers.all(:conditions => {:contester_id => contester1_id}).collect{|matcher| matcher.user.username} * ", " + matchers.all(:conditions => {:contester_id => contester1_id}) end def team2_lineup - matchers.all(:conditions => {:contester_id => contester2_id}).collect{|matcher| matcher.user.username} * ", " + matchers.all(:conditions => {:contester_id => contester2_id}) end def get_friendly param = nil diff --git a/app/views/comments/_new.html.erb b/app/views/comments/_new.html.erb index 4faef68..5c5bcfc 100644 --- a/app/views/comments/_new.html.erb +++ b/app/views/comments/_new.html.erb @@ -1,5 +1,5 @@
-
New comment
+
New Comment
<% if cuser %> <%= form_for(@comment, remote: true) do |f| %> diff --git a/app/views/comments/edit.html.erb b/app/views/comments/edit.html.erb index 0b2762a..533b368 100644 --- a/app/views/comments/edit.html.erb +++ b/app/views/comments/edit.html.erb @@ -1,23 +1,15 @@ -
-

Editing comment

+
+

Editing Comment

<%= form_for(@comment) do |f| %> -
-
    - <% @comment.errors.full_messages.each do |msg| %> -
  • <%= msg %>
  • - <% end %> -
-
+ <%= render 'shared/errors', messages: @comment.errors.full_messages %> -

- <%= f.label :text %>
- <%= f.text_area :text, :rows => 15, :cols => 60 %> -

-

+

+ <%= f.text_area :text, rows: 5 %> +
+
<%= f.submit 'Update' %> -

+
<% end %>
- -<%= link_to 'Back', :back %> + \ No newline at end of file diff --git a/app/views/contesters/_list.html.erb b/app/views/contesters/_list.html.erb index 3cdc663..ba7fef9 100644 --- a/app/views/contesters/_list.html.erb +++ b/app/views/contesters/_list.html.erb @@ -47,7 +47,6 @@ <% if cuser and cuser.admin? %> <%= link_to icon('pencil'), edit_contester_path(contester) %> <%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %> - <%= link_to icon('refresh'), controller: "contesters", action: "recalc", id: contester %> <% end %> <% end %> diff --git a/app/views/contesters/show.html.erb b/app/views/contesters/show.html.erb index 25ced83..38f9ce5 100644 --- a/app/views/contesters/show.html.erb +++ b/app/views/contesters/show.html.erb @@ -7,7 +7,7 @@ <% if @contester.team.logo %> <% end %>
@@ -65,8 +65,6 @@ <%= render partial: 'teamers/list', locals: { teamers: @members, blacklist: nil, comment: false } %>
-<%= link_to 'Back', @contester.contest, class: 'button' %> - <% if @contester.can_update? cuser %> <%= link_to 'Edit', edit_contester_path(@contester), class: 'button' %> <% end %> diff --git a/app/views/contests/show.html.erb b/app/views/contests/show.html.erb index 358f82c..12007f5 100644 --- a/app/views/contests/show.html.erb +++ b/app/views/contests/show.html.erb @@ -1,36 +1,42 @@ -

<%= @contest.name %>

+

+ <%= @contest.name %> +

-
-

Details

+<% content_for :sidebar do %> +
+

Contest Details

-
-
Start - End
-
- <%= longdate @contest.start %>
- <%= longdate @contest.end %> -
-
Rules
-
<%= namelink @contest.rules %>
-
Status
-
<%= @contest.statuses[@contest.status] %>
-
Default
-
Sunday: <%=h @contest.default_time.strftime("%H:%M") %>
-
+
+
Start - End
+
+ <%= longdate @contest.start %>
+ <%= longdate @contest.end %> +
+
Rules
+
<%= namelink @contest.rules %>
+
Status
+
<%= @contest.statuses[@contest.status] %>
+
Default
+
Sunday: <%= Time.use_zone(timezone_offset) { @contest.default_time.strftime("%H:%M %Z") } %>
+
- <% if @contest.contest_type == Contest::TYPE_LADDER %> - <%= link_to 'Scoring', "/contests/#{@contest}/score" %> - <% end %> - <% if cuser and cuser.admin? %> - <%= link_to 'Edit', edit_contest_path(@contest) %> + <% if @contest.contest_type == Contest::TYPE_LADDER %> + <%= link_to 'Scoring', "/contests/#{@contest}/score", class: 'button' %> + <% end %> + <% if cuser and cuser.admin? %> + <%= link_to 'Edit Contest', edit_contest_path(@contest), class: 'button' %> + <% end %> +
+<% end %> + +
+ <% if @contest.contest_type == Contest::TYPE_BRACKET %> + <%= render partial: 'bracket', locals: { contest: @contest } %> + <% else %> + <%= render partial: 'normal' %> <% end %>
-<% if @contest.contest_type == Contest::TYPE_BRACKET %> - <%= render partial: 'bracket', locals: { contest: @contest } %> -<% else %> - <%= render partial: 'normal' %> -<% end %> -