From 7335c936e26a3b35b74451ac84d04aa34b80629a Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Thu, 3 Mar 2022 23:45:48 +0100 Subject: [PATCH] Adapt to new widget scheme --- layouts/partials/widget/categories.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/layouts/partials/widget/categories.html b/layouts/partials/widget/categories.html index b56f2bc..10c8a35 100644 --- a/layouts/partials/widget/categories.html +++ b/layouts/partials/widget/categories.html @@ -1,14 +1,16 @@ +{{- $context := .Context -}} +{{- $limit := default 10 .Params.limit -}}
-
- {{ partial "helper/icon" "categories" }} -
-

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

+
+ {{ partial "helper/icon" "categories" }} +
+

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

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