Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,112 @@ 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 .edit-btn img {
filter: invert(1);
}
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 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;
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; }
22 changes: 22 additions & 0 deletions template/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
<a class="dropdown-item" href="/NEWPLAYERS">NEW PLAYER INFORMATION</a>
<a class="dropdown-item" href="/CONDUCT">REPORT PLAYER CONDUCT</a>
<a class="dropdown-item" href="http://pinballstats.info/search/">PLAYER LOOKUP</a>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="dark-mode-toggle" type="button">DARK MODE: <span id="dark-mode-label">OFF</span></button>
</div>
</div>
</div>
Expand All @@ -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);
});
});
</script>
</body>
Expand Down
1 change: 1 addition & 0 deletions template/game.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@
width: 0%;
background-color: blue;
}

16 changes: 16 additions & 0 deletions template/leaguerules.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@
li.indent0 {margin: 5.0px 20.0px 5.0px 36.0px; line-height: 17.0px; font: 14.7px Arial; color: #000000; -webkit-text-stroke: #000000}
.newrule * {color: #008800; -webkit-text-stroke: #008800}
.newrule {color: #008800; -webkit-text-stroke: #008800}
body.dark-mode { background-color: #1e1e2e; }
body.dark-mode h1,
body.dark-mode h2 { color: #cdd6f4; -webkit-text-stroke: #cdd6f4 }
body.dark-mode p { color: #cdd6f4; -webkit-text-stroke: #cdd6f4 }
body.dark-mode p.doc_title { color: #cdd6f4; -webkit-text-stroke: #cdd6f4 }
body.dark-mode p.last_updated { color: #a6e3a1; -webkit-text-stroke: #a6e3a1 }
body.dark-mode p.toc0,
body.dark-mode p.toc1 { color: #89b4fa; -webkit-text-stroke: #89b4fa }
body.dark-mode p.note { color: #89b4fa; -webkit-text-stroke: #89b4fa }
body.dark-mode li,
body.dark-mode li.indent0 { color: #cdd6f4; -webkit-text-stroke: #cdd6f4 }
body.dark-mode .newrule *,
body.dark-mode .newrule { color: #a6e3a1; -webkit-text-stroke: #a6e3a1 }
body.dark-mode a { color: #89b4fa; }
body.dark-mode a:visited { color: #cba6f7; }
</style>
</head>
<body>
<script>if (localStorage.getItem('darkMode') === 'true') document.body.classList.add('dark-mode');</script>
<p class="doc_title">League Rules for Monday Night Pinball</p>
<p class="last_updated"><a href="#L0.04">V4.19</a> (Last updated: 2026-1-24 by Michael Adcock)</p>
<br>
Expand Down
4 changes: 2 additions & 2 deletions template/playing.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@
chunk += '<td>' +makeNum(game.points_4)+ '</td>';
chunk += '</tr>';
{{/doubles}}
var color = game.done ? '#9F8' : '#DDD';
chunk += '<tr style="background-color: ' +color+ ';font-weight: bold;">';
var rowClass = game.done ? 'game-row-done' : 'game-row-pending';
chunk += '<tr class="' +rowClass+ '" style="font-weight: bold;">';
chunk += '<td style="text-align:right;">' +makeNum(game.score_13)+ '</td>';
chunk += '<td>' +makeNum(game.points_13)+ '</td>';
chunk += '<td style="text-align:right;">' +makeNum(game.score_24)+ '</td>';
Expand Down