Files
simpleblog/templates/photos.html
T
2026-11-14 17:05:01 +00:00

45 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ album.name }} · {{ site_title }}{% endblock %}
{% block content %}
<nav class="breadcrumb">
<a href="{{ url_for('public.index') }}">Home</a>
<span>&rsaquo;</span>
<span>{{ album.name }}</span>
</nav>
<article class="single-post">
<h1 class="page-heading">{{ album.name }}</h1>
{% if album.description %}
<p class="lead">{{ album.description }}</p>
{% endif %}
{% if media %}
<!-- Random featured image; click it (or any thumbnail) to open the gallery lightbox. -->
<figure class="gallery-hero" id="gallery-hero">
<img class="gallery-hero-img" data-no-lightbox src="{{ media[0].url }}" alt="{{ album.name }}">
<figcaption class="hero-caption">{{ album.name }}</figcaption>
</figure>
<div class="gallery" style="display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;">
{% for m in media %}
<img class="gallery-img" data-no-lightbox src="{{ m.thumb_url or m.url }}" data-src="{{ m.url }}" alt="" loading="lazy">
{% endfor %}
</div>
<!-- Gallery lightbox (populated by gallery_lightbox.js). -->
<div class="gallery-lightbox" id="gallery-lightbox" hidden>
<button type="button" class="lightbox-close" aria-label="Close gallery">&times;</button>
<header class="lightbox-header">{{ album.name }}</header>
<div class="lightbox-body">
<button type="button" class="lightbox-prev" aria-label="Previous photo">&#8249;</button>
<img class="lightbox-img-main" src="" alt="">
<button type="button" class="lightbox-next" aria-label="Next photo">&#8250;</button>
</div>
</div>
{% else %}
<p class="empty-state">This album has no photos yet.</p>
{% endif %}
</article>
{% endblock %}