1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-15 05:25:33 -04:00

add anchor links to content sub-headings

forked anchor-js: https://github.com/jakejarvis/simple-anchor
This commit is contained in:
2021-08-30 14:01:13 -04:00
parent 5e3507a594
commit 1ed75bb763
6 changed files with 108 additions and 69 deletions

View File

@@ -55,6 +55,35 @@ div#content {
padding-left: 0.25em;
}
}
// AnchorJS styles
h2,
h3,
h4 {
a.anchorjs-link {
display: inline-block;
margin-left: 0.25em;
padding-left: 0.25em;
padding-right: 0.5em;
opacity: 0;
font-weight: 300;
background: none;
&::before {
content: "\0023"; // pound sign
}
@include themes.themed(color, "medium-light");
&:hover {
@include themes.themed(color, "links");
}
}
&:hover > a.anchorjs-link {
opacity: 1;
}
}
}
// Responsive