Skip to content

Commit

Permalink
🎨 Style: add scroll bar for auto toc (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed May 17, 2022
1 parent 791ff12 commit aa208e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
> Add hugo new features support.
> Snapshot:
- :art: Style: add scroll bar for auto toc ([#136](https://github.com/Lruihao/FixIt/issues/136))
- :arrow_up: Chore: update some third-party libraries
- **Full Changelog:** @Lruihao [`v0.2.14...v0.2.15`](https://github.com/Lruihao/FixIt/compare/v0.2.14...v0.2.15)

Expand Down
7 changes: 5 additions & 2 deletions assets/css/_partial/_single/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
font-size: $toc-content-font-size;

ul {
text-indent: -0.85rem;
text-indent: -0.8rem;
padding-left: 0.8rem;
list-style: none;

Expand Down Expand Up @@ -75,12 +75,15 @@
}

.toc-content {
overflow-y: scroll;
max-height: calc(100vh - #{2*$header-height});

&.always-active ul {
display: block;
}

> nav > ul {
margin: 0.625rem 0;
margin: 0;
}

ul {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ categories: ["documentation"]

lightgallery: true

toc:
auto: false

menu:
main:
name: "Basics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ categories: ["documentation"]

lightgallery: true

toc:
auto: false

menu:
main:
title: "探索 Hugo - FixIt 主题的全部内容和背后的核心概念。"
Expand Down

0 comments on commit aa208e2

Please sign in to comment.