summaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-12 23:57:38 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-12 23:57:38 +0200
commit986f171167e7b21ffd3ee0c0ec6a8506f0741462 (patch)
tree0ae9f7821e7f51342ad87b171359e6a94f35c6a9 /template
parent792b2bd299b611e378679e5a269cc249e079c60e (diff)
Make more changes to the mintages
Diffstat (limited to 'template')
-rw-r--r--template/coins_mintages.templ45
1 files changed, 35 insertions, 10 deletions
diff --git a/template/coins_mintages.templ b/template/coins_mintages.templ
index 3446644..894cb75 100644
--- a/template/coins_mintages.templ
+++ b/template/coins_mintages.templ
@@ -100,16 +100,41 @@ templ CoinsMintages() {
</tbody>
</table>
</figure>
- <figure>
- <figcaption>{ p.T("Commemorative Coins") }</figcaption>
- <table class="mintage-table" role="grid">
- <thead>
- <th>{ p.T("Year") }</th>
- <th>{ p.T("Commemorated Issue") }</th>
- <th>{ p.T("Mintage") }</th>
- </thead>
- </table>
- </figure>
+ if len(data.Commemorative) != 0 {
+ <figure>
+ <figcaption>{ p.T("Commemorative Coins") }</figcaption>
+ <table class="mintage-table-cc" role="grid">
+ <thead>
+ <th>{ p.T("Year") }</th>
+ <th>{ p.T("Commemorated Issue") }</th>
+ <th>{ p.T("Mintage") }</th>
+ </thead>
+ <tbody>
+ for _, row := range data.Commemorative {
+ <tr>
+ <th scope="col">
+ if len(row.Mintmark) != 0 {
+ { strconv.Itoa(row.Year) }&nbsp;<sub><small>{ row.Mintmark }</small></sub>
+ } else {
+ { strconv.Itoa(row.Year) }
+ }
+ </th>
+ <!-- TODO: Translate commemorative names! -->
+ <td>{ row.Name }</td>
+ switch row.Mintage[strToCtype(ctype)] {
+ case mintage.Unknown:
+ <td>{ p.T("Unknown") }</td>
+ case 0:
+ <td>—</td>
+ default:
+ <td>{ p.N(row.Mintage[strToCtype(ctype)]) }</td>
+ }
+ </tr>
+ }
+ </tbody>
+ </table>
+ </figure>
+ }
</section>
</main>
}