diff --git a/allianceauth/static/css/auth-base.css b/allianceauth/static/css/auth-base.css index 7c10b444..cd145f05 100644 --- a/allianceauth/static/css/auth-base.css +++ b/allianceauth/static/css/auth-base.css @@ -3,7 +3,7 @@ } .notification-bell-color { - color: #A88F1E; + color: #a88f1e; } .navbar-brand { @@ -20,12 +20,12 @@ } #wrapper { - width: 100%; padding: 0; + width: 100%; } #site-body-wrapper { - margin-right:0; + margin-right: 0; } /* Horizontal list group */ @@ -46,7 +46,7 @@ ul.list-group.list-group-horizontal > li.list-group-item { @media all { /* style nav tabs in dark mode*/ .template-dark-mode .nav-tabs > li.active > a { - background-color: rgb(70, 69, 69)!important; + background-color: rgb(70, 69, 69) !important; color: rgb(255, 255, 255) !important; } @@ -58,40 +58,47 @@ ul.list-group.list-group-horizontal > li.list-group-item { /* style group headers within a table */ .template-light-mode .tr-group { - font-weight: bold; background-color: #e6e6e6 !important; - } - .template-dark-mode .tr-group { font-weight: bold; + } + + .template-dark-mode .tr-group { background-color: rgb(105, 105, 105) !important; + font-weight: bold; } /* default style for tables */ - .template-light-mode .table-aa > thead > tr > th{ + .template-light-mode .table-aa > thead > tr > th { border-bottom: 1px solid #f2f2f2; } - .template-dark-mode .table-aa > thead > tr > th{ + + .template-dark-mode .table-aa > thead > tr > th { border-bottom: 1px solid rgb(70, 69, 69); } - .table-aa > thead > tr > th{ + + .table-aa > thead > tr > th { vertical-align: middle; } - .template-light-mode .table-aa > tbody > tr > td{ + + .template-light-mode .table-aa > tbody > tr > td { border-bottom: 1px solid #f2f2f2; } - .template-dark-mode .table-aa > tbody > tr > td{ + + .template-dark-mode .table-aa > tbody > tr > td { border-bottom: 1px solid rgb(70, 69, 69); } + .table-aa > tbody > tr > td { vertical-align: middle; } + .table-aa > tbody > tr:last-child { border-bottom: none; } } /* highlight active menu items ---------------------------------------------------------------------------------------------------------------------- */ +------------------------------------------------------------------------------------- */ @media all { .template-light-mode .nav-pills > li > a.active { background-color: rgb(236, 240, 241); @@ -102,15 +109,99 @@ ul.list-group.list-group-horizontal > li.list-group-item { } } +/* user menu +------------------------------------------------------------------------------------- */ +@media all { + img { + height: auto; + max-width: 100%; + } + + .navbar-nav > li.top-user-menu.with-main-character > .dropdown-menu { + padding-top: 0.5rem; + } + + .navbar-nav > li.top-user-menu.with-main-character a { + padding: 14px; + } + + .dropdown-menu > li > a { + clear: both; + color: rgb(123, 138, 139); + display: block; + font-weight: 400; + line-height: 1.42857143; + padding: 3px 20px; + white-space: nowrap; + } + + .top-user-menu { + color: rgb(255, 255, 255); + } + + .top-menu-bar-language-select form { + border-bottom: 1px solid transparent; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgb(255 255 255), 0 1px 0 rgb(255 255 255); + box-shadow: inset 0 1px 0 rgb(255 255 255), 0 1px 0 rgb(255 255 255); + margin-bottom: 7.5px; + margin-left: 5px; + margin-right: 5px; + margin-top: 7.5px; + padding: 10px 15px; + } +} + +@media all and (max-width: 768px) { + .navbar-nav .open .dropdown-menu .dropdown-header, .navbar-nav .open .dropdown-menu > li > a { + padding: 5px 15px 5px 25px; + } +} + +@media all and (min-width: 768px) { + .top-user-menu { + color: rgb(123, 138, 139); + } + + .top-menu-bar-language-select form { + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + margin-left: 0; + margin-right: 0; + padding-bottom: 0; + padding-top: 0; + width: auto; + } +} + +/* eve time in navbar +------------------------------------------------------------------------------------- */ +@media all { + .nav-item-eve-time .eve-time-wrapper { + color: rgb(255, 255, 255); + display: block; + line-height: 21px; + padding: 10px 15px; + position: relative; + } +} + +@media all and (min-width: 768px) { + .nav-item-eve-time .eve-time-wrapper { + padding-bottom: 19.5px; + padding-top: 19.5px; + } +} + /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) { - /* class for vertically aligning columns in a bootstrap row */ .row.vertical-flexbox-row2 { - display: -webkit-box; + display: -webkit-box; display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: -ms-flexbox; + display: flex; flex-wrap: wrap; } @@ -123,6 +214,6 @@ ul.list-group.list-group-horizontal > li.list-group-item { /* Extra Small devices (Phones, <768px) */ @media (max-width: 767px) { .button-wrapper .btn { - margin-bottom:5px; + margin-bottom: 5px; } } diff --git a/allianceauth/static/js/eve-time.js b/allianceauth/static/js/eve-time.js new file mode 100644 index 00000000..8b33779a --- /dev/null +++ b/allianceauth/static/js/eve-time.js @@ -0,0 +1,61 @@ +$(document).ready(function () { + 'use strict'; + + /** + * check time + * @param i + * @returns {string} + */ + let checkTime = function (i) { + if (i < 10) { + i = '0' + i; + } + + return i; + }; + + /** + * render a JS clock for Eve Time + * @param element + * @param utcOffset + */ + let renderClock = function (element, utcOffset) { + let today = new Date(); + let h = today.getUTCHours(); + let m = today.getUTCMinutes(); + let s = today.getUTCSeconds(); + + h = h + utcOffset; + + if (h > 24) { + h = h - 24; + } + + if (h < 0) { + h = h + 24; + } + + h = checkTime(h); + m = checkTime(m); + s = checkTime(s); + + // document.getElementById('clock').innerHTML = h + ":" + m + ":" + s; + element.html(h + ':' + m + ':' + s); + + setTimeout(function () { + renderClock(element, 0); + }, 500); + }; + + /** + * functions that need to be executed on load + */ + let init = function () { + renderClock($('.eve-time-wrapper .eve-time-clock'), 0); + }; + + /** + * start the show + */ + init(); +}); diff --git a/allianceauth/templates/allianceauth/base.html b/allianceauth/templates/allianceauth/base.html index 129f617d..9d1798c9 100644 --- a/allianceauth/templates/allianceauth/base.html +++ b/allianceauth/templates/allianceauth/base.html @@ -50,6 +50,7 @@ }; + {% block extra_javascript %} {% endblock extra_javascript %} diff --git a/allianceauth/templates/allianceauth/night-toggle.html b/allianceauth/templates/allianceauth/night-toggle.html index b36d9826..a4fc93e8 100644 --- a/allianceauth/templates/allianceauth/night-toggle.html +++ b/allianceauth/templates/allianceauth/night-toggle.html @@ -1,5 +1,8 @@ {% load i18n %} - - {% trans "Night" %} - - + +