summaryrefslogtreecommitdiffhomepage
path: root/template.old/coins_designs.templ
diff options
context:
space:
mode:
Diffstat (limited to 'template.old/coins_designs.templ')
-rw-r--r--template.old/coins_designs.templ41
1 files changed, 41 insertions, 0 deletions
diff --git a/template.old/coins_designs.templ b/template.old/coins_designs.templ
new file mode 100644
index 0000000..de47482
--- /dev/null
+++ b/template.old/coins_designs.templ
@@ -0,0 +1,41 @@
+package template
+
+import (
+ "fmt"
+ "strings"
+
+ "git.thomasvoss.com/euro-cash.eu/lib"
+)
+
+var varietiesLinkStart = `<a href="/coins/varieties">`
+
+func makeURL(c lib.Country) templ.SafeURL {
+ url := fmt.Sprintf("/coins/designs/%s", c.Code)
+ return templ.SafeURL(url)
+}
+
+templ CoinsDesigns() {
+ {{ p := ctx.Value("printer").(lib.Printer) }}
+ <header>
+ @navbar()
+ <h1>{ p.T("Euro Coin Designs") }</h1>
+ </header>
+ <main>
+ <p>
+ @templ.Raw(p.T("Here you’ll be able to view all the coin designs for each country in the Eurozone. This section of the site doesn’t include minor varieties such as different mintmarks or errors; those are on the %svarieties%s page.", varietiesLinkStart, linkEnd))
+ </p>
+ <hr/>
+ <div class="country-grid">
+ for _, c := range lib.SortedCountries(p) {
+ <a
+ role="button"
+ class="outline"
+ data-code={ strings.ToUpper(c.Code) }
+ href={ makeURL(c) }
+ >
+ { p.T(c.Name) }
+ </a>
+ }
+ </div>
+ </main>
+}