Add new horizontal masonry and image height allocation

- Move image templates to content/image sub-folder
This commit is contained in:
Hypolite Petovan 2023-09-29 03:28:22 -04:00
parent e01040a2e8
commit 163a85c78f
13 changed files with 410 additions and 39 deletions

View file

@ -42,4 +42,16 @@ class PostMedias extends BaseCollection
{
return parent::current();
}
/**
* Determine whether all the collection's item have at least one set of dimensions provided
*
* @return bool
*/
public function haveDimensions(): bool
{
return array_reduce($this->getArrayCopy(), function (bool $carry, Entity\PostMedia $item) {
return $carry && $item->hasDimensions();
}, true);
}
}