Rename image fields and implement werk-in-detail gallery
- Rename image_main/image_secondary/image_logo/image_portrait to portret/extra_1/logo/extra_2 in pages, blueprints, and templates - Add extra_2 image slot to home and CV (hidden on mobile) - Wire werk-in-detail to real child pages instead of picsum placeholders - Remove glightbox CDN dependency from werk-in-detail - Add album blueprint, template, and grote-objecten album page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
{% 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 %}
|
||||
{% block content %}
|
||||
<div class="row mb-3">
|
||||
<h1 class="funky-font main-header text-center">{{ page.title }}</h1>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
{% for i in 1..8 %}
|
||||
{% for child in page.children %}
|
||||
{% if child.published %}
|
||||
<div class="col-6 col-md-4 col-lg-3">
|
||||
<a href="https://picsum.photos/seed/detail{{ i }}/800/800" class="glightbox gallery-item" data-gallery="detail" data-description="Werk {{ i }}">
|
||||
<div class="gallery-thumb"><img src="https://picsum.photos/seed/detail{{ i }}/350/350" loading="lazy" alt="Werk {{ i }}"></div>
|
||||
<a href="{{ child.url }}" class="gallery-item d-block">
|
||||
<div class="gallery-thumb">
|
||||
{% for name, img in child.media.images %}
|
||||
{% if loop.first %}
|
||||
<img src="{{ img.url }}" loading="lazy" alt="{{ child.title }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="mt-2 text-center small">{{ child.title }}</p>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user