feat(widgets): link widget titles to their respective pages (#1277)
- archives.html: Link the "Archives" title to the archives page, consistent with how individual year links already work - taxonomy.html: Change showLink default from false to true so tag-cloud and categories widget titles link to their taxonomy listing pages by default Widget titles are the primary affordance users interact with, so linking them to the full listing page improves navigation. The showLink param can still be set to false to disable this. Co-authored-by: delize <4028612+delize@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,11 @@
|
|||||||
<div class="widget-icon">
|
<div class="widget-icon">
|
||||||
{{ partial "helper/icon" "infinity" }}
|
{{ partial "helper/icon" "infinity" }}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
<h2 class="widget-title section-title">
|
||||||
|
<a href="{{ $archivesPage.RelPermalink }}">
|
||||||
|
{{ T "widget.archives.title" }}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
{{ $pages := partial "helper/pages.html" $context.Site.Home }}
|
{{ $pages := partial "helper/pages.html" $context.Site.Home }}
|
||||||
{{ $archives := $pages.GroupByDate "2006" }}
|
{{ $archives := $pages.GroupByDate "2006" }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
{{- $widgetTitle := .Params.title -}}
|
{{- $widgetTitle := .Params.title -}}
|
||||||
{{- $limit := default 10 .Params.limit -}}
|
{{- $limit := default 10 .Params.limit -}}
|
||||||
{{- $icon := default .Params.taxonomy .Params.icon -}}
|
{{- $icon := default .Params.taxonomy .Params.icon -}}
|
||||||
{{- $showLink := default false .Params.showLink -}}
|
{{- $showLink := default true .Params.showLink -}}
|
||||||
|
|
||||||
<section class="widget tagCloud">
|
<section class="widget tagCloud">
|
||||||
<div class="widget-icon">
|
<div class="widget-icon">
|
||||||
|
|||||||
Reference in New Issue
Block a user