diff --git a/.ruby-version b/.ruby-version index 585940699..276cbf9e2 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.3 +2.3.0 diff --git a/app/assets/javascripts/votes.js.coffee b/app/assets/javascripts/votes.js.coffee index e4223c644..030b9cf46 100644 --- a/app/assets/javascripts/votes.js.coffee +++ b/app/assets/javascripts/votes.js.coffee @@ -1,20 +1,22 @@ App.Votes = hoverize: (votes) -> - $(votes).hover -> - $("div.anonymous-votes", votes).show(); - $("div.organizations-votes", votes).show(); - $("div.not-logged", votes).show(); - $("div.no-supports-allowed", votes).show(); - $("div.logged", votes).hide(); - , -> - $("div.anonymous-votes", votes).hide(); - $("div.organizations-votes", votes).hide(); - $("div.not-logged", votes).hide(); - $("div.no-supports-allowed", votes).hide(); - $("div.logged", votes).show(); + $(document).on { + 'mouseenter focus': -> + $("div.anonymous-votes", this).show(); + $("div.organizations-votes", this).show(); + $("div.not-logged", this).show(); + $("div.no-supports-allowed", this).show(); + $("div.logged", this).hide(); + mouseleave: -> + $("div.anonymous-votes", this).hide(); + $("div.organizations-votes", this).hide(); + $("div.not-logged", this).hide(); + $("div.no-supports-allowed", this).hide(); + $("div.logged", this).show(); + }, votes initialize: -> - App.Votes.hoverize votes for votes in $("div.votes") - App.Votes.hoverize votes for votes in $("div.supports") + App.Votes.hoverize "div.votes" + App.Votes.hoverize "div.supports" false diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 4bd332c97..f52045c7b 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -8,11 +8,27 @@ // // 01. Global styles -// - - - - - - - - - - - - - - - - - - - - - - - - - +// ----------------- + +$admin-color: #CF3638; body.admin { + header { + border: 0; + + .top-links { + background: darken($admin-color, 15%); + } + } + + .top-bar { + background: $admin-color !important; + height: auto; + } + form { + .button { margin-top: 0; } @@ -27,48 +43,40 @@ body.admin { table { + th { + text-align: left; + } + tr { - background: #f4f4f4; + background: white; + border: 1px solid $border; - &:nth-child(odd) { - background: white; - } - - &:nth-child(even) { - background: #f0f0f0; + &:hover { + background: #f3f6f7; } } - td.small { - font-size: $small-font-size; + input[type="submit"] ~ a, a ~ a { + margin-left: $line-height/2; + margin-right: $line-height/2; } } + hr { + max-width: none; + } + + .menu.simple li.active { + border-bottom: 2px solid $admin-color; + color: $admin-color; + } + #proposals { width: 100% !important; } - .dashboard { - margin-bottom: rem-calc(48); - - ul, ol { - margin-left: rem-calc(12); - - li { - font-size: rem-calc(15); - line-height: rem-calc(30); - margin-bottom: rem-calc(12); - } - } - - p { - font-size: rem-calc(15); - line-height: rem-calc(30); - } - - h3 { - font-weight: bold; - } + .accordion-title { + font-size: $base-font-size; } .button.secondary { @@ -99,17 +107,37 @@ body.admin { display: none; } +.admin-content { + padding: $line-height !important; +} + +@include breakpoint(medium) { + + tr { + + .on-hover { + display: none; + } + + &:hover .on-hover { + display: inline; + } + } +} + // 02. Sidebar -// - - - - - - - - - - - - - - - - - - - - - - - - - +// ----------- .admin-sidebar { + border-right: 1px solid $border; - a { - color: white\9 !important; + @include breakpoint(medium) { + padding-bottom: $line-height*3; } ul { list-style-type: none; + margin-bottom: 0; margin-left: 0; padding: 0; @@ -120,84 +148,44 @@ body.admin { padding-top: rem-calc(4); padding-left: 12px\9 !important; padding-right: 12px\9 !important; + vertical-align: middle; } li { - background: #2E343F; - border-bottom: 1px solid #292f39; - border-top: 1px solid #353c49; + background: white; margin: 0; outline: 0; - &:first-child { + &.active a { + background: #f3f6f7; + color: $admin-color; font-weight: bold; - text-transform: uppercase; - } - - &.active{ - background: #373D47; - - a:not(.button) { - color: white; - } } } - li a:not(.button) { - color: rgba(255,255,255,0.3); + li.section { + border-bottom: 1px dotted #d5d5d5; + border-top: 1px dotted #d5d5d5; + height: $line-height/2; + } + + li a { + color: $text; display: block; line-height: rem-calc(48); padding-left: rem-calc(12); vertical-align: top; &:hover { - color: white; + background: #f3f6f7; + text-decoration: none; } } } } // 03. List elements -// - - - - - - - - - - - - - - - - - - - - - - - - - - -.admin-list { - list-style-type: none; - margin: 0; - margin-bottom: rem-calc(48); - - form { - clear: both; - - .checkbox { - font-size: $small-font-size; - } - } - - li { - border-bottom: 1px solid #E7E9EC; - font-size: rem-calc(14); - min-height: rem-calc(72); - padding: rem-calc(12); - - &:first-child { - border-top: 1px solid #E7E9EC; - } - - &:nth-child(odd) { - background: #F0F2F6; - } - } - - .tag { - float: left; - font-size: rem-calc(18); - padding: 0; - } - - .button { - margin: 0; - } -} +// ----------------- .delete { border-bottom: 1px dotted #CF2A0E; @@ -240,14 +228,9 @@ body.admin { font-style: italic; } -.level { - font-size: rem-calc(12); -} - .official { background-color: #e7e7e7; border-radius: rem-calc(3); - font-size: rem-calc(12); font-weight: normal; padding: rem-calc(6) rem-calc(12); } @@ -263,13 +246,10 @@ body.admin { .moderation-description { max-height: rem-calc(65); overflow: hidden; - max-width: rem-calc(590); + max-width: rem-calc(700); &:hover { - cursor: text; max-height: rem-calc(1000); - outline: 3px solid #ffbf47; - padding: rem-calc(12); transition: max-height 0.9s; -moz-transition: max-height 0.9s; -webkit-transition: max-height 0.9s; @@ -277,7 +257,7 @@ body.admin { } // 04. Stats -// - - - - - - - - - - - - - - - - - - - - - - - - - +// --------- .stats { background: white; @@ -305,7 +285,7 @@ body.admin { } // 05. Management -// - - - - - - - - - - - - - - - - - - - - - - - - - +// -------------- .user-permissions { @@ -338,8 +318,8 @@ body.admin { border-radius: rem-calc(3); font-size: rem-calc(16); font-weight: normal; - margin-bottom: rem-calc(12); - padding: rem-calc(6) rem-calc(12); + margin: $line-height; + padding: $line-height/2; strong { font-size: rem-calc(18); diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 209bcc3c6..16113108d 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -247,6 +247,9 @@ a { h2 { font-size: $base-font-size; } + +.no-max-width { + max-width: none; } // 02. Header diff --git a/app/assets/stylesheets/print.css b/app/assets/stylesheets/print.css index 29096ae13..de5a56a31 100644 --- a/app/assets/stylesheets/print.css +++ b/app/assets/stylesheets/print.css @@ -12,6 +12,8 @@ #print_link { display: none !important; } +#responsive-menu { display: none !important; } + .admin-sidebar { display: none !important; } img.left { display: none !important; } diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index f8437906f..7ea48b2c6 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,122 +1,103 @@