From 95d551b945951538cf5683f4c111d0710d8fce68 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Mon, 27 Jan 2020 22:38:45 +0300 Subject: [PATCH] Fix #3: add categories support --- i18n/en.yaml | 10 ++++++++-- i18n/ru.yaml | 10 ++++++++-- layouts/_default/list.html | 10 ++++++++++ layouts/_default/single.html | 10 ++++++++++ layouts/index.html | 10 ++++++++++ layouts/taxonomy/category.html | 28 ++++++++++++++++++++++++++++ static/css/style.css | 12 ++++++++++++ 7 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 layouts/taxonomy/category.html diff --git a/i18n/en.yaml b/i18n/en.yaml index 252ab12..60c2224 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -17,13 +17,19 @@ tag: other: "tag" Tags: - other: "tags" + other: "Tags" Posts: other: "Posts" +category: + other: "category" + Categories: other: "Categories" toAllTags: - other: "To all tags" \ No newline at end of file + other: "to all tags" + +toAllCategories: + other: "to all categories" \ No newline at end of file diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 148c414..53fa1b2 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -14,7 +14,7 @@ toOldPosts: other: "к старым записям" tag: - other: "Тег" + other: "тег" Tags: other: "Теги" @@ -22,8 +22,14 @@ Tags: Posts: other: "Записи" +category: + other: "Категория" + Categories: other: "Категории" toAllTags: - other: "Ко списку всех тегов" \ No newline at end of file + other: "ко списку всех тегов" + +toAllCategories: + other: "ко списку всех категорий" \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1ee2aa7..2bd7b70 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -14,6 +14,16 @@ {{ if .Params.date }}
{{ .Params.date.Format "2006-01-02" }}
{{ end }} + {{ if .Params.categories }} + + {{ end }} + {{ if and (.Params.categories) (.Params.tags) }} + | + {{ end }} {{ if .Params.tags }}