From 56bb06b168c406e746aa8287c676a22a7087776e Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 31 May 2016 17:10:08 +0200 Subject: [PATCH] Improves general layout for admin --- app/assets/stylesheets/admin.scss | 64 ++++++++++++++---------- app/assets/stylesheets/layout.scss | 4 ++ app/views/admin/_menu.html.erb | 53 +++++++------------- app/views/admin/dashboard/index.html.erb | 5 +- app/views/layouts/_admin_header.html.erb | 12 ++--- app/views/layouts/admin.html.erb | 21 ++++---- config/locales/admin.en.yml | 1 + config/locales/admin.es.yml | 3 +- 8 files changed, 79 insertions(+), 84 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 4bd332c97..6bd46e4d6 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -8,10 +8,21 @@ // // 01. Global styles -// - - - - - - - - - - - - - - - - - - - - - - - - - +// ----------------- + +$admin-color: #CF3638; body.admin { + header { + border: 0; + } + + .top-bar { + background: $admin-color !important; + height: auto; + } + form { .button { margin-top: 0; @@ -49,7 +60,6 @@ body.admin { } .dashboard { - margin-bottom: rem-calc(48); ul, ol { margin-left: rem-calc(12); @@ -99,17 +109,20 @@ body.admin { display: none; } +.admin-content { + padding: $line-height !important; +} + // 02. Sidebar -// - - - - - - - - - - - - - - - - - - - - - - - - - +// ----------- .admin-sidebar { - - a { - color: white\9 !important; - } + border-bottom: 1px solid $border; + border-right: 1px solid $border; ul { list-style-type: none; + margin-bottom: 0; margin-left: 0; padding: 0; @@ -120,45 +133,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; @@ -277,7 +289,7 @@ body.admin { } // 04. Stats -// - - - - - - - - - - - - - - - - - - - - - - - - - +// --------- .stats { background: white; @@ -305,7 +317,7 @@ body.admin { } // 05. Management -// - - - - - - - - - - - - - - - - - - - - - - - - - +// -------------- .user-permissions { diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 42f6f177d..b5a7ff714 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -219,6 +219,10 @@ a { float: left; } +.no-max-width { + max-width: none; +} + // 02. Header // ---------- 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 @@