Use Bootstrap for album/photo grid #31
@ -51,7 +51,7 @@ class PhotosIndex extends Template
|
||||
{
|
||||
list($photos, $what) = $row;
|
||||
$this->header($photos);
|
||||
$this->$what($photos);
|
||||
$this->$what($photos, $i % 2);
|
||||
}
|
||||
|
||||
echo '
|
||||
@ -115,7 +115,7 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function panorama(array $photos)
|
||||
protected function panorama(array $photos, $altLayout)
|
||||
{
|
||||
foreach ($photos as $image)
|
||||
{
|
||||
@ -131,12 +131,13 @@ class PhotosIndex extends Template
|
||||
}
|
||||
}
|
||||
|
||||
protected function portrait(array $photos)
|
||||
protected function portrait(array $photos, $altLayout)
|
||||
{
|
||||
$image = array_shift($photos);
|
||||
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-feat-portrait">
|
||||
<div class="row g-5 mb-5 tile-feat-portrait',
|
||||
$altLayout ? ' flex-row-reverse' : '', '">
|
||||
<div class="col-md-4">';
|
||||
|
||||
$this->photo($image, 'portrait', static::PORTRAIT_WIDTH, static::PORTRAIT_HEIGHT, 'centre');
|
||||
@ -163,12 +164,13 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function landscape(array $photos)
|
||||
protected function landscape(array $photos, $altLayout)
|
||||
{
|
||||
$image = array_shift($photos);
|
||||
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-feat-landscape">
|
||||
<div class="row g-5 mb-5 tile-feat-landscape',
|
||||
$altLayout ? ' flex-row-reverse' : '', '">
|
||||
<div class="col-md-8">';
|
||||
|
||||
$this->photo($image, 'landscape', static::LANDSCAPE_WIDTH, static::LANDSCAPE_HEIGHT, 'top');
|
||||
@ -195,7 +197,7 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function duo(array $photos)
|
||||
protected function duo(array $photos, $altLayout)
|
||||
{
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-duo">';
|
||||
@ -215,7 +217,7 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function single(array $photos)
|
||||
protected function single(array $photos, $altLayout)
|
||||
{
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-single">
|
||||
@ -229,7 +231,7 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function landscapes(array $photos)
|
||||
protected function landscapes(array $photos, $altLayout)
|
||||
{
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-row-landscapes">';
|
||||
@ -249,7 +251,7 @@ class PhotosIndex extends Template
|
||||
</div>';
|
||||
}
|
||||
|
||||
protected function portraits(array $photos)
|
||||
protected function portraits(array $photos, $altLayout)
|
||||
{
|
||||
echo '
|
||||
<div class="row g-5 mb-5 tile-row-portraits">';
|
||||
|
Loading…
Reference in New Issue
Block a user