Home > slideshow > videos verticales incluses dans paires
All checks were successful
Deploy / Deploy to Production (push) Successful in 8s
All checks were successful
Deploy / Deploy to Production (push) Successful in 8s
This commit is contained in:
parent
4412a0a01a
commit
3486ae9c6c
10 changed files with 85 additions and 43 deletions
|
|
@ -11,8 +11,13 @@ return function($site) {
|
|||
$file = $files->nth($i);
|
||||
$nextFile = $files->nth($i + 1);
|
||||
|
||||
$isPortrait = $file->type() === 'image' && $file->orientation() === 'portrait';
|
||||
$nextIsPortrait = $nextFile && $nextFile->type() === 'image' && $nextFile->orientation() === 'portrait';
|
||||
dump($file->filename() . ' / type=' . $file->type());
|
||||
dump($file->fileOrientation());
|
||||
|
||||
$isPortrait = in_array($file->type(), ['image', 'video'], true)
|
||||
&& $file->fileOrientation() === 'portrait';
|
||||
$nextIsPortrait = $nextFile
|
||||
&& in_array($nextFile->type(), ['image', 'video'], true) && $nextFile->fileOrientation() === 'portrait';
|
||||
|
||||
if ($isPortrait && $nextIsPortrait) {
|
||||
$units[] = ['pair' => true, 'a' => $file, 'b' => $nextFile];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue