mirror of
https://github.com/tomfran/typo.git
synced 2025-04-25 21:19:55 +03:00
Merge pull request #49 from runofthemillgeek/feat/heading-anchors
Add article heading anchors
This commit is contained in:
commit
5ee19e964c
2 changed files with 17 additions and 0 deletions
|
@ -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);
|
||||
|
|
4
layouts/_default/_markup/render-heading.html
Normal file
4
layouts/_default/_markup/render-heading.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<h{{ .Level }} class="heading" id="{{ .Anchor }}">
|
||||
{{ .Text }}
|
||||
<a href="#{{ .Anchor }}">#</a>
|
||||
</h{{ .Level }}>
|
Loading…
Add table
Add a link
Reference in a new issue