2021-05-23 12:57:55 +00:00
|
|
|
{{- $showAnchor := (and (default true .Page.Params.GeekblogAnchor) (default true .Page.Site.Params.GeekblogAnchor)) -}}
|
2021-02-21 12:24:55 +00:00
|
|
|
|
2021-12-30 14:55:55 +00:00
|
|
|
|
|
|
|
<!-- prettier-ignore-start -->
|
2021-05-23 12:57:55 +00:00
|
|
|
{{- if $showAnchor -}}
|
2022-03-23 20:20:40 +00:00
|
|
|
<div class="gblog-post__anchorwrap flex align-center">
|
2021-02-21 12:24:55 +00:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
2022-03-23 20:20:40 +00:00
|
|
|
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gblog-post__anchor gblog-post__anchor--right clip" aria-label="Anchor {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
|
|
|
<svg class="icon gblog_link"><use xlink:href="#gblog_link"></use></svg>
|
|
|
|
</a>
|
2021-02-21 12:24:55 +00:00
|
|
|
</div>
|
2021-05-23 12:57:55 +00:00
|
|
|
{{- else -}}
|
2021-02-21 12:24:55 +00:00
|
|
|
<div class="gblog-post__anchorwrap">
|
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
|
|
|
</div>
|
2021-05-23 12:57:55 +00:00
|
|
|
{{- end -}}
|
2021-12-30 14:55:55 +00:00
|
|
|
<!-- prettier-ignore-end -->
|