From f7c82080722ac79107bcf04b8b8794044df29d73 Mon Sep 17 00:00:00 2001 From: Bennett Blodinger Date: Fri, 23 Sep 2016 08:27:34 -0400 Subject: [PATCH] v2 Better than first patch. Keeps colors and positioning. Also adds in a set of badge- context classes for future use. --- html/css/styles.css | 51 +++++++++++++++++++++++++++++++++ html/includes/print-menubar.php | 7 +++-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/html/css/styles.css b/html/css/styles.css index 9e6c7f6f68..e7e32dea96 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -1763,6 +1763,57 @@ label { font-weight: normal; } +.badge-navbar-user { + border-radius: 40%; + font-size: 65%; + padding: 5px; + position: relative; + top: -10px; + left: -5px; +} +.badge-default { + background-color: #777; +} +.badge-default[href]:hover, +.badge-default[href]:focus { + background-color: #5e5e5e; +} +.badge-primary { + background-color: #337ab7; +} +.badge-primary[href]:hover, +.badge-primary[href]:focus { + background-color: #286090; +} +.badge-success { + background-color: #5cb85c; +} +.badge-success[href]:hover, +.badge-success[href]:focus { + background-color: #449d44; +} +.badge-info { + background-color: #5bc0de; +} +.badge-info[href]:hover, +.badge-info[href]:focus { + background-color: #31b0d5; +} +.badge-warning { + background-color: #f0ad4e; +} +.badge-warning[href]:hover, +.badge-warning[href]:focus { + background-color: #ec971f; +} +.badge-danger { + background-color: #d9534f; +} +.badge-danger[href]:hover, +.badge-danger[href]:focus { + background-color: #c9302c; +} + @media only screen and (max-width: 480px) { .thumbnail_graph_table b { font-size : 6px;} .thumbnail_graph_table img { diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 59f3e5d658..e2f86b8cf3 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -544,9 +544,12 @@ if (is_file("includes/print-menubar-custom.inc.php")) { $notifications = new ObjectCache('notifications'); $style = ''; if (empty($notifications['count']) && empty($notifications['sticky_count'])) { - $style = 'style="background-color:grey; color:white;"'; + $class = 'badge-default'; +} else { + $class = 'badge-danger'; +} + echo(' User'.($notifications['sticky_count']+$notifications['count']).''); } - echo(' User'.($notifications['sticky_count']+$notifications['count']).''); ?>