mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
fix: use flexbox to align heading anchors (#434)
This commit is contained in:
parent
c964f46de2
commit
945b31d146
@ -1 +0,0 @@
|
||||
/home/rknet/rkau2905/Devel/private/hugo/hugo-geekblog/
|
@ -3,16 +3,16 @@
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
{{- if $showAnchor -}}
|
||||
<div class="gblog-post__anchorwrap">
|
||||
<div class="flex align-center gblog-post__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gblog-post__anchor clip flex align-center" aria-label="Anchor {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
||||
<svg class="gblog-icon gblog_link"><use xlink:href="#gblog_link"></use></svg>
|
||||
</a>
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
{{- else -}}
|
||||
<div class="gblog-post__anchorwrap">
|
||||
|
@ -331,17 +331,17 @@ svg.gblog-icon {
|
||||
}
|
||||
|
||||
&__anchorwrap {
|
||||
gap: 0.5em;
|
||||
|
||||
&:hover .gblog-post__anchor svg.gblog-icon {
|
||||
color: var(--control-icons);
|
||||
}
|
||||
}
|
||||
|
||||
&__anchor {
|
||||
margin-left: $padding-8;
|
||||
|
||||
svg.gblog-icon {
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
width: 1.85em;
|
||||
height: 1.85em;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user