diff options
author | Steffen van Bergerem <svbergerem@online.de> | 2015-06-03 01:28:26 +0300 |
---|---|---|
committer | Jonne Haß <me@jhass.eu> | 2015-06-04 19:05:43 +0300 |
commit | 46abdbdd1fced8612cbb165efdb5738ac948a7e5 (patch) | |
tree | 306832713ad962befaa732de4b23e11eccc40a70 | |
parent | 8e9ceb9a2bafe425a6d35f824282db20e70d54a7 (diff) |
Style fixes for left navbar in notification view
-rw-r--r-- | app/assets/javascripts/app/views/notifications_view.js | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/application.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/new_styles/_navs.scss | 15 | ||||
-rw-r--r-- | app/assets/stylesheets/notifications.scss | 17 | ||||
-rw-r--r-- | app/views/notifications/index.html.haml | 6 |
5 files changed, 11 insertions, 34 deletions
diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 5d33edc47..c2d1cdfd1 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -74,10 +74,10 @@ app.views.Notifications = Backbone.View.extend({ [allNotes, typeNotes].forEach(function(badge) { if(badge.text() > 0) { - badge.addClass("badge-important").removeClass("badge-default"); + badge.removeClass("hidden"); } else { - badge.removeClass("badge-important").addClass("badge-default"); + badge.addClass("hidden"); } }); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 72558f8e5..5143340cb 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -34,9 +34,6 @@ @import 'new_styles/registration'; @import 'new_styles/forms'; -/* navs */ -@import 'new_styles/navs'; - /* profile and settings pages */ @import 'new_styles/settings'; diff --git a/app/assets/stylesheets/new_styles/_navs.scss b/app/assets/stylesheets/new_styles/_navs.scss deleted file mode 100644 index d93871c92..000000000 --- a/app/assets/stylesheets/new_styles/_navs.scss +++ /dev/null @@ -1,15 +0,0 @@ -.nav.nav-tabs{ - li > a { - color: $text-dark-grey; - .entypo, .mentionIcon { - color: $text-dark-grey; - margin-right: 5px; - } - .mentionIcon { font-weight: 700; } - } - li.active > a { - background-color: $background-grey; - color: $black; - .entypo, .mentionIcon { color: $black; } - } -} diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index 0cc1460f6..099bcc7ca 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -1,17 +1,8 @@ #notifications_container { - .nav.nav-tabs{ - li > a { - .badge.badge-default { display: none; } - } - } - .stream { .header { border-bottom: 1px solid $border-grey; - .btn-toolbar, h4 { - margin: 11px 0; - line-height: 40px; - } + .btn-toolbar { margin: 11px 0; } margin-bottom: 10px; } @@ -58,7 +49,6 @@ .stream_element.media { padding: 10px; margin: 0px; - font-size: 13px; line-height: 18px; border-bottom: 1px solid $border-grey; &:last-child { border: none !important; } @@ -98,4 +88,9 @@ .no_notifications { text-align: center; } } + + .list-group .list-group-item { + .entypo, .mentionIcon { margin-right: 5px; } + .mentionIcon { font-weight: bold; } + } } diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 71ad48c71..5cf7ae26a 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -3,14 +3,14 @@ .col-md-3 %h3 = t('.notifications') - %ul.list-group + .list-group %a.list-group-item{class: ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])), href: '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') } - %span.pull-right.badge{class: (@unread_notification_count > 0 ? 'badge-important' : 'badge-default')} + %span.pull-right.badge{class: ("hidden" unless @unread_notification_count > 0)} = @unread_notification_count = t('.all_notifications') - @grouped_unread_notification_counts.each do |key, count| %a.list-group-item{class: ('active' if params[:type] == key), data: { type: key }, href: '/notifications?type=' + key + (params[:show] == 'unread' ? '&show=unread' : '') } - %span.pull-right.badge{class: (count > 0 ? 'badge-important' :'badge-default') } + %span.pull-right.badge{class: ("hidden" unless count > 0)} = count - case key - when 'also_commented', 'comment_on_post' |