mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
fix(toc): too wide when no related contents
This commit is contained in:
@@ -33,17 +33,13 @@
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
{{ $enableToc := .Params.showTableOfContents | default (site.Params.list.showTableOfContents | default false) }}
|
||||
{{ $showToc := and $enableToc (in .TableOfContents "<ul") }}
|
||||
{{ $showRelated := site.Params.article.showRelatedPosts | default false }}
|
||||
{{ $topClass := cond (hasPrefix site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
|
||||
{{ if or $showToc $showRelated }}
|
||||
<div class="order-first lg:ml-auto px-0 lg:order-last lg:ps-8">
|
||||
{{ if $showToc }}
|
||||
<div class="order-first lg:ml-auto px-0 lg:order-last lg:ps-8 lg:max-w-2xs">
|
||||
<div class="toc ps-5 print:hidden lg:sticky {{ $topClass }}">
|
||||
{{ if $showToc }}
|
||||
{{ partial "toc.html" . }}
|
||||
{{ end }}
|
||||
{{ if $showRelated }}
|
||||
sd
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user