Improve header anchor link styling

This commit is contained in:
rubenwardy
2025-07-01 21:04:46 +01:00
parent 5243176d74
commit c21dc5313d
3 changed files with 13 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ def render_code(self, tokens: Sequence[Token], idx, options, env):
gfm_like.make()
md = MarkdownIt("gfm-like", {"highlight": highlight_code})
md.use(anchors_plugin, permalink=True, permalinkSymbol="#", max_level=6)
md.use(anchors_plugin, permalink=True, permalinkSymbol="🔗", max_level=6)
md.add_render_rule("fence", render_code)
init_mention(md)

View File

@@ -57,12 +57,19 @@ h1, h2, h3, h4, h5, h6 {
content: "";
clear: both;
}
.header-anchor {
transition: opacity 0.15s ease-in-out;
opacity: 0.25;
margin: 0 0 0 0.25em;
font-size: 60%;
}
&:hover .header-anchor {
opacity: 0.9;
}
}
.header-anchor {
float: right;
opacity: 0.8;
}
.badge-notify {
background:yellow; /* #00bc8c;*/

View File

@@ -16,7 +16,7 @@
{%- endif %}
<link rel="stylesheet" type="text/css" href="/static/libs/bootstrap.min.css?v=4">
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=55">
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=56">
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
{% if noindex -%}