From e443cdb35a59dbb001dc7eff880dddaa954d775b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phillip=20K=C3=BChne?= Date: Wed, 4 Oct 2023 00:11:42 +0000 Subject: [PATCH] Dark theme Toast notifications Fixes #59 --- backend/static/css/style.css | 18 +++++++ backend/templates/main.html | 88 +++++++++++++++---------------- backend/templates/main_admin.html | 12 ++--- 3 files changed, 67 insertions(+), 51 deletions(-) diff --git a/backend/static/css/style.css b/backend/static/css/style.css index b58490d..bbcb86a 100644 --- a/backend/static/css/style.css +++ b/backend/static/css/style.css @@ -24,6 +24,10 @@ /* Misc */ --copy-highlight-color: rgba(251, 255, 0, 0.6); + + /* Toasts */ + --toast-background-color: #ffffff; + --toast-text-color: #212529; } @@ -188,6 +192,16 @@ pre { ); } +.toast { + background-color: var(--toast-background-color); + color: var(--toast-text-color); +} + +.toast-header { + background-color: var(--toast-background-color); + color: var(--toast-text-color); +} + @media (prefers-color-scheme: dark) { :root { /* Navbar */ @@ -212,5 +226,9 @@ pre { /* Input */ --input-background-color: #343434; + + /* Toasts */ + --toast-background-color: #232323; + --toast-text-color: #f5f5f5; } } \ No newline at end of file diff --git a/backend/templates/main.html b/backend/templates/main.html index 0cbef50..0e0e1ae 100644 --- a/backend/templates/main.html +++ b/backend/templates/main.html @@ -1,5 +1,3 @@ - - {% extends 'base.html' %} {% block title %}Warteliste{% endblock %} {% block content %} @@ -9,7 +7,7 @@ data-url="/api/queue" data-pagination="true" data-classes="table" - data-show-refresh="false" + data-show-refresh="false" data-auto-refresh="true" data-auto-refresh-interval="10"> @@ -25,53 +23,53 @@ {% endblock %} {% block extrajs %} {% endblock %} \ No newline at end of file diff --git a/backend/templates/main_admin.html b/backend/templates/main_admin.html index 4649063..468342d 100644 --- a/backend/templates/main_admin.html +++ b/backend/templates/main_admin.html @@ -27,8 +27,8 @@ Name - Song - Künstler + Song + Künstler Aktionen @@ -195,8 +195,8 @@ } function CopyFormatter(value, row, index) { - let escapedString = value.replace("\"","\\\"").replace("\'", "\\\'") - return ""+value+""; + let escapedString = value.replace("\"", "\\\"").replace("\'", "\\\'") + return "" + value + ""; } function getIdSelections() { @@ -212,9 +212,9 @@ message: text, status: 1, timeout: 5000 - }; + }; Toast.create(toast); - }) + }) } {% endblock %} \ No newline at end of file