From d838cee9cb536049119a22e805746d958628387d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 4 Aug 2025 01:23:32 +0200 Subject: Big changes to everything --- src/templates/coins-mintages.html.tmpl | 310 +++++++++++++++++++++++---------- 1 file changed, 216 insertions(+), 94 deletions(-) (limited to 'src/templates/coins-mintages.html.tmpl') diff --git a/src/templates/coins-mintages.html.tmpl b/src/templates/coins-mintages.html.tmpl index 7658ce7..ee8bc75 100644 --- a/src/templates/coins-mintages.html.tmpl +++ b/src/templates/coins-mintages.html.tmpl @@ -5,63 +5,103 @@ #mintage-table #mintage-table-cc { white-space: nowrap; } + + label[for="country-dd"] { display: none; } + label[for="year-dd"] { display: none; } + + form { + &:has(#country:checked) { + label[for="country-dd"] { display: unset; } + } + &:has(#year:checked) { + label[for="year-dd"] { display: unset; } + } + } {{ end }} {{ define "content" }} -
+
{{ template "navbar" . }}

{{ .Get "Euro Coin Mintages" }}

-
+

{{ .Get "Here you’ll be able to view all the known mintages for all coins. You’ll also be able to filter on country, denomination, etc. If you have any mintage data that’s missing from our site, feel free to contact us." }}

-
+
{{ if eq .Code "nl" }} -

{{ .Get "Additional Notes" }}

