diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 5971be2..4975319 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -9,7 +9,7 @@ //= require_self $ -> - $('logout').click -> + $('#logout').click -> $(this).closest('form').submit() $('select').each (i, el) -> diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/_variables.scss index 8a1e0a9..ddb7dc2 100644 --- a/app/assets/stylesheets/_variables.scss +++ b/app/assets/stylesheets/_variables.scss @@ -2,12 +2,15 @@ Neat Overrides */ -@import "neat-helpers"; +$max-width: em(1200); -$column: 90px; -$gutter: 30px; -$grid-columns: 12; -$max-width: em(1180); +/* + Grid Debugging +*/ + +// $visual-grid: true; +// $visual-grid-index: 10000; +// $visual-grid-opacity: 0.5; /* Neat Breakpoints diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 6e00626..7319d3f 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -5,6 +5,7 @@ @import "bourbon"; @import "variables"; @import "neat"; +@import "neat-helpers"; @import "font-awesome"; /* @@ -14,6 +15,18 @@ @import "mixins/buttons"; @import "mixins/flashes"; +/* + Layout +*/ + +@import "layout/body"; +@import "layout/typography"; +@import "layout/header"; +@import "layout/navigation"; +@import "layout/sidebar"; +@import "layout/footer"; +@import "layout/helpers"; + /* Components */ @@ -29,18 +42,6 @@ @import "components/tabs"; @import "components/shoutbox"; -/* - Layout -*/ - -@import "layout/typography"; -@import "layout/header"; -@import "layout/navigation"; -@import "layout/body"; -@import "layout/sidebar"; -@import "layout/footer"; -@import "layout/helpers"; - /* Pages */ diff --git a/app/assets/stylesheets/components/_comments.scss b/app/assets/stylesheets/components/_comments.scss index bc7dfcc..40991c5 100644 --- a/app/assets/stylesheets/components/_comments.scss +++ b/app/assets/stylesheets/components/_comments.scss @@ -1,4 +1,4 @@ -#comments { +#comments-thread { @include span-columns(12); h3 { diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/components/_forms.scss index 410696e..335b219 100644 --- a/app/assets/stylesheets/components/_forms.scss +++ b/app/assets/stylesheets/components/_forms.scss @@ -252,7 +252,7 @@ form.square { form.search { .query { - @include span-columns(9); + @include span-columns(7 of 9); input { width: 100%; @@ -260,7 +260,7 @@ form.search { } .controls { - @include span-columns(3); + @include span-columns(2 of 9); @include shift(0); @include omega; diff --git a/app/assets/stylesheets/components/_gather.scss b/app/assets/stylesheets/components/_gather.scss index 19d41d9..952d4ab 100644 --- a/app/assets/stylesheets/components/_gather.scss +++ b/app/assets/stylesheets/components/_gather.scss @@ -168,5 +168,5 @@ padding: em(14); text-align: center; margin-left: - em(20); - width: $max-width; + width: $max-width + $container-padding*2; } diff --git a/app/assets/stylesheets/layout/_body.scss b/app/assets/stylesheets/layout/_body.scss index 20ad9bd..9514b6b 100644 --- a/app/assets/stylesheets/layout/_body.scss +++ b/app/assets/stylesheets/layout/_body.scss @@ -2,6 +2,8 @@ Main Containers */ +$container-padding: em(20); + html, body { margin: 0; @@ -20,22 +22,15 @@ body { min-height: 100%; } -%container-padded { - padding: 0 em(20); -} - .wrapper { @include outer-container; -} - -#content { - @extend %container-padded; + max-width: $max-width + $container-padding*2; } #content { @include span-columns(12); background: $light-blue; - padding-top: em(20); + padding: $container-padding $container-padding 0 $container-padding; } #forums { @@ -43,11 +38,11 @@ body { } #main { - @include span-columns(9); + @include span-columns(9 of 12); } #sidebar { - @include span-columns(3); + @include span-columns(3 of 12); @include omega(); } diff --git a/app/assets/stylesheets/layout/_footer.scss b/app/assets/stylesheets/layout/_footer.scss index 9cc9495..cb5cbc7 100644 --- a/app/assets/stylesheets/layout/_footer.scss +++ b/app/assets/stylesheets/layout/_footer.scss @@ -6,11 +6,10 @@ @include outer-container; background: $footer-background; - padding: $base-line-height*2 $gutter; - width: 100%; + max-width: $max-width + $container-padding*2; - .wrapper { - @extend %container-padded; + .content { + padding: $container-padding*2 $container-padding; } .footer-links { @@ -32,7 +31,7 @@ text-align: center; @include media($medium-screen) { - text-align: left; + text-align: center; } } diff --git a/app/assets/stylesheets/layout/_header.scss b/app/assets/stylesheets/layout/_header.scss index 90e557f..6df4693 100644 --- a/app/assets/stylesheets/layout/_header.scss +++ b/app/assets/stylesheets/layout/_header.scss @@ -13,7 +13,6 @@ nav.top { .menu-wrapper { @include outer-container; - @extend %container-padded; position: relative; z-index: 9999; } @@ -111,6 +110,8 @@ nav.top { } header .banner { + padding: 0 $container-padding; + #logo { @include span-columns(8); min-height: em(200); diff --git a/app/assets/stylesheets/layout/_navigation.scss b/app/assets/stylesheets/layout/_navigation.scss index fdb26d1..691d043 100644 --- a/app/assets/stylesheets/layout/_navigation.scss +++ b/app/assets/stylesheets/layout/_navigation.scss @@ -3,6 +3,7 @@ */ #menu { + @include span-columns(12); font-family: $montserrat; background-color: $background-primary; height: em(60); diff --git a/app/assets/stylesheets/pages/_users.scss b/app/assets/stylesheets/pages/_users.scss index 1ea124d..6bba522 100644 --- a/app/assets/stylesheets/pages/_users.scss +++ b/app/assets/stylesheets/pages/_users.scss @@ -71,6 +71,28 @@ #user-data { @include span-columns(12); margin-bottom: em(20); + + h2, + h3, + h4 { + margin-bottom: 1em; + } + + .group { + @include span-columns(6); + + dd a { + float: none; + display: block; + } + } + + tbody td { + &:first-child, + &:nth-child(2) { + text-align: left; + } + } } } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ac0751c..54b89d5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -93,10 +93,10 @@ module ApplicationHelper end item << content_tag(:dt) do - "#{name.to_s.capitalize.gsub(/_s/, '').gsub(/_/, ' ')}" + "#{name.to_s.capitalize.gsub(/_s/, '').gsub(/_/, ' ')}".html_safe end item << content_tag(:dd) do - result + result.html_safe end item @@ -165,6 +165,10 @@ module ApplicationHelper end def latest_rules - Contest.last.rules + if Contest.last + Contest.last.rules + else + article_path(Article::RULES) + end end end diff --git a/app/views/application/_footer.html.erb b/app/views/application/_footer.html.erb index f0fceff..0d717fb 100644 --- a/app/views/application/_footer.html.erb +++ b/app/views/application/_footer.html.erb @@ -1,5 +1,5 @@