{{- $wcPage := .wcPage -}} {{- $wcBlock := .wcBlock -}} {{- $wcIdentifier := .wcIdentifier -}} {{/* Enable Alpine.js for interactivity */}} {{ $wcPage.Page.Store.Set "has_alpine" true }} {{ $content := $wcBlock.content }} {{ if not (reflect.IsMap $content) }}{{ $content = dict }}{{ end }} {{ $badge := index $content "badge" }} {{ if not (reflect.IsMap $badge) }}{{ $badge = dict }}{{ end }} {{ $badge_text := "" }} {{ with index $badge "text" }}{{ $badge_text = strings.TrimSpace (printf "%v" .) }}{{ end }} {{ $show_pulse := partial "functions/coerce_bool" (dict "value" (index $badge "show_pulse") "default" false) }} {{ $title := "" }} {{ $title_raw := index $content "title" }} {{ if $title_raw }}{{ $title = strings.TrimSpace (printf "%v" $title_raw) }}{{ end }} {{ if $title }} {{ $title = replaceRE "==([^=]+)==" "$1" $title }} {{ end }} {{ $subtitle := "" }} {{ $subtitle_raw := index $content "subtitle" }} {{ if $subtitle_raw }}{{ $subtitle = strings.TrimSpace (printf "%v" $subtitle_raw) }}{{ end }} {{ $search_placeholder := "" }} {{ $placeholder_raw := index $content "search_placeholder" }} {{ if eq (printf "%T" $placeholder_raw) "string" }} {{ $search_placeholder = strings.TrimSpace $placeholder_raw }} {{ end }} {{ if not $search_placeholder }}{{ $search_placeholder = "Search for answers..." }}{{ end }} {{ $suggestions_raw := index $content "suggestions" }} {{ $suggestions := slice }} {{ if reflect.IsSlice $suggestions_raw }} {{ range $suggestions_raw }} {{ $suggestion := strings.TrimSpace (printf "%v" .) }} {{ if $suggestion }}{{ $suggestions = $suggestions | append $suggestion }}{{ end }} {{ end }} {{ else if eq (printf "%T" $suggestions_raw) "string" }} {{ $suggestion := strings.TrimSpace $suggestions_raw }} {{ if $suggestion }}{{ $suggestions = slice $suggestion }}{{ end }} {{ end }} {{ $stats_raw := index $content "stats" }} {{ $stats_iter := slice }} {{ if reflect.IsSlice $stats_raw }} {{ $stats_iter = $stats_raw }} {{ else if and $stats_raw (reflect.IsMap $stats_raw) }} {{ $stats_iter = slice $stats_raw }} {{ end }} {{ $stats := slice }} {{ if gt (len $stats_iter) 0 }} {{ range $stats_iter }} {{ if reflect.IsMap . }} {{ $value := "" }} {{ $label := "" }} {{ with index . "value" }}{{ $value = strings.TrimSpace (printf "%v" .) }}{{ end }} {{ with index . "label" }}{{ $label = strings.TrimSpace (printf "%v" .) }}{{ end }} {{ if or $value $label }} {{ $stats = $stats | append (dict "value" $value "label" $label) }} {{ end }} {{ end }} {{ end }} {{ end }} {{/* Background is now handled by parse_block_v3.html gradient_mesh system */}} {{/* Content only - wrapper and styling applied by framework */}}
{{/* Badge */}} {{ if $badge_text }}
{{ if $show_pulse }} {{ end }} {{ $badge_text | markdownify }}
{{ end }} {{/* Title - supports ==highlight== syntax for gradient text */}}

{{ $title | markdownify | emojify | safeHTML }}

{{/* Subtitle */}} {{ with $subtitle }}

{{ . | markdownify | emojify }}

{{ end }} {{/* Search Box - Integrates with Pagefind */}}
{{/* Quick search suggestions - Now trigger Pagefind with pre-filled query */}} {{ if gt (len $suggestions) 0 }}
Popular: {{ range $suggestions }} {{ end }}
{{ end }}
{{/* Stats */}} {{ if gt (len $stats) 0 }}
{{ range $stats }}
{{ index . "value" }}
{{ index . "label" }}
{{ end }}
{{ end }}