New: Alle gemeentes in basis online

This commit is contained in:
2026-02-16 20:51:00 +01:00
parent ab2b980d97
commit f482bebe98
1389 changed files with 1138171 additions and 437 deletions

View File

@@ -0,0 +1,141 @@
{{ $vlag := .Resources.GetMatch "vlag*" }}
{{ if $vlag }}
<div class="vlag-background" style="
position: absolute; top: -50px; right: -50px; width: 100%; height: 300px;
background-image: url('{{ $vlag.RelPermalink }}');
background-size: cover; background-position: center; opacity: 0.12;
transform: rotate(25deg); z-index: 0; pointer-events: none;
-webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
"></div>
{{ end }}
{{ $displayTitle := .Title | strings.TrimPrefix "Mantelzorgwoning in " | strings.TrimPrefix "Care home in " }}
<div class="position-relative" style="z-index: 1;">
<div class="d-flex justify-content-between align-items-start mb-4">
<div>
<h1 class="fw-bold mb-0 text-dark">{{ $displayTitle }}</h1>
{{ if .Params.town }}
{{ with .Params.provincie }}
<p class="text-muted mb-0">{{ printf (i18n "town_in_province") . }}</p>
{{ end }}
{{ else }}
<p class="text-muted mb-0">{{ i18n "province_overview" }}</p>
{{ end }}
</div>
{{ $wapen := .Resources.GetMatch "wapen*" }}
{{ with $wapen }}
<div class="bg-white p-2 rounded shadow-sm border">
<img src="{{ .RelPermalink }}" alt="{{ i18n "coat_of_arms_of" }} {{ $displayTitle }}" style="height: 70px; width: auto; object-fit: contain;">
</div>
{{ end }}
</div>
{{ if and .Params.town .Params.stats }}
<div class="row g-3 mb-4">
<div class="col-6 col-md-4">
<div class="p-3 border rounded bg-white bg-opacity-75 text-center shadow-sm">
<i class="fa-solid fa-users text-primary mb-2"></i>
<small class="text-uppercase text-muted d-block" style="font-size: 0.7rem; letter-spacing: 1px;">{{ i18n "inhabitants" }}</small>
<span class="h5 fw-bold">{{ lang.FormatNumber 0 .Params.stats.inwoners }}</span>
</div>
</div>
<div class="col-6 col-md-4">
<div class="p-3 border rounded bg-white bg-opacity-75 text-center shadow-sm">
<i class="fa-solid fa-person-cane text-primary mb-2"></i>
<small class="text-uppercase text-muted d-block" style="font-size: 0.7rem; letter-spacing: 1px;">{{ i18n "seniors" }} (65+)</small>
<span class="h5 fw-bold">{{ lang.FormatNumber 0 .Params.stats.senioren }}</span>
</div>
</div>
<div class="col-6 col-md-4">
<div class="p-3 border rounded bg-white bg-opacity-75 text-center shadow-sm">
<i class="fa-solid fa-ruler-combined text-primary mb-2"></i>
<small class="text-uppercase text-muted d-block" style="font-size: 0.7rem; letter-spacing: 1px;">{{ i18n "median_plot" }}</small>
<span class="h5 fw-bold">{{ .Params.stats.mediaan_kavel_m2 }} m²</span>
</div>
</div>
</div>
{{ end }}
{{ if and .Params.stats (gt .Params.stats.natura2000_km2 0.1) }}
{{ $natura := .Params.stats.natura2000_km2 }}
{{ $totaal := .Params.stats.oppervlakte_km2 }}
{{ $percentage := (mul (div $natura $totaal) 100) }}
<div class="alert alert-warning border-0 d-flex align-items-center mb-3 pt-4" role="alert">
<div>
<h3 class="h5 mb-1"><strong>Natura 2000: {{ printf "%.2f" $natura }} km² {{ i18n "of_the" }} {{ printf "%.2f" $totaal }} km²</strong></h3>
<p class="mb-0">
<i class="fa-solid fa-leaf text-success pe-2"></i>
{{ printf (i18n "natura_percentage_text") (printf "%.0f" $percentage) $displayTitle | safeHTML }}
</p>
</div>
</div>
{{ end }}
<div class="border-0 text-dark mb-5">
<div>
<h3 class="h5">
{{ if .Params.town }}{{ i18n "build_opportunities_in" }}{{ else }}{{ i18n "care_homes_in" }}{{ end }} {{ $displayTitle }}
</h3>
<p>
{{ if .Params.town }}
{{ printf (i18n "town_intro_text") $displayTitle }}
{{ else }}
{{ printf (i18n "province_intro_text") .Title }}
{{ end }}
</p>
<a href="/vergunning/check" class="btn btn-primary btn-lg fw-bold mt-2 d-inline-block shadow-sm">
<i class="fa-solid fa-tree-city me-2"></i>{{ i18n "check_your_address" }}
</a>
</div>
</div>
{{ with .Params.kernen }}
<div class="mb-5 border-top pt-2">
<h2 class="h5 mb-4 pb-2">{{ i18n "townships_in_municipality" }}</h2>
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead class="table-light">
<tr>
<th>{{ i18n "name" }}</th>
<th class="text-end">{{ i18n "inhabitants" }}</th>
<th class="text-end pe-3">{{ i18n "surface_area" }}</th>
</tr>
</thead>
<tbody>
{{ range . }}
<tr>
<td class="fw-bold text-secondary">{{ .naam }}</td>
<td class="text-end">{{ lang.FormatNumber 0 .inwoners }}</td>
<td class="text-end text-muted small pe-3">{{ printf "%.2f" .oppervlakte_km2 }} km²</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
{{ end }}
{{ if not .Params.town }}
<div class="row g-4 mb-5">
<h2 class="h5 mb-3 text-primary border-bottom pb-2">{{ i18n "municipalities_in" }} {{ .Title }}</h2>
{{ range .Pages.ByTitle }}
<div class="col-md-6 col-lg-4">
<a href="{{ .RelPermalink }}" class="text-decoration-none text-dark">
<div class="card h-100 hover-shadow border-0 bg-light transition">
<div class="card-body d-flex align-items-center">
{{ with .Resources.GetMatch "wapen*" }}<img src="{{ .RelPermalink }}" class="me-3" style="height: 40px;">{{ end }}
<div>
<h3 class="h6 mb-0 fw-bold">{{ .Title | strings.TrimPrefix "Mantelzorgwoning in " | strings.TrimPrefix "Care home in " }}</h3>
{{ if .Params.stats }}<small class="text-muted">{{ lang.FormatNumber 0 .Params.stats.inwoners }} {{ i18n "inhabitants_lowercase" }}</small>{{ end }}
</div>
</div>
</div>
</a>
</div>
{{ end }}
</div>
{{ end }}
</div>

