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 }} -