Back to Vector

Section

website/layouts/guides/section.html

0.55.01.4 KB
Original Source

{{ define "title" }} {{ .Title }} | {{ site.Title }} {{ end }} {{ define "main" }} {{ $desc := .Description }} {{ $numSections := len .Sections }} {{ $isRoot := eq .FirstSection .CurrentSection }}

{{ partial "hero.html" . }}

{{ if $isRoot }} {{ $columnedSections := where .Sections ".Params.self_standing" "ne" true }} {{ $fullWidthSections := where .Sections ".Params.self_standing" true }} {{ range $columnedSections }} {{ partial "heading.html" (dict "text" .Title "level" 2 "href" .RelPermalink "icon" false) }} {{ with .Description }} {{ . | markdownify }} {{ end }} {{ .Render "list" }}

{{ end }} {{ range $fullWidthSections }} {{ partial "heading.html" (dict "text" .Title "level" 2 "href" .RelPermalink "icon" false) }} {{ with .Description }} {{ . | markdownify }} {{ end }} {{ range .Sections }} {{ partial "heading.html" (dict "text" .Title "level" 3 "href" .RelPermalink "icon" false) }} {{ with .Description }} {{ . | markdownify }} {{ end }} {{ .Render "list" }}

{{ end }}

{{ end }} {{ else }} {{ with .Sections }} {{ range . }} {{ partial "heading.html" (dict "text" .Title "level" 3 "href" .RelPermalink "icon" false) }} {{ with .Description }} {{ . | markdownify }} {{ end }} {{ .Render "list" }}

{{ end }} {{ else }} {{ .Render "list" }} {{ end }} {{ end }}

{{ end }} {{ define "below" }} {{ partial "guides/pagination.html" . }} {{ end }}