forked from ZwiiCMS-Team/ZwiiCMS
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>
|
||||||
</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; ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?php if($i % 4 === 0 OR $i === $picturesNb): ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php $i++; ?>
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
Loading…
Reference in New Issue
Block a user