Add anchor links to heading (#38)

* Closes #36
This commit is contained in:
Track3 2019-01-27 12:20:29 +08:00 committed by GitHub
parent 503a9a3934
commit 545a122d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 4 deletions

View file

@ -22,6 +22,7 @@ html {
background: $light-grey;
line-height: 1.6;
letter-spacing: .06em;
scroll-behavior: smooth;
}
body,
@ -534,6 +535,39 @@ hr.post-end {
padding: 0;
margin-left: 1.8em;
}
a.anchor {
float: left;
margin-left: -20px;
padding-right: 6px;
box-shadow: none;
opacity: .8;
&:hover {
background: none;
color: $theme;
opacity: 1;
}
svg {
display: inline-block;
width: 14px;
height: 14px;
vertical-align: baseline;
visibility: hidden;
}
&:focus svg {
visibility: visible;
}
}
h1:hover a.anchor svg,
h2:hover a.anchor svg,
h3:hover a.anchor svg,
h4:hover a.anchor svg,
h5:hover a.anchor svg,
h6:hover a.anchor svg {
visibility: visible;
}
}
.footnotes {