From dd346df8897c12f786ad45da53da97f0fa9b4253 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Sun, 13 Apr 2025 19:49:36 -0400 Subject: [PATCH] Misc CSS fixes --- public/style.css | 49 ++++++++++++++++++++++++++++++++++-------------- view/admin.tmpl | 10 +++++----- view/layout.tmpl | 4 +++- view/user.tmpl | 6 +++--- 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/public/style.css b/public/style.css index c205593..b018d5e 100644 --- a/public/style.css +++ b/public/style.css @@ -11,6 +11,10 @@ --font-family: monospace; } +* { + box-sizing: border-box; +} + html, body { margin: 0; @@ -39,18 +43,22 @@ table { border-collapse: collapse; } -td:not(:first-child) { - padding-left: 0.5rem; +thead { + font-weight: bold; +} + +td:not(:last-child) { + padding-right: 0.5rem; +} + +thead tr > td, tbody tr:not(:last-child) > td { + padding-bottom: 0.5rem; } td:last-child { text-align: right; } -thead { - font-weight: bold; -} - a { color: var(--accent-lighter); } @@ -135,8 +143,22 @@ input[type="password"] { border: var(--input-border-width) solid var(--accent); } +input.long { + width: 22em; +} + +@media (max-width: 600px) { + input[type="text"]:not([hidden]), + input[type="number"]:not([hidden]), + input[type="password"]:not([hidden]), + input.long:not([hidden]) { + display: block; + width: 100%; + } +} + input[type="number"] { - width: 3rem; + width: 5rem; } input[type="checkbox"]:not(:disabled), @@ -144,10 +166,6 @@ input[type="radio"]:not(:disabled) { cursor: pointer; } -input.long { - width: 22em; -} - input[type="text"]::placeholder, input[type="password"]::placeholder { color: white; @@ -157,9 +175,8 @@ input[type="password"]::placeholder { button, input[type="submit"], input[type="file"]::file-selector-button { + margin: 0.5em 0; font-family: var(--font-family); - margin: 0.3em var(--button-shadow-size); - margin-left: var(--button-shadow-size); background-color: var(--accent); display: inline-block; color: white; @@ -173,6 +190,10 @@ input[type="file"]::file-selector-button { 0 0 0 var(--button-highlight-size) black; } +input[type="file"]::file-selector-button { + margin-right: 0.5em; +} + button:hover:not(:disabled), input[type="submit"]:hover:not(:disabled), input[type="file"]::file-selector-button:hover:not(:disabled) { @@ -233,8 +254,8 @@ fieldset { #content { max-width: 800px; + padding: 1em; margin: auto; - padding: 1rem; } pre { diff --git a/view/admin.tmpl b/view/admin.tmpl index 1ad76f1..18fdab7 100644 --- a/view/admin.tmpl +++ b/view/admin.tmpl @@ -23,7 +23,7 @@ Link - Date Generated + Date Generated @@ -36,7 +36,7 @@ > - {{ $invite.CreatedAt.Format "Mon Jan _2 15:04:05 MST 2006" }} + {{ $invite.CreatedAt.Format "Jan _2 15:04:05 MST 2006" }}
User Players - Max # players* + Max # players* Admin Locked - Delete Account + Delete Account @@ -122,7 +122,7 @@ {{ $player.Name }} {{ end }} {{ else if gt (len $user.Players) 1 }} - {{ len $user.Players }} players + {{ len $user.Players }} players {{ end }} diff --git a/view/layout.tmpl b/view/layout.tmpl index 18bdb2c..6457b73 100644 --- a/view/layout.tmpl +++ b/view/layout.tmpl @@ -22,7 +22,9 @@
-
{{ block "content" . }}{{ end }}
+
+ {{ block "content" . }}{{ end }} +