Initial commit: simpleblog
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Photos · {{ site_title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav class="breadcrumb">
|
||||
<a href="{{ url_for('public.index') }}">Home</a>
|
||||
<span>›</span>
|
||||
<span>Photos</span>
|
||||
</nav>
|
||||
|
||||
<article class="single-post">
|
||||
<h1 class="page-heading">Photos</h1>
|
||||
|
||||
{% if albums %}
|
||||
<div class="gallery" style="display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;">
|
||||
{% for a in albums %}
|
||||
<a class="album-card" href="{{ url_for('public.photos', slug=a.slug) }}">
|
||||
{% if album_thumbs.get(a.id) %}
|
||||
{# The whole card opens the album. Without data-no-lightbox the
|
||||
page-wide single-image viewer swallowed this click and showed
|
||||
only the preview photo instead of navigating to the gallery. #}
|
||||
<img class="album-thumb" src="{{ album_thumbs.get(a.id) }}" alt="{{ a.name }}" loading="lazy" data-no-lightbox>
|
||||
{% endif %}
|
||||
<h2>{{ a.name }}</h2>
|
||||
{% if a.description %}
|
||||
<p class="lead">{{ a.description }}</p>
|
||||
{% endif %}
|
||||
<span class="album-count">{{ album_counts.get(a.id, 0) }} photo{{ '' if album_counts.get(a.id, 0) == 1 else 's' }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty-state">No albums yet. Create one from the admin panel.</p>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user