FEAUTRE Introducing basi block features
This commit is contained in:
parent
a53f5b6172
commit
87414f42df
42
plugins/carhop-blocks/acf-blocks/gallery/gallery.php
Normal file
42
plugins/carhop-blocks/acf-blocks/gallery/gallery.php
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
$gallery = get_field('gallery');
|
||||||
|
|
||||||
|
|
||||||
|
// Charger le script JavaScript
|
||||||
|
wp_enqueue_script('carhop-gallery-view');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="block-gallery gallery content-section">
|
||||||
|
<div class="gallery__slider">
|
||||||
|
<?php if ($gallery && is_array($gallery)) : ?>
|
||||||
|
<div class="swiper gallery-swiper">
|
||||||
|
<div class="swiper-wrapper">
|
||||||
|
<?php foreach ($gallery as $image) : ?>
|
||||||
|
<div class="swiper-slide">
|
||||||
|
<div class="gallery-card">
|
||||||
|
<div class="gallery-card__image">
|
||||||
|
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="swiper-pagination-fraction"></div>
|
||||||
|
<div class="swiper-pagination"></div>
|
||||||
|
|
||||||
|
<div class="swiper-controls">
|
||||||
|
<div class="swiper-button-prev"></div>
|
||||||
|
<div class="swiper-button-next"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
Loading…
Reference in New Issue
Block a user