{{/* Hugo Blox: Features */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $content := $block.content }} {{ if not (reflect.IsMap $content) }}{{ $content = dict }}{{ end }} {{ $title := "" }} {{ with index $content "title" }}{{ $title = printf "%v" . | emojify | $page.RenderString }}{{ end }} {{ $text := "" }} {{ with index $content "text" }}{{ $text = printf "%v" . | emojify | $page.RenderString }}{{ end }} {{ $items_raw := index $content "items" }} {{ $items := slice }} {{ if reflect.IsSlice $items_raw }}{{ $items = $items_raw }}{{ end }}
{{ with $title }}

{{.}}

{{ end }} {{ with $text }}

{{.}}

{{ end }}
{{ range $items }} {{ if reflect.IsMap . }} {{ $icon := "" }} {{ with index . "icon" }} {{ if eq (printf "%T" .) "string" }}{{ $icon = . }}{{ end }} {{ end }} {{ $name := "" }} {{ with index . "name" }}{{ $name = printf "%v" . }}{{ end }} {{ $description := "" }} {{ with index . "description" }}{{ $description = printf "%v" . }}{{ end }}
{{ with $icon }}
{{ partial "functions/get_icon" (dict "name" . "attributes" `class="w-5 h-5 lg:w-6 lg:h-6"`) }}
{{ end }} {{ with $name }}

{{ . | $page.RenderString }}

{{ end }} {{ with $description }}

{{ . | $page.RenderString }}

{{ end }}
{{ end }} {{ end }}