From d7b46ecccdaee5fc1f80ba1be7656ce218d64284 Mon Sep 17 00:00:00 2001
From: bennysghost
Date: Wed, 15 Apr 2026 13:52:55 -0700
Subject: [PATCH 1/2] add dark mode option and apply styling
---
static/base.css | 99 +++++++++++++++++++++++++++++++++++++++
template/base.html | 22 +++++++++
template/game.css | 1 +
template/leaguerules.html | 16 +++++++
template/playing.html | 4 +-
5 files changed, 140 insertions(+), 2 deletions(-)
diff --git a/static/base.css b/static/base.css
index 9a85dc1..269e279 100644
--- a/static/base.css
+++ b/static/base.css
@@ -241,3 +241,102 @@ margin-left: 7px;
.div-tab {
cursor: pointer;
}
+
+.game-row-done { background-color: #9F8; color: #111; }
+.game-row-pending { background-color: #DDD; color: #111; }
+
+/* Dark mode */
+body.dark-mode #content {
+ background-color: #1e1e2e;
+ color: #cdd6f4;
+}
+body.dark-mode #content a:link,
+body.dark-mode #content a:visited {
+ color: #89dceb;
+}
+body.dark-mode #content a:hover,
+body.dark-mode #content a:active {
+ color: #74c7ec;
+}
+body.dark-mode #content .header-row {
+ background-color: #005f5f;
+ color: #cdd6f4;
+}
+body.dark-mode #content .stripe {
+ background: #2a2a3e;
+}
+body.dark-mode #content table,
+body.dark-mode #content .table {
+ color: #cdd6f4;
+}
+body.dark-mode #content .sum-row {
+ background-color: #313244;
+ color: #cdd6f4;
+}
+body.dark-mode #content .score {
+ color: #cdd6f4;
+ border-color: #89b4fa;
+}
+body.dark-mode #content .points {
+ color: #a6e3a1;
+}
+body.dark-mode #content #keypad {
+ background-color: #313244;
+ color: #cdd6f4;
+}
+body.dark-mode #content .num-press {
+ background-color: #45475a;
+}
+body.dark-mode #content input,
+body.dark-mode #content select,
+body.dark-mode #content textarea {
+ background-color: #313244;
+ color: #cdd6f4;
+ border-color: #45475a;
+}
+body.dark-mode #content input::placeholder,
+body.dark-mode #content textarea::placeholder {
+ color: #7f849c;
+}
+body.dark-mode #content .btn-default,
+body.dark-mode #content .btn-secondary {
+ background-color: #313244;
+ color: #cdd6f4;
+ border-color: #45475a;
+}
+body.dark-mode #content hr {
+ border-color: #45475a;
+}
+body.dark-mode .nav-bar .btn-secondary {
+ background-color: #313244;
+ color: #cdd6f4;
+ border-color: #45475a;
+}
+body.dark-mode .nav-bar .btn-secondary:hover,
+body.dark-mode .nav-bar .btn-secondary:focus,
+body.dark-mode .nav-bar .btn-secondary:active {
+ background-color: #45475a;
+ color: #cdd6f4;
+ border-color: #585b70;
+}
+body.dark-mode .nav-bar .dropdown-menu {
+ background-color: #1e1e2e;
+ border-color: #45475a;
+}
+body.dark-mode .nav-bar .dropdown-menu .dropdown-item {
+ color: #cdd6f4;
+}
+body.dark-mode .nav-bar .dropdown-menu .dropdown-item:hover,
+body.dark-mode .nav-bar .dropdown-menu .dropdown-item:focus {
+ background-color: #313244;
+ color: #89dceb;
+}
+body.dark-mode .nav-bar .dropdown-menu .dropdown-divider {
+ border-color: #585b70;
+}
+body.dark-mode #sugs {
+ background: #313244;
+ color: #cdd6f4;
+}
+body.dark-mode .game-row-done { background-color: #1e3a1e; color: #cdd6f4; }
+body.dark-mode .game-row-pending { background-color: #2a2a3e; color: #cdd6f4; }
diff --git a/template/base.html b/template/base.html
index 9a6613b..52628bc 100644
--- a/template/base.html
+++ b/template/base.html
@@ -81,6 +81,8 @@
NEW PLAYER INFORMATION
REPORT PLAYER CONDUCT
PLAYER LOOKUP
+
+
@@ -107,6 +109,26 @@
$(this).toggleClass('button-open');
$menuWrap.toggleClass('menu-show');
});
+
+ // Dark mode
+ function applyDarkMode(enabled) {
+ if (enabled) {
+ $('body').addClass('dark-mode');
+ $('#dark-mode-label').text('ON');
+ } else {
+ $('body').removeClass('dark-mode');
+ $('#dark-mode-label').text('OFF');
+ }
+ }
+
+ var darkMode = localStorage.getItem('darkMode') === 'true';
+ applyDarkMode(darkMode);
+
+ $('#dark-mode-toggle').on('click', function() {
+ darkMode = !darkMode;
+ localStorage.setItem('darkMode', darkMode);
+ applyDarkMode(darkMode);
+ });
});
+
League Rules for Monday Night Pinball
V4.19 (Last updated: 2026-1-24 by Michael Adcock)
diff --git a/template/playing.html b/template/playing.html
index 98b38fe..0c3dc64 100644
--- a/template/playing.html
+++ b/template/playing.html
@@ -117,8 +117,8 @@
chunk += '' +makeNum(game.points_4)+ ' | ';
chunk += '';
{{/doubles}}
- var color = game.done ? '#9F8' : '#DDD';
- chunk += '';
+ var rowClass = game.done ? 'game-row-done' : 'game-row-pending';
+ chunk += '
';
chunk += '| ' +makeNum(game.score_13)+ ' | ';
chunk += '' +makeNum(game.points_13)+ ' | ';
chunk += '' +makeNum(game.score_24)+ ' | ';
From 3622ddce42a52455ee827cfffe509661fd5b5f65 Mon Sep 17 00:00:00 2001
From: bennysghost
Date: Wed, 15 Apr 2026 13:56:16 -0700
Subject: [PATCH 2/2] add a couple more dark mode stylings
---
static/base.css | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/static/base.css b/static/base.css
index 269e279..7eb74a2 100644
--- a/static/base.css
+++ b/static/base.css
@@ -273,6 +273,9 @@ body.dark-mode #content .sum-row {
background-color: #313244;
color: #cdd6f4;
}
+body.dark-mode #content .edit-btn img {
+ filter: invert(1);
+}
body.dark-mode #content .score {
color: #cdd6f4;
border-color: #89b4fa;
@@ -298,6 +301,13 @@ body.dark-mode #content input::placeholder,
body.dark-mode #content textarea::placeholder {
color: #7f849c;
}
+body.dark-mode #content input[type="file"]::file-selector-button,
+body.dark-mode #content input[type="file"]::-webkit-file-upload-button {
+ background-color: #45475a;
+ color: #cdd6f4;
+ border-color: #585b70;
+ border-style: solid;
+}
body.dark-mode #content .btn-default,
body.dark-mode #content .btn-secondary {
background-color: #313244;