aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/templates/language.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/language.html.tmpl')
-rw-r--r--src/templates/language.html.tmpl31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/templates/language.html.tmpl b/src/templates/language.html.tmpl
index 768190c..c3bfa94 100644
--- a/src/templates/language.html.tmpl
+++ b/src/templates/language.html.tmpl
@@ -1,4 +1,6 @@
{{ define "header" }}
+{{ template "header-navbar" . }}
+
<style>
.lang-fade-in-out {
transition: opacity 1s;
@@ -7,6 +9,23 @@
opacity: 0;
}
}
+
+ .lang-grid {
+ --button-min-width: 22ch;
+
+ button {
+ display: flex;
+ align-items: center;
+ padding-block: 1ch;
+ text-align: left;
+
+ > :first-child {
+ font-size: 2em;
+ font-weight: 600; /* Between normal and bold */
+ min-width: calc(var(--pico-form-element-spacing-horizontal) + 2ch);
+ }
+ }
+ }
</style>
<script>
@@ -19,7 +38,7 @@
{{ $save := . }}
{{ $ps := .Printers }}
{{ range locales }}
- {{ if (and .Enabled (ne .Bcp $save.Printer.Bcp)) }}
+ {{ if (and .Enabledp (ne .Bcp $save.Printer.Bcp)) }}
[
"{{ .Bcp }}",
{{ $p := (index $ps .Bcp) }}
@@ -54,14 +73,14 @@
{{ end }}
{{ define "content" }}
-<header>
+<header class="container">
{{ template "navbar" . }}
<h1>
{{ .Get "Select Your Language" }}
<br><span class="lang-fade-in-out translation">&nbsp;</span>
</h1>
</header>
-<main>
+<main class="container">
<h2>
{{ .Get "Eurozone Languages" }}
<br><span class="lang-fade-in-out translation">&nbsp;</span>
@@ -79,14 +98,14 @@
{{ $p := index . 0 }}
{{ $ez := index . 1 }}
<form action="/language" method="POST">
- <div class="lang-grid">
+ <div class="button-grid lang-grid">
{{ range locales }}
- {{ if eq $ez .Eurozone }}
+ {{ if eq $ez .Eurozonep }}
<button
type="submit"
name="locale"
value="{{ .Bcp }}"
- {{ if not .Enabled }}
+ {{ if not .Enabledp }}
disabled
{{ end }}
>