Skip to content

Commit bfda181

Browse files
committed
support "text" param
1 parent 1d74a80 commit bfda181

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

layouts/shortcodes/summary-bar.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{ $featureName := .Get "feature_name" }}
2+
{{ $text := .Get "text" }}
23
{{ $feature := index site.Data.summary $featureName }}
34
{{ if not $feature }}
45
{{ errorf "[summary-bar] invalid feature: %s %v" $featureName .Position }}
@@ -47,15 +48,16 @@
4748
{{ with $feature.availability }}
4849
{{ $availabilityText := . }}
4950
<div class="flex flex-wrap gap-1 {{ $availabilityText|lower }}">
51+
{{ range $key, $icon := $availabilityIcons }}
52+
{{ if in $availabilityText $key }}
53+
<span class="icon-svg">{{ partial "icon" $icon }}</span>
54+
{{ end }}
55+
{{ end }}
5056
<span class="font-bold">Availability:</span>
5157
<span>
52-
{{ $availabilityText }}
53-
{{ range $key, $icon := $availabilityIcons }}
54-
{{ if in $availabilityText $key }}
55-
<span class="icon-svg">{{ partial "icon" $icon }}</span>
56-
{{ end }}
57-
{{ end }}
58+
{{ $availabilityText }}.
5859
</span>
60+
<div> <span class="">{{ $text | markdownify }}</span></div>
5961
</div>
6062
{{ end }}
6163

0 commit comments

Comments
 (0)