Compare commits

..
Author SHA1 Message Date
imperosol 8d9b915176 change sas picture on picture click 2026-08-02 17:26:37 +02:00
2 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ prod = [
]
dev = [
"django-debug-toolbar>=7.0.0,<8",
"ipython>=9.15.0,<10.0.0",
"ipython>=9.14.1,<10.0.0",
"pre-commit>=4.6.0,<5.0.0",
"ruff>=0.16.0,<1.0.0",
"djhtml>=3.0.11,<4.0.0",
+9 -7
View File
@@ -82,7 +82,11 @@
<div class="container" id="pict">
<div class="main">
<div class="photo" :aria-busy="currentPicture.imageLoading">
<div
class="photo"
:aria-busy="currentPicture.imageLoading"
@click="currentPicture = (($event.offsetX > $el.offsetWidth / 2) ? nextPicture : previousPicture) ?? currentPicture"
>
<img
:src="currentPicture.compressedUrl"
:alt="currentPicture.name"
@@ -95,13 +99,11 @@
<div class="infos">
<h5>{% trans %}Infos{% endtrans %}</h5>
<div>
<div>
<span>{% trans %}Date: {% endtrans %}</span>
<span
x-text="Intl.DateTimeFormat(
'{{ LANGUAGE_CODE }}', {dateStyle: 'long'}
).format(Date.parse(currentPicture.date))"
<div
x-data="{formatter: Intl.DateTimeFormat('{{ LANGUAGE_CODE }}', {dateStyle: 'long'})}"
>
<span>{% trans %}Date: {% endtrans %}</span>
<span x-text="formatter.format(new Date(currentPicture.date))">
</span>
</div>
<div>