61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
<section class="pt-5">
|
|
<div class="container shadow section-sm rounded">
|
|
<div class="row">
|
|
<div class="col-lg-3 col-md-4 d-md-block order-2 order-md-1">
|
|
<ul class="sidenav">
|
|
{{ $currentNode := . }}
|
|
{{ range site.Home.Sections.ByWeight }}
|
|
<!-- not render any single page, like contact page. -->
|
|
{{ $numberOfMainPages := len .Pages }}
|
|
{{ if eq $numberOfMainPages 0 }}
|
|
{{ else }}
|
|
<!-- /not render any single page, like contact page. -->
|
|
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode}}
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8 order-1 order-md-2 position-relative overflow-hidden bg-white rounded">
|
|
{{ if or .Params.town .Params.region }}
|
|
{{ partial "beleid.html" . }}
|
|
{{ else }}
|
|
<div class="px-lg-5 px-sm-4 py-4">
|
|
<h1 class="fw-bold mb-4 text-dark">{{ .Title }}</h1>
|
|
<div class="content">
|
|
{{ .Content }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{ define "section-tree-nav" }}
|
|
{{ $currentNode := .currentnode }}
|
|
{{ with .sect }}
|
|
{{/* Check of we in deze sectie zijn of in een 'kind' van deze sectie */}}
|
|
{{ $isAncestor := .IsAncestor $currentNode }}
|
|
{{ $isActive := eq .RelPermalink $currentNode.RelPermalink }}
|
|
|
|
<li class="sidelist {{ if $isAncestor }}parent{{ end }} {{ if $isActive }}active parent{{ end }}">
|
|
<a href="{{ .RelPermalink }}">
|
|
{{ .Title | strings.TrimPrefix "Mantelzorgwoning in " | strings.TrimPrefix "Care home in " }}
|
|
</a>
|
|
|
|
{{/* DE FIX: Alleen de <ul> renderen als:
|
|
1. Er pagina's zijn
|
|
2. EN de huidige pagina deze sectie is OF een gemeente in deze provincie is
|
|
*/}}
|
|
{{ if and .Pages (or $isAncestor $isActive) }}
|
|
<ul>
|
|
{{ range .Pages.ByTitle }}
|
|
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }}
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
{{ end }} |