diff --git a/i18n/en.yaml b/i18n/en.yaml index 7a0b527..5a10971 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -16,6 +16,12 @@ list: one: Subsection other: Subsections + categories: + other: Categories + + tags: + other: Tags + article: back: other: Back diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 79afb2f..7b15ae2 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -20,6 +20,12 @@ list: many: Подразделы other: Подразделы + categories: + other: Категории + + tags: + other: Теги + article: back: other: Назад diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9bc618d..4f2dd7c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,14 +4,27 @@ {{ if eq .Parent (.GetPage "/") }} {{ T "list.section" }} {{ else }} - {{ .Parent.Title }} + {{ T (printf "list.%s" .Parent.Title | urlize | lower) }} {{ end }}

{{ T "list.page" (len .Pages) }}

-

{{ .Title }}

+ + {{- $title := lower .Title -}} + {{- $section := lower .Section -}} + + {{- if eq $title $section -}} + {{- $title = T (printf "list.%s" .Title | urlize | lower) -}} + {{- else if eq $section "tags" -}} + {{- $title = T (printf "tags.%s" .Title | urlize | lower) -}} + {{- else -}} + {{- $title = .Title -}} + {{- end -}} + +

{{ $title }}

+ {{ with .Params.description }}

{{ . }}

{{ end }} diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html index 376512a..79e9784 100644 --- a/layouts/partials/article-list/compact.html +++ b/layouts/partials/article-list/compact.html @@ -1,12 +1,22 @@