on master help sign in
Add anchor styling and template
2a993c0Yaseen
sass/_main.scss+19
@@ -650,3 +650,22 @@ hr {
650nav::-webkit-scrollbar {
650nav::-webkit-scrollbar {
651 display: none;
651 display: none;
652}
652}
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>