aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-07-30 02:08:59 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-07-30 02:08:59 +0200
commitf3a324d9eb72c0f00d952a8d46e0487805fa969d (patch)
tree1328fa4f32e5568a200edb98ec44db753cdea42d
parente84adb52994a2c75269ba0180d9c30a49f083bcf (diff)
Add the .translation class
-rw-r--r--src/templates/language.html.tmpl11
-rw-r--r--static/style.css15
2 files changed, 18 insertions, 8 deletions
diff --git a/src/templates/language.html.tmpl b/src/templates/language.html.tmpl
index a79e30c..8c86e11 100644
--- a/src/templates/language.html.tmpl
+++ b/src/templates/language.html.tmpl
@@ -1,11 +1,6 @@
{{ define "header" }}
<style>
- *:has(> .lang-fade-in-out) {
- line-height: 1.1;
- }
-
.lang-fade-in-out {
- opacity: 0.5;
transition: opacity 1s;
&.hide {
@@ -72,18 +67,18 @@
{{ template "navbar" . }}
<h1>
{{ .Get "Select Your Language" }}
- <br><span class="lang-fade-in-out"></span>
+ <br><span class="lang-fade-in-out translation"></span>
</h1>
</header>
<main>
<h2>
{{ .Get "Eurozone Languages" }}
- <br><span class="lang-fade-in-out"></span>
+ <br><span class="lang-fade-in-out translation"></span>
</h2>
{{ template "langgrid" true }}
<h2>
{{ .Get "Other Languages" }}
- <br><span class="lang-fade-in-out"></span>
+ <br><span class="lang-fade-in-out translation"></span>
</h2>
{{ template "langgrid" false }}
</main>
diff --git a/static/style.css b/static/style.css
index 5a3bca5..2ceee0c 100644
--- a/static/style.css
+++ b/static/style.css
@@ -2288,4 +2288,19 @@ dl dt:not(:first-child) {
.error {
color: var(--del-color);
+}
+
+/* Intended for use in constructions such as:
+ * <h3>
+ * Austrian National Bank<br>
+ * <span lang="de">Oesterreichische Nationalbank</span>
+ * </h3>
+ */
+
+*:has(> .translation) {
+ line-height: 1.1;
+}
+
+.translation {
+ opacity: 0.5;
} \ No newline at end of file