From 11f117f1e286088a8eeccd1fb24256472eb87e5b Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 1 Feb 2017 09:37:41 +0100 Subject: [PATCH] Counter of own uploads added to top bar --- app/assets/stylesheets/_settings.scss | 5 +++++ app/views/layouts/_topbar.slim | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss index c4099c8..e1867a0 100644 --- a/app/assets/stylesheets/_settings.scss +++ b/app/assets/stylesheets/_settings.scss @@ -918,3 +918,8 @@ a.black [type='file'] { width: inherit !important; } + +/* Badges in the topbar seem a bit too high */ +nav.top-bar .badge { + padding-bottom: 0.2em; +} diff --git a/app/views/layouts/_topbar.slim b/app/views/layouts/_topbar.slim index 5562a19..320617e 100644 --- a/app/views/layouts/_topbar.slim +++ b/app/views/layouts/_topbar.slim @@ -25,12 +25,12 @@ nav.top-bar //a href="#" Ubuntu li class=('active' if controller_name=='welcome' and action_name=='about') a href="/about" About - - if @current_users_screenshots + - if @current_users_screenshots.any? li class=('active' if controller_name=='packages' and action_name=='my_uploads') a href="/my_uploads" - | My uploads - span.badge - = @current_users_screenshots + ' My uploads + span.badge.secondary + = @current_users_screenshots.count // TODO: Check correct classes in Zurb/Foundation for top bar! - if user_signed_in? li