on master help sign in
Add anchor styling and template
commit2a993c0f4745fd4ea8b06532acd7952ae567236b authorYaseen <yaseen.nvt@gmail.com> dateWed 20 Jan 2021, 11:24 (6 years ago) parent6f17e40
2 files changed+21
sass/_main.scss+19 templates/anchor-link.html+2
sass/_main.scss+19
@@ -650,3 +650,22 @@ hr {
650650nav::-webkit-scrollbar {
651651 display: none;
652652}
653+
654+
655+// custom anchor styling
656+a.zola-anchor {
657+ visibility: hidden;
658+ padding: 0 0.1rem;
659+ &:hover {
660+ background-color: black;
661+ color: white;
662+ }
663+}
664+
665+h1, h2, h3, h4, h5, h6 {
666+ &:hover > a.zola-anchor {
667+ visibility: visible;
668+ border-bottom-style: none;
669+ }
670+}
671+
templates/anchor-link.htmlnew file+2
@@ -0,0 +1,2 @@
1+<!-- original at https://github.com/getzola/zola/blob/29b073640e26d96ab167c88ca70b18660f176cb4/docs/sass/_docs.scss#L48 -->
2+<a class="zola-anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}">¶</a>