Vidéo fullscreen : cursor pointer sur le bouton close, fermeture avec Echap
All checks were successful
Deploy / Deploy to Production (push) Successful in 9s
All checks were successful
Deploy / Deploy to Production (push) Successful in 9s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6618a9e8d9
commit
4c4a96df1e
3 changed files with 11 additions and 5 deletions
File diff suppressed because one or more lines are too long
|
|
@ -128,10 +128,10 @@
|
|||
font-size: 20px;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
display: flex;
|
||||
align-items: top;
|
||||
justify-content: flex-end;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,10 +79,16 @@ function videos(){
|
|||
document.body.classList.add("is-fullscreen");
|
||||
|
||||
let close = document.querySelector("#video__close");
|
||||
close.addEventListener("click", (event) => {
|
||||
function closeFullscreen() {
|
||||
div.remove();
|
||||
document.body.classList.remove("is-fullscreen");
|
||||
});
|
||||
document.removeEventListener("keydown", onEscape);
|
||||
}
|
||||
function onEscape(e) {
|
||||
if (e.key === "Escape") closeFullscreen();
|
||||
}
|
||||
close.addEventListener("click", closeFullscreen);
|
||||
document.addEventListener("keydown", onEscape);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue