From e008d1f642cea4e99ac701563ebc3adf9c339061 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 8 Jan 2016 12:45:37 +0100 Subject: [PATCH] Adds new styles for notifications --- app/assets/stylesheets/layout.scss | 73 ++++++++++++++++++- app/assets/stylesheets/variables.scss | 1 + app/views/devise/menu/_login_items.html.erb | 14 +++- .../notifications/_notification.html.erb | 10 ++- app/views/notifications/index.html.erb | 28 ++++--- config/locales/en.yml | 4 +- config/locales/es.yml | 4 +- 7 files changed, 112 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d47189d18..329ab5a0e 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -384,7 +384,6 @@ header { &:hover { background: none; color: white; - text-decoration: underline; transition: text-decoration 275ms; } @@ -408,6 +407,7 @@ header { &:hover, &:focus { background-color: #007095 !important; + text-decoration: underline; } } @@ -935,6 +935,77 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar { } } +.notifications { + position: relative; + + &:hover { + text-decoration: none; + } + + [class^="icon-"] { + font-size: $h4-font-size; + vertical-align: middle; + } + + .icon-circle { + color: #ecf00b; + font-size: $tiny-font-size; + position: absolute; + right: 4px; + top: -6px; + } +} + +.notifications-list:before { + background: $border; + content: ''; + height: 100%; + left: 28px; + position: absolute; + top: 0; + width: 2px; +} + +.notification { + display: block; + padding: $line-height/2 0 $line-height/2 $line-height*1.5; + position: relative; + + &:hover { + + a { + text-decoration: none; + } + + p:not(.time) { + color: $link; + } + + &:before { + content: "\43"; + } + } + + &:before { + background: white; + color: $brand; + content: "\4d"; + font-family: "icons" !important; + left: 6px; + position: absolute; + } + + p { + color: $text; + margin-bottom: 0; + } + + .time { + font-size: $small-font-size; + color: $text-medium; + } +} + // 09. Filters & search // - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 72fb27788..336b09919 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -39,6 +39,7 @@ $h6-font-size: rem-calc(13); $h6-line-height: rem-calc(17); $small-font-size: rem-calc(14); +$tiny-font-size: rem-calc(10); $line-height: rem-calc(24); // 02. Colors diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb index 5f6608f2f..d2460d11d 100644 --- a/app/views/devise/menu/_login_items.html.erb +++ b/app/views/devise/menu/_login_items.html.erb @@ -1,5 +1,16 @@