{{/* One template per section type. Each receives a Section. */}} {{define "attrs"}}{{with .ID}} id="{{.}}"{{end}}{{end}} {{define "tone"}}{{with .Tone}} tone-{{.}}{{end}}{{end}} {{define "head"}}{{if or .Eyebrow .Title .Text}}
{{with .Eyebrow}}

{{tr .}}

{{end}} {{with .Title}}

{{tr .}}

{{end}} {{with .Text}}

{{tr .}}

{{end}}
{{end}}{{end}} {{define "buttons"}}{{range .}}{{with .Icon}}{{icon .}}{{end}}{{if .UI}}{{ui .UI}}{{else}}{{tr .Label}}{{end}}{{if eq .Style "link"}}{{icon "chevron"}}{{end}}{{end}}{{end}} {{define "app-row"}}
{{range .}}{{with app .}}{{.Name}}{{end}}{{end}}
{{end}} {{define "hero"}}{{$s := .}}
{{with .Eyebrow}}

{{tr .}}

{{end}}

{{tr .Title}}

{{with .Text}}

{{tr .}}

{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{with img .Image}}
{{trs (or $s.Alt $s.Title)}}
{{else}}{{with $s.Apps}}{{end}}{{end}}
{{end}} {{define "feature"}}{{$s := .}}{{$m := img .Image}}
{{with .Apps}}{{template "app-row" .}}{{end}} {{with .Eyebrow}}

{{tr .}}

{{end}}

{{tr .Title}}

{{with .Text}}

{{tr .}}

{{end}} {{with .Bullets}}
    {{range .}}
  • {{icon "check"}}{{tr .}}
  • {{end}}
{{end}} {{with .Note}}

{{tr .}}

{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{with $m}}
{{trs (or $s.Alt $s.Title)}}
{{else}}{{with $s.Code}}
{{code .}}
{{end}}{{end}} {{if and $m $s.Code}}
{{code $s.Code}}
{{end}} {{with .Phones}}
{{range $i, $n := .}}{{with img $n}}
{{trs $s.Title}}
{{end}}{{end}}
{{end}}
{{end}} {{define "showcase"}}
{{template "head" .}}
{{range $i, $it := .Items}}{{with img $it.Image}}{{trs $it.Title}}{{end}}{{end}}
{{range $i, $it := .Items}}

{{tr .Title}}

{{tr .Text}}

{{end}}
{{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{end}} {{define "lit"}}
{{with .Eyebrow}}

{{tr .}}

{{end}}

{{tr .Text}}

{{end}} {{define "stats"}}
{{template "head" .}}
{{range $i, $it := .Items}}
{{tr .Value}}
{{tr .Title}}
{{with .Text}}

{{tr .}}

{{end}}
{{end}}
{{end}} {{define "cards"}}
{{template "head" .}}
{{end}} {{define "bento"}}
{{template "head" .}}
{{range $i, $it := .Items}}
{{with .Icon}}
{{icon .}}
{{end}} {{with .Apps}}{{template "app-row" .}}{{end}} {{with .Value}}
{{tr .}}
{{end}} {{with .Eyebrow}}

{{tr .}}

{{end}}

{{tr .Title}}

{{with .Text}}

{{tr .}}

{{end}} {{with .Link}}{{ui "learnMore"}}{{icon "chevron"}}{{end}} {{with img .Image}}{{trs $it.Title}}{{end}}
{{end}}
{{end}} {{define "apps"}}
{{template "head" .}} {{with .Note}}

{{tr .}}

{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{end}} {{define "specs"}}
{{template "head" .}}
{{range .Items}}
{{tr .Title}}
{{with .Text}}

{{tr .}}

{{end}}{{with .Bullets}}
    {{range .}}
  • {{tr .}}
  • {{end}}
{{end}}
{{end}}
{{with .Note}}

{{tr .}}

{{end}}
{{end}} {{define "install"}}
{{template "head" .}}
{{range $i, $it := .Items}}
{{with .Icon}}
{{icon .}}
{{end}}

{{tr .Title}}

{{with .Eyebrow}}

{{tr .}}

{{end}}
{{with .Text}}

{{tr .}}

{{end}} {{with .Code}}
{{.}}
{{end}} {{with .Bullets}}
    {{range .}}
  1. {{tr .}}
  2. {{end}}
{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}} {{with .Note}}

{{tr .}}

{{end}}
{{end}}
{{end}} {{define "steps"}}
{{template "head" .}}
    {{range $i, $it := .Items}}
  1. {{add $i 1}}

    {{tr .Title}}

    {{with .Text}}

    {{tr .}}

    {{end}}
  2. {{end}}
{{end}} {{define "cta"}}

{{tr .Title}}

{{with .Text}}

{{tr .}}

{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{end}} {{define "notice"}}
{{icon "alert"}}
{{with .Eyebrow}}

{{tr .}}

{{end}}

{{tr .Title}}

{{with .Text}}

{{tr .}}

{{end}} {{with .Bullets}}
    {{range .}}
  • {{tr .}}
  • {{end}}
{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{end}} {{/* Reading material: a heading, then items made of a title, text, bullets, a code block and a note. Text is trusted HTML, so it may hold several

. */}} {{define "doc"}}

{{if or .Eyebrow .Title .Text}}
{{with .Eyebrow}}

{{tr .}}

{{end}} {{with .Title}}

{{tr .}}

{{end}} {{with .Text}}

{{tr .}}

{{end}}
{{end}} {{range .Items}}
{{with .Title}}

{{tr .}}

{{end}} {{with .Text}}
{{tr .}}
{{end}} {{with .Bullets}}
    {{range .}}
  • {{tr .}}
  • {{end}}
{{end}} {{with .Code}}
{{.}}
{{end}} {{with .Note}}

{{tr .}}

{{end}} {{with .Buttons}}
{{template "buttons" .}}
{{end}}
{{end}}
{{end}}