section.html

Source code

HTML output

{{- define "top-bar" -}}
  {{- partial "navigation/topbar/main.html" . -}}
{{- end -}}

{{- define "sidebar-left" -}}
  {{- partial "navigation/sidebar-left.html" . -}}
{{- end -}}

{{- define "breadcrumbs" -}}
  <div class="my-4">
      {{partial "navigation/breadcrumbs.html" . }}
  </div>
{{- end -}}

{{- define "content" -}}
  <h1 class="text-black p-4">{{ .Title }}</h1>
  {{if .Content}}
  <div id="articleContent" class="p-4 text-black">
    {{ .Content }}
  </div>
  {{end}}
{{- end -}}

{{- define "innerFooter" -}}
  <div class="p-4">
    {{ partial "article/tiles.html" . }}
    {{partial "article/next-prev.html" . }}
  </div>
{{- end -}}

{{- define "sidebar-right" -}}
  {{- partial "navigation/sidebar-right.html" . -}}
{{- 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 }}