PhotoMosaic: add sixLandscapes layout, combining side and row
This commit is contained in:
parent
d42c3c142c
commit
efb35cfd6a
@ -32,6 +32,10 @@ class PhotoMosaic
|
|||||||
// Single panorama
|
// Single panorama
|
||||||
'panorama' => [Image::TYPE_PANORAMA],
|
'panorama' => [Image::TYPE_PANORAMA],
|
||||||
|
|
||||||
|
// A whopping six landscapes?
|
||||||
|
'sixLandscapes' => [Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE,
|
||||||
|
Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE],
|
||||||
|
|
||||||
// Big-small juxtapositions
|
// Big-small juxtapositions
|
||||||
'sidePortrait' => [Image::TYPE_PORTRAIT, Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE,
|
'sidePortrait' => [Image::TYPE_PORTRAIT, Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE,
|
||||||
Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE],
|
Image::TYPE_LANDSCAPE, Image::TYPE_LANDSCAPE],
|
||||||
|
@ -137,6 +137,13 @@ class PhotosIndex extends Template
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function sixLandscapes(array $photos, $altLayout)
|
||||||
|
{
|
||||||
|
$chunks = array_chunk($photos, 3);
|
||||||
|
$this->sideLandscape($chunks[0], $altLayout);
|
||||||
|
$this->threeLandscapes($chunks[1], $altLayout);
|
||||||
|
}
|
||||||
|
|
||||||
protected function sidePortrait(array $photos, $altLayout)
|
protected function sidePortrait(array $photos, $altLayout)
|
||||||
{
|
{
|
||||||
$image = array_shift($photos);
|
$image = array_shift($photos);
|
||||||
|
Loading…
Reference in New Issue
Block a user