style(list): see details

- Align list TOC wrapper with single TOC wrapper
- Adjust margin
This commit is contained in:
ZhenShuo Leo
2026-01-06 16:10:48 +08:00
parent 8c8a914fa9
commit 1d275134ad
3 changed files with 13 additions and 18 deletions

View File

@@ -10,7 +10,6 @@
"Courier New", monospace;
--spacing: 0.25rem;
--container-2xs: 18rem;
--container-xs: 20rem;
--container-md: 28rem;
--container-xl: 36rem;
--container-3xl: 48rem;
@@ -971,6 +970,9 @@
.mb-3 {
margin-bottom: calc(var(--spacing) * 3);
}
.mb-4 {
margin-bottom: calc(var(--spacing) * 4);
}
.mb-5 {
margin-bottom: calc(var(--spacing) * 5);
}
@@ -3006,16 +3008,16 @@
margin-inline: auto;
}
}
.lg\:ms-auto {
@media (width >= 1024px) {
margin-inline-start: auto;
}
}
.lg\:mt-0 {
@media (width >= 1024px) {
margin-top: calc(var(--spacing) * 0);
}
}
.lg\:ml-auto {
@media (width >= 1024px) {
margin-left: auto;
}
}
.lg\:block {
@media (width >= 1024px) {
display: block;
@@ -3066,11 +3068,6 @@
max-width: none;
}
}
.lg\:max-w-xs {
@media (width >= 1024px) {
max-width: var(--container-xs);
}
}
.lg\:grid-flow-col-dense {
@media (width >= 1024px) {
grid-auto-flow: column dense;

View File

@@ -43,10 +43,10 @@
{{/* Description (markdown content) */}}
{{ $tocMargin := cond $showToc "mt-12" "mt-0" }}
{{ $topClass := cond (hasPrefix site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
<section class="{{ $tocMargin }} prose flex max-w-full flex-col dark:prose-invert lg:flex-row">
<section class="{{ $tocMargin }} prose flex max-w-full flex-col dark:prose-invert lg:flex-row mb-10">
{{ if $showToc }}
<div class="order-first px-0 lg:order-last lg:max-w-xs lg:ps-8">
<div class="toc ps-5 lg:sticky {{ $topClass }}">
<div class="order-first lg:ms-auto px-0 lg:order-last lg:ps-8 lg:max-w-2xs">
<div class="toc ps-5 print:hidden lg:sticky {{ $topClass }}">
{{ partial "toc.html" . }}
</div>
</div>

View File

@@ -36,11 +36,9 @@
{{ $showToc := and $enableToc (in .TableOfContents "<ul") }}
{{ $topClass := cond (hasPrefix site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
{{ if $showToc }}
<div class="order-first lg:ml-auto px-0 lg:order-last lg:ps-8 lg:max-w-2xs">
<div class="order-first lg:ms-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 }}
{{ partial "toc.html" . }}
</div>
</div>
{{ end }}