- Replace the old placeholder galerie page content with gallery-1's real content (text + 4 uploaded photos), keeping the /galerie route and its position in the main nav - Remove gallery-2 and gallery-3 (prototype pages) and their media - Switch section text fields from plain textarea to Grav's markdown editor type, restoring the formatting toolbar in Admin - Trim the image grid/blueprint caps to 2 per section to match gallery-1's actual content Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
61 lines
2.8 KiB
Twig
61 lines
2.8 KiB
Twig
{% extends 'partials/base.html.twig' %}
|
|
{% block extra_css %}
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css">
|
|
{% endblock %}
|
|
{% block extra_js %}
|
|
<script src="https://cdn.jsdelivr.net/npm/glightbox/dist/js/glightbox.min.js" defer></script>
|
|
{% endblock %}
|
|
|
|
{% macro imagegrid(images, dummy_start, count) %}
|
|
<div class="row g-2">
|
|
{% if images|length > 0 %}
|
|
{% for img in images|slice(0, count) %}
|
|
<div class="col-6">
|
|
<a href="{{ img.url }}" class="glightbox gallery-item" data-gallery="galerie-impressie" data-description="Impressie van de galerie">
|
|
<div class="gallery-thumb"><img src="{{ img.url }}" loading="lazy" alt="Impressie van de galerie"></div>
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% for i in dummy_start..(dummy_start + count - 1) %}
|
|
<div class="col-6">
|
|
<a href="https://picsum.photos/seed/galerie-ruimte{{ i }}/900/900" class="glightbox gallery-item" data-gallery="galerie-impressie" data-description="Impressie {{ i }}">
|
|
<div class="gallery-thumb"><img src="https://picsum.photos/seed/galerie-ruimte{{ i }}/450/450" loading="lazy" alt="Impressie van de galerie (voorbeeldfoto)"></div>
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% import _self as gallery %}
|
|
|
|
{% block content %}
|
|
{% set is_en = (grav.language.active ?? 'nl') == 'en' %}
|
|
{% set section1_images = (page.header.section1_images ?? [])|map(item => page.media[item.image] ?? null)|filter(img => img is not null) %}
|
|
{% set section2_images = (page.header.section2_images ?? [])|map(item => page.media[item.image] ?? null)|filter(img => img is not null) %}
|
|
|
|
<div class="row g-3">
|
|
<div class="col-12 col-md-6 p-3 order-1 order-md-2">
|
|
{{ gallery.imagegrid(section1_images, 1, 2) }}
|
|
</div>
|
|
<div class="col-12 col-md-6 p-3 text-start content-text order-2 order-md-1">
|
|
<h1 class="funky-font main-header text-center">{{ page.title }}</h1>
|
|
{{ page.header.section1_text|markdown }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-3 mt-2">
|
|
<div class="col-12 col-md-6 p-3 text-start content-text order-2">
|
|
{{ page.header.section2_text|markdown }}
|
|
<div class="d-flex flex-column flex-sm-row gap-2 mt-3">
|
|
<a href="{{ url('/werk-in-detail') }}" class="btn btn-brand">{{ is_en ? 'View work in detail' : 'Bekijk werk in detail' }}</a>
|
|
<a href="{{ url('/contact') }}" class="btn btn-outline-brand">{{ is_en ? 'Plan a visit' : 'Plan een bezoek' }}</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-3 order-1">
|
|
{{ gallery.imagegrid(section2_images, 5, 2) }}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|