Skip to content

Commit 5df89ad

Browse files
committed
Give each plot heading a visible anchor link
The heading already carried a deep link, but it was a Font Awesome icon and Font Awesome is not loaded, so it rendered as nothing. A muted # after the title is visible without competing with the heading.
1 parent c502cf5 commit 5df89ad

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

templates/t_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h5>{{ name }}</h5>
111111
<section id="{{ slug }}">
112112
<div class="card mb-4">
113113
<div class="card-header">
114-
<h3 class="card-title mb-1"><a href="#{{ slug }}"><i class="fa fa-link" aria-hidden="true"></i></a> {{ name }}</h3>
114+
<h3 class="card-title mb-1">{{ name }}<a class="anchor-link" href="#{{ slug }}" title="Link to {{ name }}" aria-label="Link to {{ name }}">#</a></h3>
115115
<ul class="nav nav-tabs card-header-tabs">
116116
{% for plot in items %}
117117
<li class="nav-item">

web/css/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ table {
2727
font-family: monospace;
2828
}
2929

30+
/* Subtle deep-link anchor next to each plot heading. */
31+
.anchor-link {
32+
color: #adb5bd;
33+
font-weight: 400;
34+
margin-left: .4rem;
35+
opacity: .45;
36+
text-decoration: none;
37+
}
38+
39+
.anchor-link:hover,
40+
.anchor-link:focus {
41+
color: #495057;
42+
opacity: 1;
43+
text-decoration: none;
44+
}
45+
3046
/* Copy button sitting in the dark code panel header. */
3147
.copy-btn {
3248
background: transparent;

0 commit comments

Comments
 (0)