]> danix's work - danix.xyz-2.git/commitdiff
feat: make tag cloud heading optional, remove from homepage
authorDanilo M. <redacted>
Tue, 21 Apr 2026 21:55:40 +0000 (23:55 +0200)
committerDanilo M. <redacted>
Tue, 21 Apr 2026 21:55:40 +0000 (23:55 +0200)
themes/danix-xyz-hacker/layouts/index.html
themes/danix-xyz-hacker/layouts/partials/tag-cloud.html

index a290d6aa33469fb73bf911a425b03f65977c9858..fd3cfa00c6da35d5b37b35f080e789f4bca0109a 100644 (file)
@@ -52,7 +52,7 @@
 
     <!-- Tag Cloud Section -->
     <div class="mt-16 pt-8 border-t border-border">
-      {{ partial "tag-cloud.html" (dict "page" . "showCount" true "wrapInWidget" false "headingLevel" "h2") }}
+      {{ partial "tag-cloud.html" (dict "page" . "showCount" true "wrapInWidget" false) }}
     </div>
   </div>
 </section>
index a3e6299c4be0a35c67fbecee8e99331d69e18410..b896e8dc62d118093a58a30accc42ab9980f4d3f 100644 (file)
@@ -13,7 +13,7 @@
 {{- $page         := .page -}}
 {{- $showCount    := .showCount    | default true -}}
 {{- $heading      := .heading      | default (i18n "tagCloud") -}}
-{{- $headingLevel := .headingLevel | default "h2" -}}
+{{- $headingLevel := .headingLevel -}}
 {{- $wrapInWidget := .wrapInWidget | default false -}}
 {{- $maxTags      := .maxTags      | default 0 -}}
 
@@ -41,7 +41,8 @@
   <nav aria-label="{{ i18n "exploreTopics" }}">
     <div class="tag-cloud" data-tag-cloud>
 {{- else -}}
-<section aria-labelledby="tag-cloud-heading">
+<section {{- if $headingLevel }} aria-labelledby="tag-cloud-heading"{{ end }}>
+  {{- if $headingLevel -}}
   {{- if eq $headingLevel "h2" -}}
   <h2 id="tag-cloud-heading" class="text-lg font-semibold text-accent mb-4">{{ $heading }}</h2>
   {{- else if eq $headingLevel "h3" -}}
@@ -49,6 +50,7 @@
   {{- else -}}
   <p id="tag-cloud-heading" class="text-lg font-semibold text-accent mb-4">{{ $heading }}</p>
   {{- end -}}
+  {{- end -}}
   <nav aria-label="{{ i18n "exploreTopics" }}">
     <div class="tag-cloud" data-tag-cloud>
 {{- end -}}