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) {
const target = event.target as HTMLElement;
if (document.fullscreenElement) {
await document.exitFullscreen();
return;
}
const target = event.target as HTMLElement;
await target.requestFullscreen();
},
}));

View File

@@ -2,6 +2,7 @@
<html lang="fr">
<head>
<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" />
<script type="module" src="{{ static('bundled/alpine-index.js') }}"></script>
<script type="module" src="{{ static('bundled/com/slideshow-index.ts') }}"></script>
@@ -14,7 +15,12 @@
},
{% 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">
<template x-for="(poster, index) in posters">