From 4cd4a16f7d226cc4bc6ea0eb9d1f2029ed6b4103 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 12 Jan 2025 16:10:38 +0100 Subject: Add the banknotes/codes page --- src/http.go | 2 + src/templates.go | 2 + src/templates/banknotes-codes.html.tmpl | 352 ++++++++++++++++++++++++++++++++ 3 files changed, 356 insertions(+) create mode 100644 src/templates/banknotes-codes.html.tmpl (limited to 'src') diff --git a/src/http.go b/src/http.go index 3feda8c..04c17de 100644 --- a/src/http.go +++ b/src/http.go @@ -29,6 +29,8 @@ func Run(port int) { mwareC := chain(mwareB, countryHandler) // [C]ountry mwareM := chain(mwareC, mintageHandler) // [M]intage + /* TODO: Put this all in an embed.FS */ + mux.Handle("GET /codes/", fs) mux.Handle("GET /designs/", fs) mux.Handle("GET /favicon.ico", fs) mux.Handle("GET /fonts/", fs) diff --git a/src/templates.go b/src/templates.go index eadcafd..2cee22e 100644 --- a/src/templates.go +++ b/src/templates.go @@ -2,6 +2,7 @@ package src import ( "embed" + "fmt" "html/template" "log" "strings" @@ -26,6 +27,7 @@ var ( "denoms": denoms, "locales": locales, "safe": asHTML, + "sprintf": fmt.Sprintf, "strToCtype": strToCtype, "toUpper": strings.ToUpper, "tuple": templateMakeTuple, diff --git a/src/templates/banknotes-codes.html.tmpl b/src/templates/banknotes-codes.html.tmpl new file mode 100644 index 0000000..f7aea7f --- /dev/null +++ b/src/templates/banknotes-codes.html.tmpl @@ -0,0 +1,352 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .T "Location Codes" }}

+
+
+

+ {{ .T ` + Euro banknotes have two codes on them: a printer code and a serial + number. The printer code tells you where a given note was printed, + while the serial number tells you which country issues the banknote + (for the 2002 series) or where the banknote was printed (for the + Europa series). + ` }} +

+ +

{{ .T "Printer Code" }}

+

+ {{ .T ` + The printer code (not to be confused with the serial number) is a + small code printed on banknotes with information about where the + banknote was printed. All printer codes take the form of ‘X000X0’ + — or in other words — a letter followed by 3 numbers, a letter + and a final number. + ` }} +

+

+ {{ .T ` + The printer code can be a bit tricky to find. The following + dropdowns will show you where to find the printer code on each + note. + ` }} +

+
+ {{ .T "2002 Series Printer Codes" }} +

+ {{ .T ` + All these images are taken from %seurobilltracker.com%s.` + `` + `` | safe + }} +

+ {{ template "banknotes/codes/code-pos" (tuple .Printer 5 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 10 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 20 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 50 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 100 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 200 "2002") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 500 "2002") }} +
+
+ {{ .T "Europa Series Printer Codes" }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 5 "europa") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 10 "europa") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 20 "europa") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 50 "europa") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 100 "europa") }} + {{ template "banknotes/codes/code-pos" (tuple .Printer 200 "europa") }} +
+ +

+ {{ .T ` + The first letter in the printer code identifies the specific + printer at which the banknote was printed. The tables below will + tell you which letters correspond to which printers. The final + letter and number form a pair (such as ‘A2’ or ‘D6’). This pair + acts as a set of coordinates telling you where on the sheet of + paper the banknote was located. During printing, banknotes will be + printed multiple times on a large sheet of paper which is later cut + into smaller individual banknotes. A note with the pair ‘A1’ will + have been at the upper-left corner of the printing sheet, with ‘A2’ + to it’s right and ‘B1’ below it. + ` }} +

+ +

{{ .T "2002 Series" }}

+

+ {{ .T ` + In the 2002 series, the first letter of the serial number can be + used to identify the country that issued the banknote. The + following table shows which countries map to which codes. + ` }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ .T "Code" }}{{ .T "Country" }}
D{{ .T "Estonia" }}
E{{ .T "Slovakia" }}
F{{ .T "Malta" }}
G{{ .T "Cyprus" }}
H{{ .T "Slovenia" }}
L{{ .T "Finland" }}
M{{ .T "Portugal" }}
N{{ .T "Austria" }}
P{{ .T "Netherlands" }}
S{{ .T "Italy" }}
T{{ .T "Ireland" }}
U{{ .T "France" }}
V{{ .T "Spain" }}
X{{ .T "Germany" }}
Y{{ .T "Greece" }}
Z{{ .T "Belgium" }}
+ +

+ {{ .T ` + The first letter of the printer code can also be used to identify + the specific printer at which the banknote was printed. The + printer- and country codes do not need to line up; a banknote + issued by a country will often be printed in another. + ` }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ .T "Code" }}{{ .T "Country" }}{{ .T "Printer" }}
D{{ .T "Finland" }}SETEC
E{{ .T "France" }}Oberthur
F{{ .T "Austria" }}Österreichische Banknoten‐ und Sicherheitsdruck GmbH
G{{ .T "Netherlands" }}Koninklijke Joh. Enschede
H{{ .T "United Kingdom" }}Thomas de la Rue
J{{ .T "Italy" }}Banca d’ Italia
K{{ .T "Ireland" }}{{ .T "Central Bank of Ireland" }}
L{{ .T "France" }}Banque de France
M{{ .T "Spain" }}Fábrica Nacional de Moneda y Timbre
N{{ .T "Greece" }}{{ .T "Bank of Greece" }}
P{{ .T "Germany" }}Giesecke & Devrient
R{{ .T "Germany" }}Bundesdruckerei Berlin
T{{ .T "Belgium" }}{{ .T "National Bank of Belgium" }}
U{{ .T "Portugal" }}Valora S.A.
+ +

{{ .T "Europa Series" }}

+

+ {{ .T ` + In the Europa series the first letter of the serial number can be + used to identify the printer that printed the banknote, just like + the printer code. The following table shows which countries map to + which codes. + ` }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ .T "Code" }}{{ .T "Country" }}{{ .T "Printer" }}
E{{ .T "France" }}Oberthur
F{{ .T "Bulgaria" }}Oberthur Fiduciaire AD
M{{ .T "Portugal" }}Valora S.A.
N{{ .T "Austria" }}Österreichische Banknoten‐ und Sicherheitsdruck GmbH
P{{ .T "Netherlands" }}Koninklijke Joh. Enschedé
R{{ .T "Germany" }}Bundesdruckerei Berlin
S{{ .T "Italy" }}Banca d’Italia
T{{ .T "Ireland" }}{{ .T "Central Bank of Ireland" }}
U{{ .T "France" }}Banque de France
V{{ .T "Spain" }}Fábrica Nacional de Moneda y Timbre
W{{ .T "Germany" }}Giesecke & Devrient Leipzig
X{{ .T "Germany" }}Giesecke & Devrient Munich
Y{{ .T "Greece" }}{{ .T "Bank of Greece" }}
Z{{ .T "Belgium" }}{{ .T "National Bank of Belgium" }}
+
+{{ end }} + +{{ define "banknotes/codes/code-pos" }} +{{ $p := (index . 0) }} +
+ {{ $p.T "%d Euro" (index . 1) }} + {{ +
+{{ end }} \ No newline at end of file -- cgit v1.2.3