diff --git a/Moo/play/lib.py b/Moo/play/lib.py index 23c309b..8f0973b 100644 --- a/Moo/play/lib.py +++ b/Moo/play/lib.py @@ -25,10 +25,12 @@ EMOJI = { 'app': '🎷', 'base': '🎵', + 'dark': '🔅', # 🔅 U+1F505 Dim Button 'fleuron': '❦', 'heart': '♡', 'hearted': '💜', 'help': '❔', + 'light': '🔆', # 🔆 U+1F506 Bright Button 'next': '⏭', 'none': '🚫', 'notfound': '😭', diff --git a/Moo/play/static/custom-dark.css b/Moo/play/static/custom-dark.css index 93aa993..e44ea64 100644 --- a/Moo/play/static/custom-dark.css +++ b/Moo/play/static/custom-dark.css @@ -8,17 +8,17 @@ 5: rgb(227,227,227) <= play button */ -.bg-1 { background-color: rgb(36,36,36); } -.bg-2 { background-color: rgb(76,76,76); } -.bg-3 { background-color: rgb(135,135,135); } -.bg-4 { background-color: rgb(156,156,156); } -.bg-5 { background-color: rgb(227,227,227); } +body.dark .bg-1 { background-color: rgb(36,36,36); } +body.dark .bg-2 { background-color: rgb(76,76,76); } +body.dark .bg-3 { background-color: rgb(135,135,135); } +body.dark .bg-4 { background-color: rgb(156,156,156); } +body.dark .bg-5 { background-color: rgb(227,227,227); } -.clr-1 { color: rgb(36,36,36); } -.clr-2 { color: rgb(76,76,76); } -.clr-3 { color: rgb(135,135,135); } -.clr-4 { color: rgb(156,156,156); } -.clr-5 { color: rgb(227,227,227); } +body.dark .clr-1 { color: rgb(36,36,36); } +body.dark .clr-2 { color: rgb(76,76,76); } +body.dark .clr-3 { color: rgb(135,135,135); } +body.dark .clr-4 { color: rgb(156,156,156); } +body.dark .clr-5 { color: rgb(227,227,227); } /* Highlight colors (shades of pink) @@ -28,37 +28,37 @@ c: rgb(254,168,252) */ -.bg-a { background-color: rgb(255,96,178); } -.bg-b { background-color: rgb(255,75,161); } -.bg-c { background-color: rgb(254,168,252); } +body.dark .bg-a { background-color: rgb(255,96,178); } +body.dark .bg-b { background-color: rgb(255,75,161); } +body.dark .bg-c { background-color: rgb(254,168,252); } -.clr-a { color: rgb(255,96,178); } -.clr-b { color: rgb(255,75,161); } -.clr-c { color: rgb(254,168,252); } +body.dark .clr-a { color: rgb(255,96,178); } +body.dark .clr-b { color: rgb(255,75,161); } +body.dark .clr-c { color: rgb(254,168,252); } -html, body { +body.dark { background-color: black; color: rgb(76,76,76); font-family: sans-serif; } -a { +body.dark a { color: rgb(135,135,135); } -b, i { +body.dark b, body.dark i { color: white; } -.box, .button { +body.dark .box, body.dark .button { background-color: rgb(36,36,36); } -#audio-table { +body.dark #audio-table { background-color: black; } -#track-title { +body.dark #track-title { text-shadow: 0px 0px 16px magenta; } diff --git a/Moo/play/static/js/audio.js b/Moo/play/static/js/audio.js index 2258c49..7e7455f 100644 --- a/Moo/play/static/js/audio.js +++ b/Moo/play/static/js/audio.js @@ -22,6 +22,19 @@ function adjustLayout() { } } + +function Bright() { + let body = document.querySelector("body") + body.classList.remove("dark") +} + +function Dark() { + let body = document.querySelector("body") + body.classList.add("dark") +} + + + function gotoNext() { let next = control.getAttribute('next') if (next > 0) { diff --git a/Moo/play/templates/clock.html b/Moo/play/templates/clock.html index 41da0b0..7b49100 100644 --- a/Moo/play/templates/clock.html +++ b/Moo/play/templates/clock.html @@ -15,3 +15,12 @@ style="margin-left: 8px;">{{ emoji.random | safe }} {%- endif -%} + +
diff --git a/Moo/play/templates/layout.html b/Moo/play/templates/layout.html index 7af015d..0559f8c 100644 --- a/Moo/play/templates/layout.html +++ b/Moo/play/templates/layout.html @@ -12,8 +12,7 @@ href="{{ url_for('static', filename='ico/moo.ico') }}"> - - + {% if request.path == '/' %}