feat(galerias): accept JPEG XL photos and list every uploaded format
This commit is contained in:
1 parent
14dbabcad5
commit
7fa2da73dc
5 files changed
+9
-8
No files matched your search
@@ -6,8 +6,9 @@
|
||||
// tile (without dragging) opens it full size in a <dialog> lightbox with prev /
|
||||
// next, arrow keys, Esc and swipe; the repeated copies are hidden from assistive
|
||||
// tech and open the same photo.
|
||||
$files = glob(rtrim($gallery_path, '/') . '/*.jpg');
|
||||
if (!$files || !is_array($files)) $files = [];
|
||||
// Every format the admin upload accepts (functions_galerias.php), not just .jpg.
|
||||
$files = preg_grep('/\.(jpe?g|png|gif|webp|jxl)$/i', glob(rtrim($gallery_path, '/') . '/*') ?: []);
|
||||
$files = array_values($files ?: []);
|
||||
// Column span per tile, cycled: w = two columns, s = one.
|
||||
$gal_shapes = ['w', 's', 's', 's', 's', 'w', 's', 's', 's', 's', 's'];
|
||||
$gal_label = $gallery_h2 ?? 'Instalações';
|
||||
|
||||
Reference in new issue
Block a user