Do not render title anchors as page text, use CSS content instead
This removes the '#' character from title anchors from the page body. This was troublesome as crawlers, search engines and readers were showing these characters as well. This character is now set as CSS content, removing it as text from the page body.
This commit is contained in:
parent
f02d3d1aed
commit
c394a562cf
|
@ -186,10 +186,15 @@ a.tag {
|
|||
*/
|
||||
|
||||
.anchor {
|
||||
margin-left: 0.1em;
|
||||
transition: opacity 0.2s ease;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.anchor::after {
|
||||
content: '#';
|
||||
}
|
||||
|
||||
*:hover > .anchor,
|
||||
.anchor:active,
|
||||
.anchor:focus {
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{% if id %}
|
||||
<a class="anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}">
|
||||
#
|
||||
</a>
|
||||
<a class="anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}"></a>
|
||||
{% else %}
|
||||
<a class="anchor" href="#" aria-label="Anchor link">
|
||||
#
|
||||
</a>
|
||||
<a class="anchor" href="#" aria-label="Anchor link"></a>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue