{{/* One pull quote (`text`, `cite`), or a stack of them (`items`, each with `text` and `cite`). With `cards: true`, items render as a two-column grid of short testimonials: `text`, `name`, optional `role` (Markdown, for a linked company) and `photo`; without a photo, the person's initials show. `savings` adds a compact savings calculator below: `apps` (names) and `selected` (names ticked to start) are looked up in the `savings` section of the page at `from`, so prices live in one place; `headline` and `more` (label + url of the full calculator) are optional. */}} {{ $s := . }} {{ partial "sections/head.html" $s }} {{ $items := $s.items | default (slice (dict "text" $s.text "cite" $s.cite)) }} {{ if $s.cards }} {{ else }}
{{ range $items }}
{{ .text | markdownify }}
{{ with .cite }}
{{ . | markdownify }}
{{ end }}
{{ end }}
{{ end }} {{ with $s.savings }} {{ $cfg := . }} {{ with site.GetPage $cfg.from }} {{ $src := dict }} {{ range .Params.sections }}{{ if eq .type "savings" }}{{ $src = . }}{{ end }}{{ end }} {{ $apps := slice }} {{ range $name := $cfg.apps }} {{ range $src.apps }}{{ if eq .name $name }} {{ $apps = $apps | append (dict "name" .name "cost" .cost "perSeat" .perSeat "selected" (in ($cfg.selected | default slice) $name)) }} {{ end }}{{ end }} {{ end }}
{{ with $cfg.headline }}

{{ . }}

{{ end }} {{ partial "savings-calc.html" (dict "key" (printf "%s-savings" (partial "section-id.html" $s)) "apps" $apps "annual" $src.federatedAnnual "compact" true "more" $cfg.more) }}
{{ else }} {{ errorf "quote section: savings.from page %q not found" $cfg.from }} {{ end }} {{ end }} {{ if $s.ctas }}
{{ partial "sections/ctas.html" $s.ctas }}
{{ end }}