Skip to content

Commit 7eaa54f

Browse files
committed
anchor links
1 parent 83d5434 commit 7eaa54f

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
2+
{{ .Text }}
3+
<a class="anchor" href="#{{ .Anchor }}">#</a>
4+
</h{{ .Level }}>

static/css/style.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ a.home-link {
181181
color: var(--fg_0);
182182
}
183183

184-
185184
.summary {
186185
border: 1px solid var(--fg_0);
187186
padding: 10px;
@@ -230,4 +229,14 @@ a.footnote-ref::after {
230229

231230
sup {
232231
line-height: 100%;
233-
}
232+
}
233+
234+
.anchor {
235+
visibility: hidden;
236+
text-decoration: none;
237+
}
238+
239+
.anchor:hover,
240+
*:hover > .anchor {
241+
visibility: visible;
242+
}

0 commit comments

Comments
 (0)