From a34ffcce23fe34a36f9c719b44cd6d5ae34b1fcc Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 8 Aug 2024 13:55:14 +0200 Subject: Add /coins --- main.go | 1 + templates/coins_index.templ | 53 +++++++++++++++++++++++++++++++++++++++++++++ templates/navbar.templ | 4 +--- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 templates/coins_index.templ diff --git a/main.go b/main.go index e2a66ba..244a0ac 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,7 @@ import ( var components = map[string]templ.Component{ "/": templates.Index(), "/about": templates.About(), + "/coins": templates.CoinsIndex(), "/language": templates.Language(), } diff --git a/templates/coins_index.templ b/templates/coins_index.templ new file mode 100644 index 0000000..346cc04 --- /dev/null +++ b/templates/coins_index.templ @@ -0,0 +1,53 @@ +package templates + +import "git.thomasvoss.com/euro-cash.eu/i18n" + +const newsLinkStart = `` + +templ CoinsIndex() { + {{ p := ctx.Value("printer").(i18n.Printer) }} +
+ @navbar() +

{ p.T("Euro Coins") }

+
+
+

+ @templ.Raw(p.T("On this section of the site you can find everything there is to know about the coins of the Eurozone. For the latest news on coin- and design releases, check out the %snews%s tab!", newsLinkStart, linkEnd)) +

+
+
+ +
+
+} diff --git a/templates/navbar.templ b/templates/navbar.templ index 4e1d104..384e1de 100644 --- a/templates/navbar.templ +++ b/templates/navbar.templ @@ -4,17 +4,15 @@ import "git.thomasvoss.com/euro-cash.eu/i18n" templ navbar() { {{ p := ctx.Value("printer").(i18n.Printer) }} -