update for toc anchor links

This commit is contained in:
Daniel Fichtinger 2025-07-11 14:47:53 -04:00
parent edeb2fb9ac
commit e04a587e8f
3 changed files with 44 additions and 4 deletions

View file

@ -9,7 +9,7 @@ environment:
proxy: ficd.srht.site proxy: ficd.srht.site
repo: ficd.sh repo: ficd.sh
zona_repo: git+https://git.sr.ht/~ficd/zona zona_repo: git+https://git.sr.ht/~ficd/zona
zona_ref: 0ee8094cc9c366a813d8f7938d35a9be7f7647e1 zona_ref: 55df755596192ae67b5119f520be4f5c150d6789
tasks: tasks:
- build: | - build: |
if [ "$GIT_REF" = "refs/heads/main" ]; then if [ "$GIT_REF" = "refs/heads/main" ]; then

View file

@ -39,7 +39,7 @@ into it!
[TOC] [TOC]
## [Zonelets] & [Zoner] ## Zonelets & Zoner
I don't remember how I found out about the small web,[^small-web], but I I don't remember how I found out about the small web,[^small-web], but I
_do_ recall how it immediately sparked something in me. As an autist with _do_ recall how it immediately sparked something in me. As an autist with

View file

@ -17,6 +17,46 @@ body {
padding-left: calc(100vw - 100%); padding-left: calc(100vw - 100%);
} }
.toclink {
position: relative;
text-decoration: none;
color: inherit;
}
.toclink::before {
content: "#";
position: absolute;
right: 100%;
margin-right: 0.25em;
top: 50%;
transform: translateY(-50%);
opacity: 0;
transition: opacity 0.2s ease;
}
h1 .toclink::before {
content: "#";
}
h2 .toclink::before {
content: "#";
}
h3 .toclink::before {
content: "##";
}
h4 .toclink::before {
content: "###";
}
.toclink:hover::before {
opacity: 1;
}
.toclink:hover {
background-color: transparent;
}
/* h1, */ /* h1, */
h2, h2,
h3, h3,
@ -130,7 +170,7 @@ pre {
white-space: pre; white-space: pre;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; font-family: monospace;
font-size: 0.95em; font-size: 0.95em;
} }
@ -283,7 +323,7 @@ tbody tr:hover {
} }
table code { table code {
font-family: 'Fira Code', 'Consolas', monospace; font-family: monospace;
font-size: 0.85em; font-size: 0.85em;
background: #1d1d1d; background: #1d1d1d;
padding: 0.1em 0.25em; padding: 0.1em 0.25em;