Skip to content

Commit 15eb435

Browse files
committed
Sticky table of contents
1 parent 39dec14 commit 15eb435

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

themes/vocabulary_theme/templates/page-with-toc.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h1>{{ this.title }}</h1>
8585
</aside>
8686
{% endif %}
8787
</div>
88-
<div class="row">
88+
<div class="row padding-bottom-normal sticky-top">
8989
<h4 class="b-header">On this page</h4>
9090
<aside class="menu table-of-contents">
9191
<ul class="menu-list">

webpack/sass/main.scss

+8-2
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ code {
550550

551551
.project-idea {
552552
@extend .padding-bottom-xl;
553-
553+
554554
.column {
555555
@extend .padding-top-normal;
556556
}
@@ -577,7 +577,7 @@ code {
577577
@extend .caption;
578578

579579
text-decoration: none;
580-
580+
581581
.icon {
582582
@extend .padding-right-small;
583583
}
@@ -593,3 +593,9 @@ code {
593593
@extend .padding-bottom-xxl;
594594
}
595595
}
596+
597+
// Sticky utility function
598+
.sticky-top {
599+
position: sticky;
600+
top: 0;
601+
}

0 commit comments

Comments
 (0)