Changesets · Branches · Tags · Compare
| Changeset | aba9e2e83ce63bd368bfa7317c2b6acf23c071fea892564817358dae8d8151b7 |
|---|---|
| Author | Dominik Weckmüller <47481567+do-me@users.noreply.github.com> · 2024-10-14 20:58 +02:00 |
| Committer | GitHub <noreply@github.com> · 2024-10-14 11:58 -07:00 |
| Parents | 16186d0dd1cf |
2 files changed
modified docs/mkdocs.yml +3 −0
| @@ -90,6 +90,9 @@ | ||
| 90 | 90 | - pymdownx.emoji: |
| 91 | 91 | emoji_index: !!python/name:material.extensions.emoji.twemoji |
| 92 | 92 | emoji_generator: !!python/name:material.extensions.emoji.to_svg |
| 93 | + - markdown.extensions.toc: | |
| 94 | + baselevel: 1 | |
| 95 | + permalink: "" | |
| 93 | 96 | |
| 94 | 97 | nav: |
| 95 | 98 | - Home: |
modified docs/src/styles/extra.css +43 −1
| @@ -39,4 +39,46 @@ | ||
| 39 | 39 | height: 1.2rem; |
| 40 | 40 | margin-top: -.1rem; |
| 41 | 41 | } |
| 42 | - } | |
| No newline at the end of the file | ||
| 42 | + } | |
| 43 | + | |
| 44 | +/* remove pilcrow as permanent link and add chain icon similar to github https://github.com/squidfunk/mkdocs-material/discussions/3535 */ | |
| 45 | + | |
| 46 | +.headerlink { | |
| 47 | + --permalink-size: 16px; /* for font-relative sizes, 0.6em is a good choice */ | |
| 48 | + --permalink-spacing: 4px; | |
| 49 | + | |
| 50 | + width: calc(var(--permalink-size) + var(--permalink-spacing)); | |
| 51 | + height: var(--permalink-size); | |
| 52 | + vertical-align: middle; | |
| 53 | + background-color: var(--md-default-fg-color--lighter); | |
| 54 | + background-size: var(--permalink-size); | |
| 55 | + mask-size: var(--permalink-size); | |
| 56 | + -webkit-mask-size: var(--permalink-size); | |
| 57 | + mask-repeat: no-repeat; | |
| 58 | + -webkit-mask-repeat: no-repeat; | |
| 59 | + visibility: visible; | |
| 60 | + mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg>'); | |
| 61 | + -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg>'); | |
| 62 | +} | |
| 63 | + | |
| 64 | +[id]:target .headerlink { | |
| 65 | + background-color: var(--md-typeset-a-color); | |
| 66 | +} | |
| 67 | + | |
| 68 | +.headerlink:hover { | |
| 69 | + background-color: var(--md-accent-fg-color) !important; | |
| 70 | +} | |
| 71 | + | |
| 72 | +@media screen and (min-width: 76.25em) { | |
| 73 | + h1, h2, h3, h4, h5, h6 { | |
| 74 | + display: flex; | |
| 75 | + align-items: center; | |
| 76 | + flex-direction: row; | |
| 77 | + column-gap: 0.2em; /* fixes spaces in titles */ | |
| 78 | + } | |
| 79 | + | |
| 80 | + .headerlink { | |
| 81 | + order: -1; | |
| 82 | + margin-left: calc(var(--permalink-size) * -1 - var(--permalink-spacing)) !important; | |
| 83 | + } | |
| 84 | +} |