diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-08-03 02:41:22 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-08-03 02:41:22 +0200 |
commit | ef4b70eec385c79b5ba102cdea99029c222667f1 (patch) | |
tree | 8780f35ccb7d0324cbef8392b3ae89566b4c9ca4 | |
parent | aa370f68188b386167a887f099859a268d3e8e4a (diff) |
Move styling around
-rw-r--r-- | src/templates/coins-mintages.html.tmpl | 42 | ||||
-rw-r--r-- | static/style.css | 43 |
2 files changed, 25 insertions, 60 deletions
diff --git a/src/templates/coins-mintages.html.tmpl b/src/templates/coins-mintages.html.tmpl index cfac73b..7658ce7 100644 --- a/src/templates/coins-mintages.html.tmpl +++ b/src/templates/coins-mintages.html.tmpl @@ -1,5 +1,11 @@ {{ define "header" }} {{ template "header-navbar" . }} + +<style> + #mintage-table #mintage-table-cc { + white-space: nowrap; + } +</style> {{ end }} {{ define "content" }} @@ -53,17 +59,17 @@ </form> <figure> <figcaption>{{ .Get "Standard Issue Coins" }}</figcaption> - <table class="mintage-table" role="grid"> + <table id="mintage-table" role="grid"> <thead> <th>{{ .Get "Year" }}</th> - <th>{{ .Printer.Ftom 0.01 }}</th> - <th>{{ .Printer.Ftom 0.02 }}</th> - <th>{{ .Printer.Ftom 0.05 }}</th> - <th>{{ .Printer.Ftom 0.10 }}</th> - <th>{{ .Printer.Ftom 0.20 }}</th> - <th>{{ .Printer.Ftom 0.50 }}</th> - <th>{{ .Printer.Ftom 1.00 }}</th> - <th>{{ .Printer.Ftom 2.00 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.01 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.02 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.05 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.10 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.20 }}</th> + <th data-numeric>{{ .Printer.Ftom 0.50 }}</th> + <th data-numeric>{{ .Printer.Ftom 1.00 }}</th> + <th data-numeric>{{ .Printer.Ftom 2.00 }}</th> </thead> <tbody> {{ $p := .Printer }} @@ -77,13 +83,13 @@ </th> {{ range .Mintages }} {{ if eq . -1 }} - <td>{{ $p.Get "Unknown" }}</td> + <td data-numeric>{{ $p.Get "Unknown" }}</td> {{ else if eq . -2 }} - <td class="error">{{ $p.Get "Error" }}</td> + <td data-numeric class="error">{{ $p.Get "Error" }}</td> {{ else if eq . 0 }} - <td>—</td> + <td data-numeric>—</td> {{ else }} - <td>{{ $p.Sprintf "{N}" (map "N" .) }}</td> + <td data-numeric>{{ $p.Itoa . }}</td> {{ end }} </td> {{ end }} @@ -95,7 +101,7 @@ {{ if ne (len .Mintages.Commemorative) 0 }} <figure> <figcaption>{{ .Get "Commemorative Coins" }}</figcaption> - <table class="mintage-table-cc" role="grid"> + <table id="mintage-table-cc" role="grid"> <thead> <th>{{ .Get "Year" }}</th> <th>{{ .Get "Commemorated Issue" }}</th> @@ -115,13 +121,13 @@ <td>{{ .Name }}</td> {{ with .Mintage }} {{ if eq . -1 }} - <td>{{ $p.Get "Unknown" }}</td> + <td data-numeric>{{ $p.Get "Unknown" }}</td> {{ else if eq . -2 }} - <td class="error">{{ $p.Get "Error" }}</td> + <td data-numeric class="error">{{ $p.Get "Error" }}</td> {{ else if eq . 0 }} - <td>—</td> + <td data-numeric>—</td> {{ else }} - <td>{{ $p.Sprintf "{N}" (map "N" .) }}</td> + <td data-numeric>{{ $p.Itoa . }}</td> {{ end }} {{ end }} </tr> diff --git a/static/style.css b/static/style.css index e5e40a1..327a034 100644 --- a/static/style.css +++ b/static/style.css @@ -2161,24 +2161,6 @@ textarea, text-align: right; } -#article-list td:first-child { - text-align: right; - width: 14ch; -} - -#article-list td { - white-space: nowrap; -} - -.mintage-table .mintage-table-cc { - white-space: nowrap; -} - -.mintage-table tr :is(th, td):not(:first-child), -.mintage-table-cc tr :is(th, td):last-child { - text-align: right; -} - a[role=button].outline { --background-color: transparent; --color: var(--primary); @@ -2189,16 +2171,7 @@ a[role=button].outline:is(:hover, :active, :focus) { --color: var(--primary-hover); } -.bnote-design-container { - gap: 5%; -} - -.bnote-design-container > img { - width: 100%; -} - -.design-container, -.bnote-design-container { +.design-container { display: flex; justify-content: space-around; align-items: center; @@ -2216,20 +2189,6 @@ div.grid:not(:first-of-type) { margin-top: var(--grid-spacing-vertical); } -dl.unix-style { - display: grid; - grid-template-columns: max-content auto; - row-gap: var(--spacing); -} - -dl.unix-style dt { - grid-column-start: 1; -} - -dl.unix-style dd { - grid-column-start: 2; -} - dl dt:not(:first-child) { margin-top: var(--block-spacing-vertical); } |