Refactor all templates to dictpress v5 (Rust/Tera templates).

This commit is contained in:
2026-03-26 14:59:30 +05:30
parent c07b8331c3
commit b13a23bbc4
22 changed files with 1032 additions and 1585 deletions
+9 -12
View File
@@ -1,13 +1,10 @@
{{ define "glossary-words" }}
{{ $g := .Data.Glossary }}
{{ if not $g.Words }}
<h2>{{ $.L.T "public.noResultsTitle" }}</h2>
<p>{{ $.L.T "public.noResults" }}</p>
{{ else }}
<ul class="noul words">
{{ range $i, $w := $g.Words }}
<li><a href="/dictionary/{{ UnicodeURL $g.FromLang }}/{{ UnicodeURL $g.ToLang }}/{{ UnicodeURL (index $w.Content 0) }}">{{ $w.Content | join ", " }}</a></li>
{{ end }}
{% if not glossary.words or glossary.words | length == 0 %}
<h2>{{ t(key="public.noResultsTitle") }}</h2>
<p>{{ t(key="public.noResults") }}</p>
{% else %}
<ul class="unstyled words">
{% for w in glossary.words %}
<li><a href="{{ consts.root_url }}/dictionary/{{ glossary.from_lang | urlencode }}/{{ glossary.to_lang | urlencode }}/{{ w.content.0 | urlencode }}">{{ w.content | join(sep=", ") }}</a></li>
{% endfor %}
</ul>
{{ end }}
{{ end }}
{% endif %}