Remove experimental shortcodes: badges, cards
This commit is contained in:
@@ -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 */ -}}
|
||||
@@ -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 -}}
|
||||
Reference in New Issue
Block a user