Compare commits
2 Commits
72347769c3
...
165d0b7042
| Author | SHA1 | Date | |
|---|---|---|---|
| 165d0b7042 | |||
| cf125809bd |
@@ -71,6 +71,8 @@
|
|||||||
|
|
||||||
{#if tocEntries.length > 0}
|
{#if tocEntries.length > 0}
|
||||||
<div class="{type ? "toc-container-side" : "toc-container"} blurred-background">
|
<div class="{type ? "toc-container-side" : "toc-container"} blurred-background">
|
||||||
|
<p class="toc-header">on this page</p>
|
||||||
|
|
||||||
<ul class="toc-list">
|
<ul class="toc-list">
|
||||||
{#each tocEntries as entry}
|
{#each tocEntries as entry}
|
||||||
{@render tocEntryLine({ entry })}
|
{@render tocEntryLine({ entry })}
|
||||||
@@ -100,11 +102,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toc-container-side {
|
.toc-container-side {
|
||||||
--padding-indent-base: 24px;
|
--padding-indent-base: 20px;
|
||||||
--padding-level-indent: 24px;
|
--padding-level-indent: var(--padding-indent-base);
|
||||||
|
|
||||||
width: 400px;
|
/* width: 300px; */
|
||||||
margin: 32px 12px 0 12px;
|
margin-left: 12px;
|
||||||
|
margin-right: 12px;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 64px;
|
top: 64px;
|
||||||
border-left: var(--border-style) var(--border-dash-size) var(--color-highlight);
|
border-left: var(--border-style) var(--border-dash-size) var(--color-highlight);
|
||||||
@@ -120,6 +123,14 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toc-header {
|
||||||
|
margin: 0 var(--padding-indent-base);
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--color-highlight);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
}
|
||||||
|
|
||||||
.toc-list a {
|
.toc-list a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -36,30 +36,43 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
width: var(--page-width);
|
max-width: var(--page-width);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
max-width: var(--page-width);
|
||||||
flex-direction: row;
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-sidebar-main-container {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side {
|
.side {
|
||||||
width: fit-content;
|
width: 100%;
|
||||||
|
margin-top: 32px;
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.content {
|
.content {
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
flex-direction: column;
|
width: 100%;
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side {
|
.side {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
margin-top: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
order: -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user