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:
parent
64157f89f2
commit
5c157189f7
@ -8,26 +8,19 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i = 1; ?>
|
||||
<?php $picturesNb = count($module::$pictures); ?>
|
||||
<!-- Ajout du début de la ligne row en rajoutant la class rowGallery (on supprime $i et $picturesNb) ********************** -->
|
||||
<div class="row galleryRow">
|
||||
<?php foreach($module::$pictures as $picture => $legend): ?>
|
||||
<?php if($i % 4 === 1): ?>
|
||||
<div class="row">
|
||||
<?php endif; ?>
|
||||
<div class="col3">
|
||||
<a
|
||||
href="<?php echo helper::baseUrl(false) . $picture; ?>"
|
||||
class="galleryGalleryPicture"
|
||||
style="background-image:url('<?php echo helper::baseUrl(false) . $picture; ?>')"
|
||||
data-caption="<?php echo $legend; ?>"
|
||||
>
|
||||
<?php if($legend): ?>
|
||||
<div class="galleryGalleryName"><?php echo $legend; ?></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php if($i % 4 === 0 OR $i === $picturesNb): ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
<div class="col3">
|
||||
<a
|
||||
href="<?php echo helper::baseUrl(false) . $picture; ?>"
|
||||
class="galleryGalleryPicture"
|
||||
style="background-image:url('<?php echo helper::baseUrl(false) . $picture; ?>')"
|
||||
data-caption="<?php echo $legend; ?>"
|
||||
>
|
||||
<?php if($legend): ?>
|
||||
<div class="galleryGalleryName"><?php echo $legend; ?></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user