From 9b5df4ac7eb533da7ad095bd77fce27b1cd93e21 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 9 Dec 2021 14:31:49 -0600 Subject: [PATCH] Change UI --- resources/base.scss | 33 ++++++++++++++++++++++++++++----- resources/chatbox.scss | 8 +------- templates/base.html | 21 ++++++++++++--------- 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/resources/base.scss b/resources/base.scss index 15107b9..0b316fc 100644 --- a/resources/base.scss +++ b/resources/base.scss @@ -181,7 +181,7 @@ header { } a { - color: #9c3706; + color: lightcoral; } li { @@ -291,7 +291,7 @@ nav { &:hover { border-top: 2px solid #9c3706; - color: #9c3706; + color: lightcoral; background: rgba(255, 255, 255, 0.25); margin: 0; } @@ -314,7 +314,7 @@ nav { left: 5px; display: none; color: #fff; - background: #00c4cc; + background: darkcyan; margin: 0 !important; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); @@ -329,6 +329,10 @@ nav { li { display: block; + a { + color: white !important; + } + a, button { padding: 8px 20px 8px 8px !important; font-size: 0.8em; @@ -680,12 +684,31 @@ math { } #notification { - color: gray; + color: lightsteelblue; float: left; - margin-top: 0.8em; + margin-top: 0.6em; margin-right: 0.8em; font-size: 1.3em; } + +#chat-icon { + color: lightseagreen; + float: left; + margin-top: 0.6em; + margin-right: 0.5em; + font-size: 1.3em; +} + +.unread_boxes { + background-color: red; + color: white; + border-radius: 50%; + padding: 1px 4px; + margin-left: -12px; + font-size: x-small; + font-family: monospace; +} + @media (max-width: 500px) { #notification { margin-top: 0.6em; diff --git a/resources/chatbox.scss b/resources/chatbox.scss index 7c19264..930ead8 100644 --- a/resources/chatbox.scss +++ b/resources/chatbox.scss @@ -171,13 +171,7 @@ cursor: pointer; margin-top: 0.5em; } -.unread_boxes { - background-color: darkcyan; - color: white; - border-radius: 50%; - padding: 0 3px; - margin-left: -4px; -} + @media (max-width: 799px) { #chat-area { height: 500px; diff --git a/templates/base.html b/templates/base.html index a6d22a4..8160848 100644 --- a/templates/base.html +++ b/templates/base.html @@ -151,12 +151,12 @@ name: '{{ request.user.username|escapejs }}' }; $(function() { - if ($('.nav-chat').length) { + if ($('#chat-icon').length) { $.get("{{url('get_unread_boxes')}}") .done(function(data) { if (data.unread_boxes) { var html = `${data.unread_boxes}`; - $('.nav-chat').append(html); + $('#chat-icon').append(html); } }) .fail(function(data) { @@ -219,15 +219,18 @@ {% endfor %} -
+
{% if request.user.is_authenticated %} + + + + {% set unseen_cnt = request.profile.count_unseen_notifications %} - - @@ -258,7 +261,7 @@
  • {% csrf_token %} - +
  • {% endif %}