{{ define "main" }} {{ partial "pages/hero.html" . }}
{{/* TOC PART */}} {{- $category := site.GetPage (printf "/categories%s" .Params.category) -}} {{- $show_aside := false -}} {{- $has_blocks := false -}} {{- range .Params.blocks -}} {{- $has_blocks = true -}} {{- if .title -}} {{- $show_aside = true -}} {{- end -}} {{- end -}} {{- if .Pages -}} {{- if eq $has_blocks false -}} {{- $show_aside = true -}} {{- end -}} {{- end -}} {{- if .Content -}} {{- if eq $has_blocks false -}} {{- $show_aside = true -}} {{- end -}} {{- end -}} {{- if $category -}} {{- if eq $has_blocks false -}} {{- $show_aside = true -}} {{- end -}} {{- end -}} {{- if $show_aside }} {{ partial "toc/container.html" (dict "category" $category "toc" "pages/toc.html" "context" . ) }} {{ end }} {{ partial "hooks/after-page-hero.html" . }} {{ partial "pages/chapo.html" (dict "context" . "block_wrapped" true ) }} {{ if .Params.blocks }} {{ partial "blocks/list.html" . }} {{ else }}
{{- partial "blocks/templates/pages/grid.html" (dict "pages" .Params.children "show_images" true "show_descriptions" true ) }}
{{ end }}
{{ end }}