From aa82efe03e29787ebfc3f4da34c612ca461e625e Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Fri, 10 Nov 2023 22:50:51 +0100 Subject: [PATCH] PhotoPage: trying out blur on the photo page --- public/css/default.css | 52 +++++++++++++++++++++++++++++++++++------ templates/PhotoPage.php | 26 ++++++++++++++++----- 2 files changed, 65 insertions(+), 13 deletions(-) diff --git a/public/css/default.css b/public/css/default.css index d2d0edb..c3ff9bd 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -390,22 +390,60 @@ footer a { /* Styling for the photo pages --------------------------------*/ -#photo_frame { - padding-top: 1.5vh; - text-align: center; -} -#photo_frame a { +#photo-figure { + position: relative; } -#photo_frame a img { +#photo-figure img.normal-photo { border: none; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); cursor: -moz-zoom-in; display: inline-block; - height: 97vh; max-width: 100%; object-fit: contain; width: auto; + z-index: 20; + position: absolute; + left: 0; + top: 0; +} +#photo-figure img.blur-photo { + filter: blur(50px); + left: 0; + object-fit: contain; + position: absolute; + top: 0; + width: auto; + z-index: 0; +} + +#photo_frame { + padding-top: 1.5vh; + text-align: center; + height: 97vh; +} + +figure.portrait-figure, +figure.landscape-figure { + height: 97vh; + margin: 0 auto; +} +figure.panorama-figure { + width: 90vw; + object-fit: cover; + margin: 0 auto; +} +figure.portrait-figure img.normal-photo, +figure.portrait-figure img.blur-photo, +figure.landscape-figure img.normal-photo, +figure.landscape-figure img.blur-photo { + height: 100%; + width: 100%; +} +figure.panorama-figure img.normal-photo, +figure.panorama-figure img.blur-photo { + width: 100%; + height: auto; } #previous_photo, #next_photo { diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 52b6fe5..f26a8c7 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -67,17 +67,31 @@ class PhotoPage extends Template protected function photo() { echo ' -
- '; + + '; + +
+ '; } private function photoNav()