diff options
author | Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> | 2022-07-15 09:52:35 +0000 |
---|---|---|
committer | Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> | 2022-07-15 09:52:35 +0000 |
commit | 52e33b2723159afc28ecdad36dae5bc51e52e47c (patch) | |
tree | b3f81d2ea8b4f5ba83057a37d2e75bba9f760a6f | |
parent | 00b86ae3ebfd4c66a06f4d4c175a4a9ec7bdc7d0 (diff) |
-rw-r--r-- | documentation/config/_default/config.toml | 1 | ||||
-rw-r--r-- | documentation/themes/beastie/assets/styles/global.scss | 73 |
2 files changed, 28 insertions, 46 deletions
diff --git a/documentation/config/_default/config.toml b/documentation/config/_default/config.toml index 087c0f5576..770088c989 100644 --- a/documentation/config/_default/config.toml +++ b/documentation/config/_default/config.toml @@ -37,6 +37,7 @@ enableGitInfo = true env-beastie = true isOnline = true skip-front-matter = true + sectanchors = true [outputs] home = [ "HTML" ] diff --git a/documentation/themes/beastie/assets/styles/global.scss b/documentation/themes/beastie/assets/styles/global.scss index c6e2bbaf6d..765d81b672 100644 --- a/documentation/themes/beastie/assets/styles/global.scss +++ b/documentation/themes/beastie/assets/styles/global.scss @@ -316,59 +316,40 @@ h6 { font-size: var(--size-300); } -h2, -h3, -h4, -h5, -h6 { - border-bottom: 1px solid var(--lines-color); -} +h2 > .anchor, +h3 > .anchor, +h4 > .anchor, +h5 > .anchor, +h6 > .anchor { + text-decoration: none; -h1 .anchor, -h2 .anchor, -h3 .anchor, -h4 .anchor, -h5 .anchor, -h6 .anchor, -h1 .link, -h2 .link, -h3 .link, -h4 .link, -h5 .link, -h6 .link { - text-decoration: none !important; - color: var(--global-font-color); + &:hover { + text-decoration: none; + } } -h1 .anchor, -h2 .anchor, -h3 .anchor, -h4 .anchor, -h5 .anchor, -h6 .anchor { +h2 > .anchor::before, +h3 > .anchor::before, +h4 > .anchor::before, +h5 > .anchor::before, +h6 > .anchor::before { visibility: hidden; - font-weight: normal; - margin-right: 5px; + margin-right: .3rem; + content: "#"; + color: var(--global-font-color); } -h1 .anchor::before, -h2 .anchor::before, -h3 .anchor::before, -h4 .anchor::before, -h5 .anchor::before, -h6 .anchor::before { - content: "\00a7"; -} +h2, +h3, +h4, +h5, +h6 { + border-bottom: 1px solid var(--lines-color); -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { - visibility: visible; - font-weight: normal; - margin-right: 5px; + &:hover .anchor::before { + visibility: visible; + transition: visibility 0s easy 0s; + } } hr { |