-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always show the TOC regardless of the screen sizes if the sideba…
…r is disabled.
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
{{- if partial "functions/toc" . -}} | ||
<div id="postTOC" class="mt-2 mb-4 d-block d-xxl-none"> | ||
{{ $withoutSidebar := eq .Params.sidebar false }} | ||
<div id="postTOC" class="mt-2 mb-4{{ if not $withoutSidebar }} d-block d-xxl-none{{ end }}"> | ||
<h2 class="text-surface mb-3">{{ i18n "table_of_contents" }}</h2> | ||
<div id="post-toc-container"> | ||
{{/* Output the TOC if sidebar is disabled. */}} | ||
{{ if eq .Params.sidebar false }}{{ .TableOfContents }}{{ end }} | ||
{{- if $withoutSidebar }} | ||
{{- .TableOfContents -}} | ||
{{ end -}} | ||
</div> | ||
</div> | ||
{{- end -}} |