figbert.com-website

[ACTIVE] the website and home of figbert on the clearnet
git clone git://git.figbert.com/figbert.com-website.git
Log | Files | Refs | README | LICENSE

commit a779dc56b5ead8585653a85dcc41221019ab65a7
parent 2eeeddf4aeb5e790d02920481cab65d3005c1600
Author: FIGBERT <figbert@figbert.com>
Date:   Thu, 16 Jun 2022 14:22:07 -0700

Tweak heading anchors for new theme

Diffstat:
Mstatic/css/global.css | 16++++++++++++++++
Mtemplates/anchor-link.html | 16+---------------
2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/static/css/global.css b/static/css/global.css @@ -82,3 +82,19 @@ small > a { color: var(--secondary-color); font-size: 90%; } + +.zola-anchor { + opacity: 0; + position: absolute; + right: 101%; + transition: opacity .1s linear; +} + +h1:hover > .zola-anchor, +h2:hover > .zola-anchor, +h3:hover > .zola-anchor, +h4:hover > .zola-anchor, +h5:hover > .zola-anchor, +h6:hover > .zola-anchor { + opacity: 100; +} diff --git a/templates/anchor-link.html b/templates/anchor-link.html @@ -1,15 +1 @@ -<a class="zola-anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}"> - {% if level == 1 %} - # - {% elif level == 2 %} - ## - {% elif level == 3 %} - ### - {% elif level == 4 %} - #### - {% elif level == 5 %} - ##### - {% elif level == 6 %} - ###### - {% endif %} -</a> +<a class="zola-anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}">ยง</a>