Skip to content

Commit

Permalink
Merge pull request #528 from saimn/photoswipe
Browse files Browse the repository at this point in the history
Update Photoswipe to v5
  • Loading branch information
saimn authored Nov 18, 2024
2 parents d762ecc + 9ae3858 commit 5752eca
Show file tree
Hide file tree
Showing 33 changed files with 10,409 additions and 5,597 deletions.
29 changes: 29 additions & 0 deletions src/sigal/themes/default/templates/description.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% macro img_description(media, with_big=True) -%}
{%- if with_big and media.big -%}
<a href='{{ media.big_url }}'>Full size</a>
{%- endif -%}
{%- if media.description -%}
<br>{{ media.description }}
{%- endif -%}
{%- if media.exif -%}
<div class='film-meta'>
{%- if media.exif.iso -%}
<abbr title='film speed'>{{ media.exif.iso }}</abbr> {%- endif -%}
{%- if media.exif.exposure -%}
<abbr title='exposure'>{{ media.exif.exposure }}</abbr> {%- endif -%}
{%- if media.exif.fstop -%}
<abbr title='aperture'>{{ media.exif.fstop }}</abbr> {%- endif -%}
{%- if media.exif.focal -%}
<abbr title='focal length'>{{ media.exif.focal }}</abbr> {%- endif -%}
</div>
{%- if media.exif.gps -%}
<a title='location' href='https://www.openstreetmap.org/?mlat={{ media.exif.gps.lat }}&amp;mlon={{ media.exif.gps.lon}}&amp;zoom=12&amp;layers=M' target='_blank' class='map' >{{ 'N{:.6f}'.format(media.exif.gps.lat) if media.exif.gps.lat > 0 else 'S{:.6f}'.format(-media.exif.gps.lat) }}{{ 'E{:.6f}'.format(media.exif.gps.lon) if media.exif.gps.lon > 0 else 'W{:.6f}'.format(-media.exif.gps.lon) }}</a>
{%- endif -%}
{%- if media.exif.Make or media.exif.Model -%}
<abbr title='camera make and model'>{{ media.exif.Make }} {{ media.exif.Model }}</abbr>
{%- endif -%}
{%- if media.exif.datetime -%}
<abbr title='date'>{{ media.exif.datetime }}</abbr>
{%- endif -%}
{% endif %}
{%- endmacro %}
24 changes: 1 addition & 23 deletions src/sigal/themes/galleria/templates/album_items.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% from 'description.html' import img_description %}
<div class="icons">
<a id="fullscreen"><img src="{{ theme.url }}/img/fullscreen.png"
title="Fullscreen" alt="Fullscreen (f)" /></a>
Expand All @@ -17,29 +18,6 @@

{% block late_js %}
{% if album.medias %}
{% macro img_description(media) -%}
{%- if media.big -%}<a href='{{ media.big_url }}'>Full size</a>{%- endif -%}
{# clean up tags and whitespace, including newlines, in the description #}
{%- if media.description -%}<br>{{ media.description }}{%- endif -%}
{%- if media.exif -%}
<div class='film-meta'>
{%- if media.exif.iso -%}<abbr title='film speed'>{{ media.exif.iso }}</abbr> {%- endif -%}
{%- if media.exif.exposure -%}<abbr title='exposure'>{{ media.exif.exposure }}</abbr> {%- endif -%}
{%- if media.exif.fstop -%}<abbr title='aperture'>{{ media.exif.fstop }}</abbr> {%- endif -%}
{%- if media.exif.focal -%}<abbr title='focal length'>{{ media.exif.focal }}</abbr> {%- endif -%}
</div>
{%- if media.exif.gps -%}
<a title='location' href='https://www.openstreetmap.org/?mlat={{ media.exif.gps.lat }}&amp;mlon={{ media.exif.gps.lon}}&amp;zoom=12&amp;layers=M' target='_blank' class='map' >{{ 'N{:.6f}'.format(media.exif.gps.lat) if media.exif.gps.lat > 0 else 'S{:.6f}'.format(-media.exif.gps.lat) }}{{ 'E{:.6f}'.format(media.exif.gps.lon) if media.exif.gps.lon > 0 else 'W{:.6f}'.format(-media.exif.gps.lon) }}</a>
{%- endif -%}
{%- if media.exif.Make or media.exif.Model -%}
<abbr title='camera make and model'>{{ media.exif.Make }} {{ media.exif.Model }}</abbr>
{%- endif -%}
{%- if media.exif.datetime -%}
<abbr title='date'>{{ media.exif.datetime }}</abbr>
{%- endif -%}
{% endif %}
{%- endmacro %}

<script src="{{ theme.url }}/jquery-3.3.1.min.js"></script>
<script src="{{ theme.url }}/galleria.min.js"></script>
<script src="{{ theme.url }}/themes/{{ settings.galleria_theme }}/galleria.{{ settings.galleria_theme }}.min.js"></script>
Expand Down
214 changes: 0 additions & 214 deletions src/sigal/themes/photoswipe/static/app.js

This file was deleted.

Loading

0 comments on commit 5752eca

Please sign in to comment.