From b13a23bbc494d3541e4367492e1af2cc40d8789b Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Thu, 26 Mar 2026 14:59:30 +0530 Subject: [PATCH] Refactor all templates to dictpress v5 (Rust/Tera templates). --- base.html | 151 +++--- glossary-words.html | 21 +- glossary.html | 36 +- index.html | 17 +- lang.json | 28 +- message.html | 12 +- pages/about.html | 21 +- pagination.html | 39 ++ results.html | 155 +++--- search.html | 20 +- static/alar.js | 7 +- static/autocomp.js | 19 +- static/edit.svg | 1 + static/export.svg | 3 +- static/flexit.css | 135 ------ static/link.svg | 1 + static/main.js | 204 ++++---- static/oat.min.css | 1 + static/oat.min.js | 1 + static/share.js | 545 ++++++++------------- static/style.css | 1120 ++++++++++++++++--------------------------- submit-new.html | 80 ++-- 22 files changed, 1032 insertions(+), 1585 deletions(-) create mode 100644 pagination.html create mode 100644 static/edit.svg delete mode 100644 static/flexit.css create mode 100644 static/link.svg create mode 100644 static/oat.min.css create mode 100644 static/oat.min.js diff --git a/base.html b/base.html index c287153..693f494 100644 --- a/base.html +++ b/base.html @@ -1,111 +1,104 @@ -{{- define "header" -}} - + - {{ block "meta" . -}} + {% block meta %} - {{- if eq .Data.PageType "/" }} {{- .L.T "global.siteName" -}} - {{- else if eq .Data.PageType "glossary" }}{{- .L.Ts "public.glossary" "lang" (title .Data.Glossary.FromLang) -}} - {{- else if eq .Data.PageType "search" }}{{- .L.Ts "public.searchTitle" "query" .Data.Query.Query "fromLang" .Data.Query.ToLang -}} - {{- else if ne .Data.Title "" }}{{ .Data.Title }} - {{- end -}} + {%- if page_type == "/" %} {{ t(key="global.siteTitle") }} + {%- elif page_type == "glossary" %}{{ ts(key="public.glossaryTitle", lang=from_lang_name) }} - {{ t(key="global.siteName") }} + {%- elif page_type == "search" %}{{ ts(key="public.searchTitle", query=query, to_lang=to_lang_name | lower) }} - {{ t(key="global.siteName") }} + {%- elif title %}{{ title }} - {{ t(key="global.siteName") }} + {%- endif -%} - {{- end }} - - + {%- if page_type == "/" %}{{ t(key="public.mainTitle") }} + {%- elif page_type == "glossary" %}{{ ts(key="public.glossaryTitle", lang=from_lang_name) }} + {%- elif page_type == "search" %}{{ ts(key="public.searchDescription", from_lang=from_lang_name, query=query, to_lang=to_lang_name) }} + {%- elif description %}{{ description }} + {%- else %}{% block description %}{% endblock %} + {%- endif -%}" /> + {% endblock %} + - - - - + + + - +
-
+
-
-
-{{ end}} -{{ define "footer" }} -
+ -
-
-
-

{{ .L.T "public.submitTitle" }}

- -

- - -

-
-
+ + + - -{{ end }} diff --git a/glossary-words.html b/glossary-words.html index 6b4a01c..13f5d3c 100644 --- a/glossary-words.html +++ b/glossary-words.html @@ -1,13 +1,10 @@ -{{ define "glossary-words" }} -{{ $g := .Data.Glossary }} -{{ if not $g.Words }} -

{{ $.L.T "public.noResultsTitle" }}

-

{{ $.L.T "public.noResults" }}

-{{ else }} -