Files
mantelzorgwoning.info/themes/godocs-1/layouts/partials/default.html
2025-12-05 09:15:15 +01:00

144 lines
6.5 KiB
HTML

{{ "<!-- details page -->" | safeHTML }}
<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">
<div class="px-lg-5 px-sm-4">
<div class="header-row">
<h1 class="mb-4 fw-bold">{{ .Title }}</h1>
{{ with .Params.town_options.flag }}
{{ partial "image.html" (dict "Src" . "Class" "img-flag shadow" "Alt" (printf "Vlag van %s" $.Title)) }}
{{ end }}
</div>
{{ $town := .Params.town_options }}
{{ if $town }}
<div class="row mb-4">
<div class="col-md-6">
<h2 class="h5 mb-3">Bouw- en woonmogelijkheden</h2>
{{ partial "town-status-icon.html" (dict "status" $town.mantelzorgwoning_status "icon" "fa-house" "title" "Mantelzorgwoning") }}
{{ partial "town-status-icon.html" (dict "status" $town.premantelzorgwoning_status "icon" "fa-people-roof" "title" "Premantelzorgwoning") }}
{{ partial "town-status-icon.html" (dict "status" $town.generatiewoning_status "icon" "fa-people-group" "title" "Generatiewoning") }}
{{ partial "town-status-icon.html" (dict "status" $town.vrijebouw_status "icon" "fa-up-right-from-square" "title" "Vrije bouw") }}
</div>
<div class="col-md-6">
<h2 class="h5 mb-3">Ruimtelijke aandachtspunten</h2>
{{ partial "town-status-icon.html" (dict "status" $town.natura_status "icon" "fa-leaf" "title" "Natura / natuurgebieden") }}
{{ partial "town-status-icon.html" (dict "status" $town.monumenten_status "icon" "fa-landmark" "title" "Monumenten") }}
{{ partial "town-status-icon.html" (dict "status" $town.soil_status "icon" "fa-mountain" "title" "Bodem / fundering") }}
{{ partial "town-status-icon.html" (dict "status" $town.plan_status "icon" "fa-map" "title" "Omgevingsplan / bestemming") }}
</div>
</div>
{{ end }}
{{ if .Content }}
<div class="content">
{{ partial "autotooltips.html" . }}
</div>
{{ else }}
<div class="page-list">
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }}
</div>
{{ end }}
<nav class="pagination">
<!-- Next prev page -->
{{- $currentNode := . -}}
{{- template "menu-nextprev" dict "menu" site.Home "currentnode" $currentNode -}}
{{- define "menu-nextprev" -}}
{{- $currentNode := .currentnode -}}
{{- if ne .menu.Params.hidden true -}}
{{- if hasPrefix $currentNode.Permalink .menu.Permalink -}}
{{- $currentNode.Scratch.Set "NextPageOK" "OK" -}}
{{- $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") -}}
{{- else -}}
{{- if eq ($currentNode.Scratch.Get "NextPageOK") "OK" -}}
{{- $currentNode.Scratch.Set "NextPageOK" nil -}}
{{- $currentNode.Scratch.Set "nextPage" .menu -}}
{{- end -}}
{{- end -}}
{{- $currentNode.Scratch.Set "prevPageTmp" .menu -}}
{{- $currentNode.Scratch.Set "pages" .menu.Pages -}}
{{- if .menu.IsHome -}}
{{- $currentNode.Scratch.Set "pages" .menu.Sections -}}
{{- else if .menu.Sections -}}
{{- $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) -}}
{{- end -}}
{{- $pages := ($currentNode.Scratch.Get "pages") -}}
{{- range $pages.ByWeight -}}
{{- template "menu-nextprev" dict "menu" . "currentnode" $currentNode -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- with ($.Scratch.Get "prevPage") -}}
{{- if .Title -}}
<a class="nav nav-prev" href="{{.RelPermalink }}"><i class="fas fa-chevron-left me-2"></i>
<span class="d-none d-sm-block">{{.Title}}</span> <span class="d-block d-sm-none">{{ i18n "previous" }}</span>
</a>
{{- end -}}
{{- end -}}
{{- with ($.Scratch.Get "nextPage") -}}
{{- if .Title -}}
<a class="nav nav-next" href="{{.RelPermalink }}">
<span class="d-none d-sm-block">{{.Title}}</span> <span class="d-block d-sm-none">{{ i18n "next" }}</span><i class="fas fa-chevron-right ms-2"></i>
</a>
{{- end -}}
{{- end -}}
</nav>
</div>
</div>
</div>
</div>
</section>
{{ "<!-- /details page -->" | safeHTML }}
<!-- templates -->
{{ define "section-tree-nav" }}
{{ $showvisitedlinks := .showvisitedlinks }}
{{ $currentNode := .currentnode }}
{{with .sect}}
{{safeHTML .Params.head}}
{{ $fileUniqueID := "" }}
{{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }}
{{ $currentNodeFileUniqueID := "" }}
{{ with $currentNode.File }}{{ $currentNodeFileUniqueID = .UniqueID }}{{ end }}
<li data-nav-id="{{.Permalink}}" title="{{.Title}}"
class="sidelist {{if .IsAncestor $currentNode }}parent{{end}} {{if eq $fileUniqueID $currentNodeFileUniqueID}}active parent{{end}}">
<a href="{{.Permalink}}">{{.Title }}</a>
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ if ne $numberOfPages 0 }}
<ul>
{{ $currentNode.Scratch.Set "pages" .Pages }}
{{ if .Sections}}
{{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
{{end}}
{{ $pages := ($currentNode.Scratch.Get "pages") }}
{{ range $pages.ByWeight }}
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }}
{{end}}
</ul>
</li>
{{ end }}
{{ end }}
{{ end }}