diff --git a/public/css/default.css b/public/css/default.css index d2d0edb5..c3ff9bd2 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 52b6fe59..f26a8c7b 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -67,17 +67,31 @@ class PhotoPage extends Template protected function photo() { echo ' -
- '; + +
'; if ($this->photo->isPortrait()) - echo $this->photo->getInlineImage(null, 960); + { + echo ' +
', + $this->photo->getInlineImage(null, 960, 'normal-photo'), + $this->photo->getInlineImage(null, 960, 'blur-photo'), ' +
'; + } else - echo $this->photo->getInlineImage(1280, null); + { + $className = $this->photo->isPanorama() ? 'panorama-figure' : 'landscape-figure'; + echo ' +
', + $this->photo->getInlineImage(1280, null, 'normal-photo'), + $this->photo->getInlineImage(1280, null, 'blur-photo'), ' +
'; + } echo ' -
-
'; + +
+ '; } private function photoNav()