]> danix's work - danix.xyz-2.git/commitdiff
fix: render headingLevel dynamically with conditional blocks instead of variable...
authorDanilo M. <redacted>
Tue, 21 Apr 2026 21:54:19 +0000 (23:54 +0200)
committerDanilo M. <redacted>
Tue, 21 Apr 2026 21:54:19 +0000 (23:54 +0200)
themes/danix-xyz-hacker/layouts/partials/tag-cloud.html

index 99a5d98b91678a40fc9f31a3397d321b75f542fb..a3e6299c4be0a35c67fbecee8e99331d69e18410 100644 (file)
     <div class="tag-cloud" data-tag-cloud>
 {{- else -}}
 <section aria-labelledby="tag-cloud-heading">
-  <{{ $headingLevel }} id="tag-cloud-heading" class="text-lg font-semibold text-accent mb-4">
-    {{ $heading }}
-  </{{ $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" -}}
+  <h3 id="tag-cloud-heading" class="text-lg font-semibold text-accent mb-4">{{ $heading }}</h3>
+  {{- else -}}
+  <p id="tag-cloud-heading" class="text-lg font-semibold text-accent mb-4">{{ $heading }}</p>
+  {{- end -}}
   <nav aria-label="{{ i18n "exploreTopics" }}">
     <div class="tag-cloud" data-tag-cloud>
 {{- end -}}