From fe405dbca43917375431accdb23bf42d5f570f46 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 1 Sep 2022 18:39:19 -0500 Subject: [PATCH] Move lang to top --- dmoj/settings.py | 14 -------------- resources/base.scss | 43 ++++++++++++++++++++++++++++++++++++++++--- templates/base.html | 35 +++++++++++++++++++++++++++++++---- 3 files changed, 71 insertions(+), 21 deletions(-) diff --git a/dmoj/settings.py b/dmoj/settings.py index ff9c99b..c88af67 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -359,22 +359,8 @@ LOCALE_PATHS = [ ] LANGUAGES = [ - ("de", _("German")), ("en", _("English")), - ("es", _("Spanish")), - ("fr", _("French")), - ("hr", _("Croatian")), - ("hu", _("Hungarian")), - ("ja", _("Japanese")), - ("ko", _("Korean")), - ("pt", _("Brazilian Portuguese")), - ("ro", _("Romanian")), - ("ru", _("Russian")), - ("sr-latn", _("Serbian (Latin)")), - ("tr", _("Turkish")), ("vi", _("Vietnamese")), - ("zh-hans", _("Simplified Chinese")), - ("zh-hant", _("Traditional Chinese")), ] MARKDOWN_ADMIN_EDITABLE_STYLE = { diff --git a/resources/base.scss b/resources/base.scss index 57f301e..076caaf 100644 --- a/resources/base.scss +++ b/resources/base.scss @@ -719,8 +719,37 @@ math { color: darkgreen; } +#nav-lang-icon { + color: gray; + cursor: pointer; +} +#nav-lang-icon:hover { + color: darkgray; +} +#lang-dropdown { + padding: 4px 0; + border-radius: 4px; + border: 0.5px solid lightgray; + margin-top: 1px; + background: white; + display: none; +} + +.lang-dropdown-item { + padding-bottom: 0.3em; + padding-left: 0.4em; + font-size: 0.9em; + cursor: pointer; +} + +.lang-dropdown-item:hover { + background: lightgray; +} + .navbar-icons { - font-size: 1.6em; + .navbar-icon { + font-size: 1.6em; + } float: left; margin-right: 0.3em; } @@ -738,6 +767,14 @@ math { font-family: monospace; } +.sub-lang { + color: black; + font-size: x-small; + margin-left: -12px; + font-family: monospace; + text-transform: uppercase; +} + @media (max-width: 500px) { #notification { margin-top: 0.6em; @@ -787,12 +824,12 @@ math { @media (max-width: 799px) { .navbar-icons { - margin-top: 2px; + margin-top: 6px; } } @media (min-width: 800px) { .navbar-icons { - margin-top: 7px; + margin-top: 12px; } } diff --git a/templates/base.html b/templates/base.html index 03e7c5e..d527ff6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -82,6 +82,7 @@ + {% include "extra_js.html" %} {% endif %} + +