From 33542dac57469b1b988de86be10dcc2c4abc8166 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 21 Sep 2024 08:46:04 +0200 Subject: Migrate the jargon page to go templates --- src/templates.go | 8 +++++- src/templates/jargon.html.tmpl | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 src/templates/jargon.html.tmpl (limited to 'src') diff --git a/src/templates.go b/src/templates.go index 839a6fb..3e34f47 100644 --- a/src/templates.go +++ b/src/templates.go @@ -17,18 +17,20 @@ type templateData struct { var ( //go:embed templates/*.html.tmpl - templateFS embed.FS + templateFS embed.FS notFoundTmpl = buildTemplate("404") errorTmpl = buildTemplate("error") templates = map[string]*template.Template{ "/": buildTemplate("index"), "/about": buildTemplate("about"), + "/jargon": buildTemplate("jargon"), "/language": buildTemplate("language"), } funcmap = map[string]any{ "safe": asHTML, "locales": locales, "toUpper": strings.ToUpper, + "tuple": templateMakeTuple, } ) @@ -51,6 +53,10 @@ func locales() []locale { return Locales[:] } +func templateMakeTuple(args ...any) []any { + return args +} + func (td templateData) T(fmt string, args ...any) string { return td.Printer.T(fmt, args...) } diff --git a/src/templates/jargon.html.tmpl b/src/templates/jargon.html.tmpl new file mode 100644 index 0000000..a952103 --- /dev/null +++ b/src/templates/jargon.html.tmpl @@ -0,0 +1,58 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .T "Euro Cash Jargon" }}

+
+
+

+ {{ .T "Both on this website and in other euro-cash-related forums there are many terms you will come across that you may not immediately understand. This page will hopefully get you up to speed with the most important and frequently-used terminology." }} +

+

+ {{ .T "All terms defined below can be used as clickable links which highlight the selected term. It is recommended to use these links when sharing this page with others, so that the relevant terms are highlighted." }} +

+
+

{{ .T "General Terms" }}

+
+ {{ template "jargon/dt" (tuple "nifc" (.T "NIFC — Not Intended For Circulation")) }} +
+

+ {{ .T "NIFC coins are coins minted without the intention of being put into general circulation. These coins are typically minted with the purpose of being put into coincards or coin-sets to be sold to collectors. Occasionally they are also handed out to collectors for face value at banks." }} +

+

+ {{ .T "While uncommon, NIFC coins are occasionally found in circulation. This can happen for a variety of reasons such as someone depositing their coin collection (known as a ‘collection dump’), or a collector’s child spending their rare coins on an ice cream. Some coin mints have also been known to put NIFC coins that have gone unsold for multiple years into circulation." }} +

+
+ {{ template "jargon/dt" (tuple "au" (.T "AU — Almost Uncirculated")) }} +
+ {{ .T "AU coins are coins that are in extremely good condition as a result of limited use in circulation. Unlike the term ‘UNC’, this term is a description of the coins quality, not its usage. AU coins often appear to retain most of their original luster as well as possessing little-to-no scratches or other forms of post-mint damage (PMD)." }} +
+ {{ template "jargon/dt" (tuple "bu" (.T "BU — Brilliantly Uncirculated")) }} +
+ {{ .T "BU is a general term to refer to coins from coincards and -sets. These are different from UNC coins in that they are typically handled with more care during the minting process and are struck with higher-quality dies than the coins minted for coin rolls resulting in a higher-quality end product. You may also see these coins referred to by the French term ‘fleur de coin’." }} +
+ {{ template "jargon/dt" (tuple "pmd" (.T "PMD — Post-Mint Damage")) }} +
+ {{ .T "Post-mint damage is any damage that a coin has sustained outside of the minting process, such as through being dropped on the ground, hit against a table, etc." }} +
+ {{ template "jargon/dt" (tuple "unc" (.T "UNC — Uncirculated")) }} +
+ {{ .T "Uncirculated coins are coins that have never been used in a monetary exchange. The term ‘UNC’ is often mistakenly used to refer to coins in very good condition, but this is incorrect. A coin in poor condition that has never been circulated is still considered an ‘UNC’ coin." }} +
+
+

{{ .T "Collector-Specific Terms" }}

+
+ {{ template "jargon/dt" (tuple "crh" (.T "CRH — Coin Roll Hunting")) }} +
+ {{ .T "Coin roll hunting is a general term for the activity of searching through coin rolls and -bags to find coins for a collection. Coin rolls and bags are often obtained at banks or coin roll machines." }} +
+
+
+{{ end }} + +{{ define "jargon/dt" }} +
+ + {{ index . 1 }} + +
+{{ end }} -- cgit v1.2.3