2021-02-24 15:37:12 +00:00
|
|
|
{{- $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Page.Site.Params.GeekdocAnchor)) -}}
|
2021-02-04 09:06:19 +00:00
|
|
|
|
2022-01-06 12:58:10 +00:00
|
|
|
|
|
|
|
<!-- prettier-ignore-start -->
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- if $showAnchor -}}
|
2021-02-04 09:06:19 +00:00
|
|
|
<div class="gdoc-page__anchorwrap">
|
2023-04-17 18:51:01 +00:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 09:06:19 +00:00
|
|
|
{{ .Text | safeHTML }}
|
2022-06-10 19:44:08 +00: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 }}">
|
2022-04-18 18:33:23 +00:00
|
|
|
<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
|
2021-02-04 09:06:19 +00:00
|
|
|
</a>
|
|
|
|
</h{{ .Level }}>
|
|
|
|
</div>
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- else -}}
|
2021-02-04 09:06:19 +00:00
|
|
|
<div class="gdoc-page__anchorwrap">
|
2023-04-17 18:51:01 +00:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 09:06:19 +00:00
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
|
|
|
</div>
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- end -}}
|
2022-01-06 12:58:10 +00:00
|
|
|
<!-- prettier-ignore-end -->
|