section.html

Source Code

HTML Output

{{ define "main" }}
  <div class="my-4">
    {{partial "navigation/breadcrumbs.html" . }}
  </div>
  <h1 class="text-black p-4">{{ .Title }}</h1>
  {{if .Content}}
  <div id="articleContent" class="p-4 text-black">
    {{ .Content }}
  </div>
  {{end}}
  <div class="p-4">
    {{ partial "article/tiles.html" . }}
    {{partial "article/next-prev.html" . }}
  </div>
{{ end }}

JSON Output

[
    {{- range $index, $page := .Pages }}
    {{- if ne $page.Type "json" }}
    {{- if and $index (gt $index 0) }},{{ end }}
    {{- partial "json.json" . }}
    {{- end }}
    {{- if eq .Kind "section"}}
        {{- template "section" . }}
    {{- end }}
    {{- end }}
]

{{- define "section" }}
{{- range .Pages }}
    {{- if ne .Type "json" }}
    ,{{- partial "json.json" . }}
    {{- end }}
    {{- if eq .Kind "section"}}
        {{- template "section" . }}
    {{- end }}
{{- end }}
{{- end }}