forked from Public/pics
PhotoPage: trying out blur on the photo page
This commit is contained in:
parent
66478c5922
commit
aa82efe03e
@ -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 {
|
||||
|
@ -67,17 +67,31 @@ class PhotoPage extends Template
|
||||
protected function photo()
|
||||
{
|
||||
echo '
|
||||
<div id="photo_frame">
|
||||
<a href="', $this->photo->getUrl(), '">';
|
||||
<a href="', $this->photo->getUrl(), '">
|
||||
<div id="photo_frame">';
|
||||
|
||||
if ($this->photo->isPortrait())
|
||||
echo $this->photo->getInlineImage(null, 960);
|
||||
{
|
||||
echo '
|
||||
<figure id="photo-figure" class="portrait-figure" style="aspect-ratio: ', $this->photo->ratio(), '">',
|
||||
$this->photo->getInlineImage(null, 960, 'normal-photo'),
|
||||
$this->photo->getInlineImage(null, 960, 'blur-photo'), '
|
||||
</figure>';
|
||||
}
|
||||
else
|
||||
echo $this->photo->getInlineImage(1280, null);
|
||||
{
|
||||
$className = $this->photo->isPanorama() ? 'panorama-figure' : 'landscape-figure';
|
||||
echo '
|
||||
<figure id="photo-figure" class="', $className, '" style="aspect-ratio: ', $this->photo->ratio(), '">',
|
||||
$this->photo->getInlineImage(1280, null, 'normal-photo'),
|
||||
$this->photo->getInlineImage(1280, null, 'blur-photo'), '
|
||||
</figure>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</a>
|
||||
</div>';
|
||||
</figure>
|
||||
</div>
|
||||
</a>';
|
||||
}
|
||||
|
||||
private function photoNav()
|
||||
|
Loading…
Reference in New Issue
Block a user