From 8b9c3fb5c6f0b4334018199ff657774a4853f69f Mon Sep 17 00:00:00 2001 From: Skia Date: Sat, 2 Sep 2017 02:19:34 +0200 Subject: [PATCH] core: improve notification box Signed-off-by: Skia --- core/static/core/js/script.js | 2 +- core/static/core/style.scss | 77 +++++++++++++++++++++------- core/templates/core/base.jinja | 53 ++++++++++++++----- core/templates/core/user_tools.jinja | 1 - 4 files changed, 98 insertions(+), 35 deletions(-) diff --git a/core/static/core/js/script.js b/core/static/core/js/script.js index c30264bf..32644885 100644 --- a/core/static/core/js/script.js +++ b/core/static/core/js/script.js @@ -41,5 +41,5 @@ $( function() { } ); function display_notif() { - $('#notif').toggle(); + $('#header_notif').toggle().parent().toggleClass("white"); } diff --git a/core/static/core/style.scss b/core/static/core/style.scss index 9497aebd..acdbe77c 100644 --- a/core/static/core/style.scss +++ b/core/static/core/style.scss @@ -134,10 +134,18 @@ header { } #header_user_links { + display: flex; width: 120ch; flex: initial; text-align: right; - margin: 1.2em 0em; + margin: 0em; + div { + display: inline; + padding: 1.2em 0em; + &:first-child { + flex: auto; + } + } a { text-decoration: none; margin: 0em 1em; @@ -146,6 +154,49 @@ header { color: $secondary-color; } } + .white { + background: $white-color; + } + #header_notif { + display: none; + position: absolute; + max-height: 20em; + width: 22em; + overflow: auto; + list-style-type: none; + box-shadow: black 1px 1px 5px; + background: white; + text-align: left; + font-size: 80%; + margin: 1.5em 0em 0em -14em; + .header_notif_date { + font-weight: bold; + } + .header_notif_time { + color: grey; + } + li { + padding: 0.2em; + &:hover { + background: #bcc; + } + } + li:last-child { + text-align: center; + a { + color: $primary-dark-color; + &:hover { + color: $primary-light-color; + } + } + } + a { + margin: 0em; + &:hover { + color: $primary-dark-color; + } + } + } } } } @@ -156,18 +207,6 @@ header { padding: 0.3em 1%; } -#notif { - display: none; - position: absolute; - background: lightgrey; - text-align: center; - overflow: scroll; - max-height: 400px; - li:hover { - background: #bcc; - } -} - #info_boxes { display: flex; width: 90%; @@ -261,32 +300,32 @@ h1, h2, h3, h4, h5, h6 { h1 { font-size: 160%; - margin-left: 50px; + margin-left: 0px; } h2 { font-size: 150%; - margin-left: 40px; + margin-left: 10px; } h3 { font-size: 140%; - margin-left: 30px; + margin-left: 20px; } h4 { font-size: 130%; - margin-left: 20px; + margin-left: 30px; } h5 { font-size: 120%; - margin-left: 10px; + margin-left: 40px; } h6 { font-size: 110%; - margin-left: 0px; + margin-left: 50px; } p, pre { diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index 0ec3be80..1976376f 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -72,20 +72,45 @@ {% endif %} diff --git a/core/templates/core/user_tools.jinja b/core/templates/core/user_tools.jinja index 699b52f4..78b9ffc9 100644 --- a/core/templates/core/user_tools.jinja +++ b/core/templates/core/user_tools.jinja @@ -27,7 +27,6 @@

{% trans %}Counters{% endtrans %}