mirror of
https://github.com/ae-utbm/sith.git
synced 2026-08-26 15:19:15 +00:00
Merge pull request #1454 from ae-utbm/sas-click
Change sas picture on picture click
This commit is contained in:
@@ -48,6 +48,9 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
// Prevent ugly selection when
|
||||||
|
// clicking to change the image
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,11 @@
|
|||||||
|
|
||||||
<div class="container" id="pict">
|
<div class="container" id="pict">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="photo" :aria-busy="currentPicture.imageLoading">
|
<div
|
||||||
|
class="photo"
|
||||||
|
:aria-busy="currentPicture.imageLoading"
|
||||||
|
@click="currentPicture = (($event.offsetX > $event.target.getBoundingClientRect().width / 2) ? nextPicture : previousPicture) ?? currentPicture"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
:src="currentPicture.compressedUrl"
|
:src="currentPicture.compressedUrl"
|
||||||
:alt="currentPicture.name"
|
:alt="currentPicture.name"
|
||||||
@@ -95,13 +99,11 @@
|
|||||||
<div class="infos">
|
<div class="infos">
|
||||||
<h5>{% trans %}Infos{% endtrans %}</h5>
|
<h5>{% trans %}Infos{% endtrans %}</h5>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div
|
||||||
<span>{% trans %}Date: {% endtrans %}</span>
|
x-data="{formatter: Intl.DateTimeFormat('{{ LANGUAGE_CODE }}', {dateStyle: 'long'})}"
|
||||||
<span
|
|
||||||
x-text="Intl.DateTimeFormat(
|
|
||||||
'{{ LANGUAGE_CODE }}', {dateStyle: 'long'}
|
|
||||||
).format(Date.parse(currentPicture.date))"
|
|
||||||
>
|
>
|
||||||
|
<span>{% trans %}Date: {% endtrans %}</span>
|
||||||
|
<span x-text="formatter.format(new Date(currentPicture.date))">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user