From 78e0c450c1213446ad4104e78cf3afb49557cf56 Mon Sep 17 00:00:00 2001 From: zPlus Date: Sat, 22 Dec 2018 00:37:50 +0100 Subject: [PATCH] Change burger-icon color for notification (#78). --- freepost/static/stylus/reset.styl | 9 +++++++-- freepost/templates/layout.html | 9 ++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/freepost/static/stylus/reset.styl b/freepost/static/stylus/reset.styl index caef7ec1..58727359 100755 --- a/freepost/static/stylus/reset.styl +++ b/freepost/static/stylus/reset.styl @@ -224,8 +224,9 @@ ul, ol * */ .burger-icon - display inline-block - cursor pointer + display inline-block + cursor pointer + position relative > .line1, .line2, .line3 background-color #000 @@ -243,3 +244,7 @@ ul, ol > .line3 transform rotate(45deg) translate(-0px, -11px) + + &.notify + > .line1, .line2, .line3 + background-color #f00 diff --git a/freepost/templates/layout.html b/freepost/templates/layout.html index 30d30929..5775cbb9 100644 --- a/freepost/templates/layout.html +++ b/freepost/templates/layout.html @@ -1,5 +1,10 @@ {% set user = session_user () %} +{# Number of new messages #} +{% if user %} + {% set unread_messages = new_messages (user.id) %} +{% endif %} + @@ -17,7 +22,7 @@
-
+
@@ -71,8 +76,6 @@ About {% if user %} - {% set unread_messages = new_messages (user.id) %} - {% if unread_messages %} {{ user.username }} ({{ unread_messages }})