Update gallery.php

Optimisation de l'affichage des photos sur de petits écrans en mode portrait et paysage. Plus "responsive desgin".
This commit is contained in:
brunoduc 2020-03-23 16:38:34 +01:00 committed by GitHub
parent 64157f89f2
commit 5c157189f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 22 deletions

View File

@ -8,26 +8,19 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php $i = 1; ?> <!-- Ajout du début de la ligne row en rajoutant la class rowGallery (on supprime $i et $picturesNb) ********************** -->
<?php $picturesNb = count($module::$pictures); ?> <div class="row galleryRow">
<?php foreach($module::$pictures as $picture => $legend): ?> <?php foreach($module::$pictures as $picture => $legend): ?>
<?php if($i % 4 === 1): ?> <div class="col3">
<div class="row"> <a
<?php endif; ?> href="<?php echo helper::baseUrl(false) . $picture; ?>"
<div class="col3"> class="galleryGalleryPicture"
<a style="background-image:url('<?php echo helper::baseUrl(false) . $picture; ?>')"
href="<?php echo helper::baseUrl(false) . $picture; ?>" data-caption="<?php echo $legend; ?>"
class="galleryGalleryPicture" >
style="background-image:url('<?php echo helper::baseUrl(false) . $picture; ?>')" <?php if($legend): ?>
data-caption="<?php echo $legend; ?>" <div class="galleryGalleryName"><?php echo $legend; ?></div>
> <?php endif; ?>
<?php if($legend): ?> </a>
<div class="galleryGalleryName"><?php echo $legend; ?></div> </div>
<?php endif; ?> <?php endforeach; ?>
</a>
</div>
<?php if($i % 4 === 0 OR $i === $picturesNb): ?>
</div>
<?php endif; ?>
<?php $i++; ?>
<?php endforeach; ?>