forked from Public/pics
Add double-density thumbnails to albums and photo pages
This commit is contained in:
parent
12407d797d
commit
474c387786
@ -65,11 +65,9 @@ class PhotoPage extends SubTemplate
|
|||||||
<a href="', $this->photo->getUrl(), '">';
|
<a href="', $this->photo->getUrl(), '">';
|
||||||
|
|
||||||
if ($this->photo->isPortrait())
|
if ($this->photo->isPortrait())
|
||||||
echo '
|
echo $this->photo->getInlineImage(null, 960);
|
||||||
<img src="', $this->photo->getThumbnailUrl(null, 960), '" alt="">';
|
|
||||||
else
|
else
|
||||||
echo '
|
echo $this->photo->getInlineImage(1280, null);
|
||||||
<img src="', $this->photo->getThumbnailUrl(1280, null), '" alt="">';
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</a>
|
</a>
|
||||||
|
@ -90,8 +90,14 @@ class PhotosIndex extends SubTemplate
|
|||||||
<a class="edit" href="', BASEURL, '/editasset/?id=', $image->getId(), '">Edit</a>';
|
<a class="edit" href="', BASEURL, '/editasset/?id=', $image->getId(), '">Edit</a>';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<a href="', $image->getPageUrl(), $this->url_suffix, '">
|
<a href="', $image->getPageUrl(), $this->url_suffix, '#photo_frame">
|
||||||
<img src="', $image->getThumbnailUrl($width, $height, $crop, $fit), '" alt="" title="', $image->getTitle(), '">';
|
<img src="', $image->getThumbnailUrl($width, $height, $crop, $fit), '"';
|
||||||
|
|
||||||
|
// Can we offer double-density thumbs?
|
||||||
|
if ($image->width() >= $width * 2 && $image->height() >= $height * 2)
|
||||||
|
echo ' srcset="', $image->getThumbnailUrl($width * 2, $height * 2, $crop, $fit), ' 2x"';
|
||||||
|
|
||||||
|
echo ' alt="" title="', $image->getTitle(), '">';
|
||||||
|
|
||||||
if ($this->show_labels)
|
if ($this->show_labels)
|
||||||
echo '
|
echo '
|
||||||
|
Loading…
Reference in New Issue
Block a user