From d1439514a8c13bc137b276805adb532415162942 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 25 May 2024 14:26:48 +0200 Subject: [PATCH] showing big image on thumbnail click --- res/forum/home/home.html | 6 ++++-- res/forum/style.css | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/res/forum/home/home.html b/res/forum/home/home.html index 8ca1b9a..b1f0e66 100644 --- a/res/forum/home/home.html +++ b/res/forum/home/home.html @@ -29,7 +29,7 @@ "" + "
" + - "
Název: " + result[i].title + "
" + + "
Název: " + result[i].title + "
" + "
Autor: " + result[i].username + "
" + ((result[i].description != null) ? "
Popis:
" + result[i].description + "
" : "") + "
" + @@ -95,6 +95,8 @@ $(document).on("click", ".post_image", function(event) { - console.log($(this).children("img").attr("src")); + $("#image_popup").css("display", "flex"); + $("#image_popup").children("img").attr("src", $(this).children("img").attr("src")); + $("#image_popup").children("img").attr("alt", $(this).parent(".post").children(".post_info").children("div").children(".post_name").html()); }); \ No newline at end of file diff --git a/res/forum/style.css b/res/forum/style.css index 3d75f7f..1c7d2a5 100644 --- a/res/forum/style.css +++ b/res/forum/style.css @@ -311,7 +311,8 @@ body border: solid 1px #3E392F; border-radius: 0.5vh 0.5vh; background-color: #555; - display: flex; + + display: none; justify-content: center; }