View File

@@ -1,4 +1,3 @@
{{ "<!-- details page -->" | safeHTML }}
<section class="pt-5">
<div class="container shadow section-sm rounded">
<div class="row">
@@ -15,186 +14,48 @@
{{ 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>
<!-- Gemeente in het kort / praktische info -->
<div class="row mb-4">
<div class="col-md-12">
<h2 class="h5 mb-3">Gemeente in het kort</h2>
<ul class="list-unstyled mb-3">
{{ with $town.region }}<li><strong>Regio / provincie:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_residents_total }}<li><strong>Aantal inwoners:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_residents_density }}<li><strong>Inwonersdichtheid:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_town_surface_total }}<li><strong>Oppervlakte totaal:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_town_surface_soil }}<li><strong>Landoppervlak:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_town_surface_water }}<li><strong>Wateroppervlak:</strong> {{ . }}</li>{{ end }}
{{ with $town.soil_composition }}<li><strong>Bodemopbouw:</strong> {{ . }}</li>{{ end }}
{{ with $town.soil_types }}<li><strong>Bodemtypes:</strong> {{ delimit . ", " }}</li>{{ end }}
{{ with $town.monumenten_count }}<li><strong>Aantal monumenten:</strong> {{ . }}</li>{{ end }}
</ul>
</div>
<div class="col-md-12">
<h2 class="h5 mb-3">Praktische informatie</h2>
<ul class="list-unstyled mb-0">
{{ with $town.info_town_website }}<li><strong>Gemeentelijke website:</strong> <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
{{ with $town.info_town_hall_address }}<li><strong>Adres gemeentehuis:</strong> {{ . }}</li>{{ end }}
{{ with $town.info_town_hall_phone }}<li><strong>Telefoon gemeente:</strong> <a href="tel:{{ . }}">{{ . }}</a></li>{{ end }}
{{ with $town.info_town_omgevingsloket }}<li><strong>Omgevingsloket / omgevingsplan:</strong> <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
{{ with $town.info_town_wiki }}<li><strong>Wikipedia:</strong> <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
{{ with $town.info_town_train_bool }}<li><strong>Treinstation in de gemeente:</strong> {{ if . }}Ja{{ else }}Nee{{ end }}</li>{{ end }}
{{ with $town.info_town_bus_array }}<li><strong>Belangrijkste buslijnen:</strong> {{ range $i, $bus := . }}{{ if $i }}, {{ end }}{{ $bus | markdownify }}{{ end }}</li>{{ end }}
</ul>
</div>
</div>
<!-- Kaarten en externe bronnen -->
{{ if or $town.map_url $town.map_img $town.natura_links $town.monumenten_links }}
<div class="row mb-4">
<div class="col-12">
<h2 class="h5 mb-3">Kaarten en bronnen</h2>
<ul class="list-unstyled mb-0">
{{ with $town.map_url }}<li><strong>Interactieve kaart:</strong> <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
{{ with $town.map_img }}<li><strong>Kaart van de gemeente:</strong><br><img src="{{ . | relURL }}" alt="Kaart van {{ $.Title }}" class="img-fluid rounded shadow mt-2" loading="lazy"></li>{{ end }}
{{ with $town.natura_links }}
<li><strong>Natura 2000 / natuurgebieden:</strong>
<ul class="list-unstyled mb-0">
{{ range . }}<li><a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
</ul>
</li>
{{ end }}
{{ with $town.monumenten_links }}
<li><strong>Monumentenregister:</strong>
<ul class="list-unstyled mb-0">
{{ range . }}<li><a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></li>{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ end }}
{{ if .Content }}
<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">
{{ partial "autotooltips.html" . }}
{{ .Content }}
</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>
{{ if .Params.Feedback }}
{{ partial "components/feedback.html" . }}
{{ end }}
</div>
{{ end }}
</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>
{{ $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 }}
{{ end }}
{{ end }}