Remove experimental shortcodes: badges, cards

This commit is contained in:
Alex Shpak
2026-05-22 22:19:23 +02:00
parent 1d38cd0183
commit d347e14530
5 changed files with 0 additions and 123 deletions
-12
View File
@@ -1,12 +0,0 @@
{{- $style := or (.Get "style") (.Get 0) "default" -}}
{{- $attributes := partial "docs/text/mapper" (dict
"attributes" (cond .IsNamedParams .Params dict)
"merge" (dict
"class" (slice "book-badge" $style)
)
) -}}
<span {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
{{- with or (.Get "title") (.Get 1) -}}<span class="book-badge-title">{{ . | plainify }}</span>{{- end -}}
{{- with or (.Get "value") (.Get 2) -}}<span class="book-badge-value">{{ . | plainify }}</span>{{- end -}}
</span>
{{- /* remove whitespaces */ -}}
-20
View File
@@ -1,20 +0,0 @@
{{- with .Get "href" -}}
{{- $destination := partial "docs/links/portable-link" (dict "Page" $.Page "Destination" .) -}}
<div class="book-card{{ with $.Get "class" }} {{ . }}{{ end }}"><a href="{{ $destination | safeURL }}">
{{- template "book-card-content" $ -}}
</a></div>
{{- else -}}
<div class="book-card{{ with .Get "class" }} {{ . }}{{ end }}">
{{- template "book-card-content" $ -}}
</div>
{{- end -}}
{{- define "book-card-content" -}}
{{- with .Get "image" -}}
{{- $destination := partial "docs/links/portable-image" (dict "Page" $.Page "Destination" .) -}}
<img src="{{ $destination | safeURL }}" alt="{{ partial "docs/text/i18n" ($.Get "alt" ) }}" />
{{- end -}}
<div class="markdown-inner">
{{ with .Inner }}{{ . }}{{ end -}}
</div>
{{- end -}}