Migrate poster view to alpine

This commit is contained in:
2025-09-22 14:30:23 +02:00
parent dff23fae7f
commit 95e6fff98b
6 changed files with 24 additions and 36 deletions

View File

@@ -111,7 +111,7 @@
top: 0;
left: 0;
z-index: 10;
content: "Click to expand";
content: attr(hover);
color: white;
background-color: rgba(black, 0.5);
}

View File

@@ -1,23 +0,0 @@
$(document).ready(() => {
$("#poster_list #view").click(() => {
$("#view").removeClass("active");
});
$("#poster_list .poster .image").click((e) => {
let el = $(e.target);
if (el.hasClass("image")) {
el = el.find("img");
}
$("#poster_list #view #placeholder").html(el.clone());
$("#view").addClass("active");
});
$(document).keyup((e) => {
if (e.keyCode === 27) {
// escape key maps to keycode `27`
e.preventDefault();
$("#view").removeClass("active");
}
});
});

View File

@@ -34,7 +34,7 @@ body {
z-index: 10;
content: "Click to expand";
content: attr(hover);
color: white;
background-color: rgba(black, 0.5);