diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-09-21 11:49:47 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-09-21 11:49:47 +0200 |
commit | 8ece9e8a6de8e0dd1d5ee0318884e9a4e131b026 (patch) | |
tree | 41dafaee9597a1a5b61d49358f60354a1af99ef9 /template.old/language.templ | |
parent | 141b94b694efa7663e113ccf4b3f08aea08a84f8 (diff) |
Remove the template.old/ directory
Diffstat (limited to 'template.old/language.templ')
-rw-r--r-- | template.old/language.templ | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/template.old/language.templ b/template.old/language.templ deleted file mode 100644 index 1b48295..0000000 --- a/template.old/language.templ +++ /dev/null @@ -1,54 +0,0 @@ -package template - -import ( - "strings" - - "git.thomasvoss.com/euro-cash.eu/lib" -) - -templ Language() { - {{ p := ctx.Value("printer").(lib.Printer) }} - <header> - @navbar() - <h1>{ p.T("Select Your Language") }</h1> - </header> - <main> - <p> - { p.T("Select your preferred language to use on the site.") } - </p> - <p> - 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. - </p> - <hr/> - <h2>{ p.T("Eurozone Languages") }</h2> - @languageGrid(true) - <h2>{ p.T("Other Languages") }</h2> - @languageGrid(false) - </main> -} - -templ languageGrid(eurozone bool) { - <form action="/language" method="POST"> - <div class="lang-grid"> - for _, loc := range lib.Locales { - if loc.Eurozone == eurozone { - <button - type="submit" - name="locale" - value={ loc.Bcp } - disabled?={ !loc.Enabled } - > - <span - lang={ loc.Bcp } - data-code={ strings.ToUpper(loc.Language()) } - > - { loc.Name } - </span> - </button> - } - } - </div> - </form> -} |