From 548090e67f66acf84385c4152ca464e52d3e3319 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 13 Sep 2024 13:01:48 +0200 Subject: Migrate away from templ and towards html/template --- src/templates/404.html.tmpl | 11 ++ src/templates/about.html.tmpl | 41 +++++++ src/templates/base.html.tmpl | 43 ++++++++ src/templates/error.html.tmpl | 14 +++ src/templates/index.html.tmpl | 18 ++++ src/templates/language.html.tmpl | 48 +++++++++ src/templates/navbar.html.tmpl | 228 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 403 insertions(+) create mode 100644 src/templates/404.html.tmpl create mode 100644 src/templates/about.html.tmpl create mode 100644 src/templates/base.html.tmpl create mode 100644 src/templates/error.html.tmpl create mode 100644 src/templates/index.html.tmpl create mode 100644 src/templates/language.html.tmpl create mode 100644 src/templates/navbar.html.tmpl (limited to 'src/templates') diff --git a/src/templates/404.html.tmpl b/src/templates/404.html.tmpl new file mode 100644 index 0000000..3771a0f --- /dev/null +++ b/src/templates/404.html.tmpl @@ -0,0 +1,11 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .T "Page Not Found" }}

+
+
+

+ {{ .T "The page you were looking for does not exist. If you believe this is a mistake then don’t hesitate to contact @onetruemangoman on Discord or email us at %s." `mail@euro-cash.eu` | safe }} +

+
+{{ end }} diff --git a/src/templates/about.html.tmpl b/src/templates/about.html.tmpl new file mode 100644 index 0000000..aed356a --- /dev/null +++ b/src/templates/about.html.tmpl @@ -0,0 +1,41 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .T "About Us" }}

+
+
+

{{ .T "Open Source" }}

+

+ {{ .T "This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found %shere%s. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with anyof the content on this site." `` `` | safe }} +

+

{{ .T "Contact Us" }}

+

+ {{ .T "While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to %s or contact ‘@onetruemangoman’ on Discord." `mail@euro-cash.eu` | safe }} +

+

{{ .T "Special Thanks" }}

+ + + + + + + + + + + + + +
{{ .T "Development" }}{{ .T "Research" }}{{ .T "Translations" }}
+ Jessika Wexler, + Lyyli Savolainen, + Ralf Nadel + + Elín Hjartardóttir, + Storm Sørensen + + Thomas Voss, + Védís Indriðadóttir +
+
+{{ end }} diff --git a/src/templates/base.html.tmpl b/src/templates/base.html.tmpl new file mode 100644 index 0000000..0d5e731 --- /dev/null +++ b/src/templates/base.html.tmpl @@ -0,0 +1,43 @@ + + + + + + + + Euro Cash + + + + {{ template "content" . }} + + + diff --git a/src/templates/error.html.tmpl b/src/templates/error.html.tmpl new file mode 100644 index 0000000..28ef0a3 --- /dev/null +++ b/src/templates/error.html.tmpl @@ -0,0 +1,14 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .Code }} {{ .Msg }}

+
+
+

+ {{ .T "If you’re seeing this page, it means that something went wrong on our end that we need to fix. Our team has been notified of this error, and we apologise for the inconvenience." }} +

+

+ {{ .T "If this issue persists, don’t hesitate to contact @onetruemangoman on Discord or to email us at %s." `` | safe }} +

+
+{{ end }} diff --git a/src/templates/index.html.tmpl b/src/templates/index.html.tmpl new file mode 100644 index 0000000..9a26046 --- /dev/null +++ b/src/templates/index.html.tmpl @@ -0,0 +1,18 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +
+

{{ .T "The Euro Cash Compendium" }}

+

+ {{ .T "United in" }} + {{ .T "diversity" }} + {{ .T "cash" }} +

+
+
+
+

+ {{ .T "Welcome to the Euro Cash Compendium. This sites aims to be a resource for you to discover everything there is to know about the coins and banknotes of the Euro, a currency that spans 26 countries and 350 million people. We also have dedicated sections of the site for collectors." }} +

+
+{{ end }} diff --git a/src/templates/language.html.tmpl b/src/templates/language.html.tmpl new file mode 100644 index 0000000..f7affa1 --- /dev/null +++ b/src/templates/language.html.tmpl @@ -0,0 +1,48 @@ +{{ define "content" }} +
+ {{ template "navbar" . }} +

{{ .T "Select Your Language" }}

+
+
+

+ {{ .T "Select your preferred language to use on the site." }} +

+

+ If you are an American user, it’s suggested that you select + American English instead of British English. This will ensure that + dates will be formatted with the month before the day. +

+
+

{{ .T "Eurozone Languages" }}

+ {{ template "langgrid" true }} +

{{ .T "Other Languages" }}

+ {{ template "langgrid" false }} +
+{{ end }} + +{{ define "langgrid" }} +{{ $ez := . }} +
+
+ {{ range locales }} + {{ if eq $ez .Eurozone }} + + {{ end }} + {{ end }} +
+
+{{ end }} diff --git a/src/templates/navbar.html.tmpl b/src/templates/navbar.html.tmpl new file mode 100644 index 0000000..90f3cc7 --- /dev/null +++ b/src/templates/navbar.html.tmpl @@ -0,0 +1,228 @@ +{{ define "navbar" }} +
+{{ end }} -- cgit v1.2.3