Apply review comments

This commit is contained in:
2025-09-23 10:28:05 +02:00
parent 4701c0804b
commit d87b069769
2 changed files with 8 additions and 2 deletions

View File

@@ -38,11 +38,11 @@ document.addEventListener("alpine:init", () => {
}, },
async toggleFullScreen(event: Event) { async toggleFullScreen(event: Event) {
const target = event.target as HTMLElement;
if (document.fullscreenElement) { if (document.fullscreenElement) {
await document.exitFullscreen(); await document.exitFullscreen();
return; return;
} }
const target = event.target as HTMLElement;
await target.requestFullscreen(); await target.requestFullscreen();
}, },
})); }));

View File

@@ -2,6 +2,7 @@
<html lang="fr"> <html lang="fr">
<head> <head>
<title>{% trans %}Slideshow{% endtrans %}</title> <title>{% trans %}Slideshow{% endtrans %}</title>
<link rel="shortcut icon" href="{{ static('core/img/favicon.ico') }}">
<link href="{{ static('css/slideshow.scss') }}" rel="stylesheet" type="text/css" /> <link href="{{ static('css/slideshow.scss') }}" rel="stylesheet" type="text/css" />
<script type="module" src="{{ static('bundled/alpine-index.js') }}"></script> <script type="module" src="{{ static('bundled/alpine-index.js') }}"></script>
<script type="module" src="{{ static('bundled/com/slideshow-index.ts') }}"></script> <script type="module" src="{{ static('bundled/com/slideshow-index.ts') }}"></script>
@@ -14,7 +15,12 @@
}, },
{% endfor %} {% endfor %}
])"> ])">
<div id="slideshow" @click="toggleFullScreen" hover="{% trans %}Click to expand{% endtrans %}"> <div
id="slideshow"
@click="toggleFullScreen"
hover="{% trans %}Click to expand{% endtrans %}"
@keyup.f.window="toggleFullScreen"
>
<div id="slides"> <div id="slides">
<template x-for="(poster, index) in posters"> <template x-for="(poster, index) in posters">