Skip to content

Commit 6bf8f9d

Browse files
committed
docs: keep the page tree in place while the footer scrolls in
The footer sat after the layout grid, so the sticky tree hit the grid's end and scrolled away with it, taking the search box and the first pages off screen. The footer is now a row of the grid under the article, and the tree spans both rows, so it holds its place to the bottom of the page. Signed-off-by: ravindu644 <droidcasts@protonmail.com>
1 parent 90b7ca9 commit 6bf8f9d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎assets/css/main.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ html { scroll-padding-top: 80px; } /* an anchor lands below the 64px sticky nav,
8686

8787
@media (min-width: 840px) {
8888
.docs-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
89+
/* the footer is a row of the grid, under the article only, so the sticky tree keeps its place
90+
while the footer scrolls in; outside the grid the tree scrolled away with the grid's end */
91+
.docs-layout .footer { grid-column: 2 / -1; }
8992
.sidebar {
9093
display: block;
94+
grid-row: 1 / -1;
9195
position: sticky;
9296
inset: 64px auto auto; /* undo the popover's inset: 0 */
9397
width: auto;

‎template.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<aside class="toc-column">
4646
{{TOC}}
4747
</aside>
48+
{{FOOTER}}
4849
</div>
4950
<dialog class="search-dialog" aria-label="Search the docs">
5051
<form method="dialog" class="search-form">
@@ -54,7 +55,6 @@
5455
</form>
5556
<ul class="search-results"></ul>
5657
</dialog>
57-
{{FOOTER}}
5858
<script src="/assets/js/site.js" defer></script>
5959
<script src="/assets/js/docs.js" defer></script>
6060
</body>

0 commit comments

Comments
 (0)