change sas picture on picture click

This commit is contained in:
imperosol
2026-08-06 19:33:51 +02:00
parent b8c8768479
commit 4d07b94fee
+5 -6
View File
@@ -88,6 +88,7 @@
:alt="currentPicture.name"
id="main-picture"
x-ref="mainPicture"
@click="currentPicture = (($event.offsetX > $el.offsetWidth / 2) ? nextPicture : previousPicture) ?? currentPicture"
/>
</div>
@@ -95,13 +96,11 @@
<div class="infos">
<h5>{% trans %}Infos{% endtrans %}</h5>
<div>
<div>
<div
x-data="{formatter: Intl.DateTimeFormat('{{ LANGUAGE_CODE }}', {dateStyle: 'long'})}"
>
<span>{% trans %}Date: {% endtrans %}</span>
<span
x-text="Intl.DateTimeFormat(
'{{ LANGUAGE_CODE }}', {dateStyle: 'long'}
).format(Date.parse(currentPicture.date))"
>
<span x-text="formatter.format(new Date(currentPicture.date))">
</span>
</div>
<div>