mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
feat(i): update TOC dialog logic to use 'hasToc' instead of 'enableTocDialog'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251124100610-99fd4fb7" -}}
|
||||
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251128063828-ffe0c3bd" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- /* toc dialog button */ -}}
|
||||
{{- if .Page.Store.Get "enableTocDialog" -}}
|
||||
{{- if .Page.Store.Get "hasToc" -}}
|
||||
<div id="toc-drawer-button" class="fixed-button toc-drawer-button d-none{{ with $params.password }} encrypted-hidden{{ end }}" role="button" aria-label="{{ T `single.contents` }}">
|
||||
{{- dict "Class" "fa-solid fa-bars fa-fw" | partial "plugin/icon.html" -}}
|
||||
</div>
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
{{- /* TOC Dialog */ -}}
|
||||
{{- if $showToc -}}
|
||||
{{- .Page.Store.Set "enableTocDialog" true -}}
|
||||
{{- .Page.Store.Set "hasToc" true -}}
|
||||
<dialog id="toc-dialog" aria-labelledby="toc-dialog-title" role="dialog">
|
||||
<div class="toc">
|
||||
<h2 class="toc-title">{{ T "single.contents" }}</h2>
|
||||
|
||||
Reference in New Issue
Block a user