2023-06-22 09:45:54 +02:00
|
|
|
{{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}}
|
2021-02-04 10:06:19 +01:00
|
|
|
|
2022-01-06 13:58:10 +01:00
|
|
|
|
|
|
|
<!-- prettier-ignore-start -->
|
2021-02-24 16:37:12 +01:00
|
|
|
{{- if $showAnchor -}}
|
2023-08-31 23:27:11 +02:00
|
|
|
<div class="flex align-center gdoc-page__anchorwrap">
|
2023-04-17 20:51:01 +02:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 10:06:19 +01:00
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
2023-08-31 23:27:11 +02:00
|
|
|
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gdoc-page__anchor clip flex align-center" title="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" aria-label="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
|
|
|
<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
|
|
|
|
</a>
|
2021-02-04 10:06:19 +01:00
|
|
|
</div>
|
2021-02-24 16:37:12 +01:00
|
|
|
{{- else -}}
|
2021-02-04 10:06:19 +01:00
|
|
|
<div class="gdoc-page__anchorwrap">
|
2023-04-17 20:51:01 +02:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 10:06:19 +01:00
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
|
|
|
</div>
|
2021-02-24 16:37:12 +01:00
|
|
|
{{- end -}}
|
2022-01-06 13:58:10 +01:00
|
|
|
<!-- prettier-ignore-end -->
|