diff options
-rw-r--r-- | assets/css/main.css | 15 | ||||
-rw-r--r-- | layouts/_default/_markup/render-heading.html | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/assets/css/main.css b/assets/css/main.css index d95ca04..4bcad33 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -37,6 +37,19 @@ h6 { margin-bottom: var(--hx-margin-bottom); } +.heading { + a { + text-decoration: none; + color: var(--content-secondary); + visibility: hidden; + font-size: 0.95em; + } + + &:hover a { + visibility: visible; + } +} + p { margin-top: var(--p-margin-top); margin-bottom: var(--p-margin-bottom); @@ -527,4 +540,4 @@ blockquote { blockquote p { margin-left: 1rem; margin-right: 1rem; -}
\ No newline at end of file +} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..44430d6 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,4 @@ +<h{{ .Level }} class="heading" id="{{ .Anchor }}"> + {{ .Text }} + <a href="#{{ .Anchor }}">#</a> +</h{{ .Level }}> |