From 6f5553a8b9f8b5753856d8693f6fd4e18e8bac4b Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 28 Jan 2022 17:26:40 +0100 Subject: [PATCH] Add category widget Adds the ability to add a category to the widgets. --- assets/icons/categories.svg | 9 +++++++++ i18n/en.yaml | 3 +++ layouts/partials/widget/categories.html | 14 ++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 assets/icons/categories.svg create mode 100644 layouts/partials/widget/categories.html diff --git a/assets/icons/categories.svg b/assets/icons/categories.svg new file mode 100644 index 0000000..e00ab1d --- /dev/null +++ b/assets/icons/categories.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/i18n/en.yaml b/i18n/en.yaml index 0197d89..3d0ed03 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -51,6 +51,9 @@ widget: tagCloud: title: other: Tags + categoriesCloud: + title: + other: Categories search: title: diff --git a/layouts/partials/widget/categories.html b/layouts/partials/widget/categories.html new file mode 100644 index 0000000..b56f2bc --- /dev/null +++ b/layouts/partials/widget/categories.html @@ -0,0 +1,14 @@ +
+
+ {{ partial "helper/icon" "categories" }} +
+

{{ T "widget.categoriesCloud.title" }}

+ +
+ {{ range first .Site.Params.widgets.categoriesCloud.limit .Site.Taxonomies.categories.ByCount }} + + {{ .Page.Title }} + + {{ end }} +
+