Add download link for zip files.

This commit is contained in:
voussoir 2025-03-24 22:13:55 -07:00
parent c032de8aa3
commit 9256fca829

View file

@ -67,7 +67,7 @@ body.noscrollbar::-webkit-scrollbar
} }
body.noscrollbar body.noscrollbar
{ {
scrollbar-width: none; scrollbar-width: 0;
} }
header header
@ -286,6 +286,10 @@ pre,
<p>Click each photo to view its full resolution. Click the number to download it.</p> <p>Click each photo to view its full resolution. Click the number to download it.</p>
{% for zip in zipz %}
<p>Click here to download <a target="_blank" href="{{urlroot}}{{zip.relative_to('.', simple=True)}}">{{zip.basename}}</a></p>
{% endfor %}
{% for file in files %} {% for file in files %}
{% if file.extension == 'jpg' %} {% if file.extension == 'jpg' %}
<article class="photograph"> <article class="photograph">
@ -438,7 +442,10 @@ document.addEventListener("DOMContentLoaded", on_pageload);
''') ''')
def imagegallery(files, title, urlroot, with_download_links): def imagegallery(files, title, urlroot, with_download_links):
zipz = [f for f in files if f.extension == 'zip']
files = [f for f in files if f.extension != 'zip']
html = TEMPLATE.render( html = TEMPLATE.render(
zipz=zipz,
files=files, files=files,
title=title, title=title,
urlroot=urlroot, urlroot=urlroot,