diff --git a/models/PhotoMosaic.php b/models/PhotoMosaic.php index 2365836..5d61c1d 100644 --- a/models/PhotoMosaic.php +++ b/models/PhotoMosaic.php @@ -115,6 +115,10 @@ class PhotoMosaic // Sort photos by priority and date captured. usort($photos, 'self::orderPhotos'); + // Three portraits? + if ($num_portrait === 3) + return [$photos, 'portraits']; + // At least one portrait? if ($num_portrait >= 1) { diff --git a/templates/PhotosIndex.php b/templates/PhotosIndex.php index da7b8c4..47daf87 100644 --- a/templates/PhotosIndex.php +++ b/templates/PhotosIndex.php @@ -241,4 +241,24 @@ class PhotosIndex extends SubTemplate echo ' '; } + + protected function portraits(array $photos) + { + echo ' +