This is a gentle fork from https://framagit.org/marienfressinaud/photos.marienfressinaud.fr with a responsive and optimized mindset. https://media.larlet.fr/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

index.html.j2 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {% extends "base.html.j2" %}
  2. {% block title %}Photos & vidéos{% endblock %}
  3. {% block extra_head %}
  4. <!-- CanIHazMoreComplexityPlease? https://htmlhead.dev/ -->
  5. <meta
  6. name="twitter:image" property="og:image" itemprop="image"
  7. content="https://media.larlet.fr/2021--paysages/jpg/15_660x440.jpg"
  8. >
  9. <link type="text/html" href="https://mastodon.social/@dav" rel="me" />
  10. {% endblock %}
  11. {% block container %}
  12. <div class="galleries">
  13. {% for gallery in galleries -%}
  14. {% if not gallery.private %}
  15. <div class="gallery-cover">
  16. <a href="{{ gallery.cover_photo.page_url }}"
  17. title="Accéder à la gallerie « {{ gallery.name }} »
  18. {%- if gallery.cover_photo.alt %} en commençant par la photo « {{ gallery.cover_photo.alt }} »
  19. {%- endif -%}
  20. ">
  21. <picture>
  22. <source
  23. srcset="
  24. {%- for size in sizes %}
  25. {{ gallery.cover_photo.gallery_slug }}/webp/{{ gallery.cover_photo.name }}_{{ size.0 }}x{{ size.1 }}.webp {{ size.0 }}w{% if not loop.last%},{% endif %}
  26. {%- endfor -%}
  27. "
  28. sizes="min((100vw - 2rem), 330px)"
  29. type="image/webp">
  30. <img
  31. src="{{ gallery.cover_photo.gallery_slug }}/jpg/{{ gallery.cover_photo.name }}_{{ sizes.0.0 }}x{{ sizes.0.1 }}.jpg"
  32. width="{{ gallery.cover_photo.width }}" height="{{ gallery.cover_photo.height }}"
  33. srcset="
  34. {%- for size in sizes %}
  35. {{ gallery.cover_photo.gallery_slug }}/jpg/{{ gallery.cover_photo.name }}_{{ size.0 }}x{{ size.1 }}.jpg {{ size.0 }}w{% if not loop.last%},{% endif %}
  36. {%- endfor -%}
  37. "
  38. sizes="min((100vw - 2rem), 330px)"
  39. alt="{{ gallery.cover_photo.alt or 'TODO' }}" loading="lazy" decoding="async">
  40. <figcaption>{{ gallery.name }}</figcaption>
  41. </picture>
  42. </a>
  43. </div>
  44. {% endif %}
  45. {% endfor %}
  46. </div>
  47. {% endblock %}