-
    -
  • - {{ .Get "Most coins from the years 2003–2016 are listed as NIFC coins while other popular sources such as Numista claim they were minted for circulation. For more information on why others are wrong, {Link:l}click here{-:E}." +

    {{ .Get "Additional Notes" }}

    +
      +
    • + {{ .Get "Most coins from the years 2003–2016 are listed as NIFC coins while other popular sources such as Numista claim they were minted for circulation. For more information on why others are wrong, {Link:l}click here{-:E}." (map "Link" "#TODO") }} -
    • -
    +
  • +
{{ end }} -
-
-
- -
- {{ template "coin-type-radio" - (tuple .Type "circ" (.Get "Circulation Coins")) }} - {{ template "coin-type-radio" - (tuple .Type "nifc" (.Get "NIFC / BU Sets")) }} - {{ template "coin-type-radio" - (tuple .Type "proof" (.Get "Proof Coins")) }} -
-
- -
-
-
{{ .Get "Standard Issue Coins" }}
- + +
+
+ {{ .GetC "Filter Method" "Header/Label" }} + {{ template "mintages/filter-radio" + (tuple .FilterBy "country" (.GetC "Country" "Header/Label")) }} + {{ template "mintages/filter-radio" + (tuple .FilterBy "year" (.GetC "Year" "Header/Label")) }} +
+ + + + + +
+ {{ template "mintages/coin-type-radio" + (tuple .Type "circ" (.Get "Circulation Coins")) }} + {{ template "mintages/coin-type-radio" + (tuple .Type "nifc" (.Get "NIFC / BU Sets")) }} + {{ template "mintages/coin-type-radio" + (tuple .Type "proof" (.Get "Proof Coins")) }} +
+
+ + +
+
{{ .Get "Standard Issue Coins" }}
+
+ {{ if eq .FilterBy "country" }} + +
- + @@ -73,74 +113,126 @@ {{ $p := .Printer }} - {{ range .Mintages.Standard }} + {{ range .CountryMintages.Standard }} - {{ range .Mintages }} - {{ if eq . -1 }} - - {{ else if eq . -2 }} - - {{ else if eq . 0 }} - - {{ else }} - - {{ end }} - + {{ template "mintages/mintage-cell" (tuple . $p) }} {{ end }} {{ end }}
{{ .Get "Year" }}{{ .GetC "Year" "Header/Label" }} {{ .Printer.Ftom 0.01 }} {{ .Printer.Ftom 0.02 }} {{ .Printer.Ftom 0.05 }}
+ {{- .Year -}} {{- if ne .Mintmark "" -}}  {{ .Mintmark }} {{- end -}} {{ $p.Get "Unknown" }}{{ $p.Get "Error" }}{{ $p.Itoa . }}
+ + {{ else if eq .FilterBy "year" }} + + + + + + + + + + + + + + + {{ $p := .Printer }} + {{ range .YearMintages.Standard }} + + + {{ range .Mintages }} + {{ template "mintages/mintage-cell" (tuple . $p) }} + {{ end }} + + {{ end }} + +
{{ .GetC "Country" "Header/Label" }}{{ .Printer.Ftom 0.01 }}{{ .Printer.Ftom 0.02 }}{{ .Printer.Ftom 0.05 }}{{ .Printer.Ftom 0.10 }}{{ .Printer.Ftom 0.20 }}{{ .Printer.Ftom 0.50 }}{{ .Printer.Ftom 1.00 }}{{ .Printer.Ftom 2.00 }}
+ {{- .Country -}} + {{- if ne .Mintmark "" -}} +  {{ .Mintmark }} + {{- end -}} +
+ {{ end }} + +
+ + {{ if eq .FilterBy "country" }} + {{ if ne (len .CountryMintages.Commemorative) 0 }} +
+
{{ .Get "Commemorative Coins" }}
+ + + + + + + + {{ $p := .Printer }} + {{ range .CountryMintages.Commemorative }} + + + + + {{ with .Mintage }} + {{ template "mintages/mintage-cell" (tuple . $p) }} + {{ end }} + + {{ end }} + +
{{ .GetC "Year" "Header/Label" }}{{ .GetC "Commemorated Topic" "Header/Label" }}{{ .GetC "Mintage" "Header/Label" }}
+ {{- .Year -}} + {{- if ne .Mintmark "" -}} +  {{ .Mintmark }} + {{- end -}} + {{ .Name }}
- {{ if ne (len .Mintages.Commemorative) 0 }} -
-
{{ .Get "Commemorative Coins" }}
- - - - - - - - {{ $p := .Printer }} - {{ range .Mintages.Commemorative }} - - - - - {{ with .Mintage }} - {{ if eq . -1 }} - - {{ else if eq . -2 }} - - {{ else if eq . 0 }} - - {{ else }} - - {{ end }} - {{ end }} - + {{ end }} + + {{ else if eq .FilterBy "year" }} + + {{ if ne (len .YearMintages.Commemorative) 0 }} +
+
{{ .Get "Commemorative Coins" }}
+
{{ .Get "Year" }}{{ .Get "Commemorated Issue" }}{{ .Get "Mintage" }}
- {{- .Year -}} - {{- if ne .Mintmark "" -}} -  {{ .Mintmark }} - {{- end -}} - {{ .Name }}{{ $p.Get "Unknown" }}{{ $p.Get "Error" }}{{ $p.Itoa . }}
+ + + + + + + {{ $p := .Printer }} + {{ range .YearMintages.Commemorative }} + + + + + {{ with .Mintage }} + {{ template "mintages/mintage-cell" (tuple . $p) }} {{ end }} - -
{{ .GetC "Country" "Header/Label" }}{{ .GetC "Commemorated Topic" "Header/Label" }}{{ .GetC "Mintage" "Header/Label" }}
+ {{- .Country -}} + {{- if ne .Mintmark "" -}} +  {{ .Mintmark }} + {{- end -}} + {{ .Name }}
-
+ + {{ end }} + + + {{ end }} -
+ {{ end }}
{{ end }} -{{ define "coin-type-radio" }} +{{ define "mintages/coin-type-radio" }} +{{ end }} + +{{ define "mintages/filter-radio" }} +{{ $v := index . 1 }} + +{{ end }} + +{{ define "mintages/mintage-cell" }} +{{ $v := index . 0 }} +{{ $p := index . 1 }} +{{ if eq $v -1 }} + {{ $p.Get "Unknown" }} +{{ else if eq $v -2 }} + {{ $p.Get "Error" }} +{{ else if eq $v 0 }} + — +{{ else }} + {{ $p.Itoa $v }} +{{ end }} {{ end }} \ No newline at end of file -- cgit v1.2.3