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
+18 -18
View File
@@ -1,22 +1,22 @@
{{ define "glossary" }}
{{ template "header" . }}
{% extends "base.html" %}
{% block content %}
<section class="content glossary">
{{ if not .Data.Initials }}
<h2>{{ .L.T "public.glossaryTitle" }}</h2>
<p>{{ .L.T "public.noResults" }}</p>
{{ else }}
<nav class="index">
{{ range $k, $a := .Data.Initials }}
<a href="{{ UnicodeURL $a }}"{{ if eq $a $.Data.Initial }} class="sel"{{ end }}>{{ $a }}</a>
{{ end }}
</nav>
{% if not initials or initials | length == 0 %}
<h2>{{ t(key="public.glossaryTitle") }}</h2>
<p>{{ t(key="public.noResults") }}</p>
{% else %}
<menu class="index buttons" aria-label="Alphabetical index">
{% for a in initials %}
<li><a href="{{ consts.root_url }}/glossary/{{ glossary.from_lang }}/{{ glossary.to_lang }}/{{ a | urlencode }}" class="button {% if a == initial %}small{% else %}ghost small{% endif %}">{{ a }}</a></li>
{% endfor %}
</menu>
<nav class="pagination top">{{ .Data.PgBar }}</nav>
{{ template "glossary-words" . }}
<nav class="pagination bottom">{{ .Data.PgBar }}</nav>
{{ end}}
<nav class="pagination top align-center mb-6" aria-label="Top pagination">{% include "pagination.html" %}</nav>
{% include "glossary-words.html" %}
<nav class="pagination bottom align-center mt-6" aria-label="Bottom pagination">{% include "pagination.html" %}</nav>
{% endif %}
</section>
{{ template "footer" . }}
{{ end }}
{% endblock %}