Skip to content

Commit

Permalink
Update Gallery to Boostrap 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Nov 10, 2023
1 parent a12f4da commit 78a79cf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion framework/elements/module_position/module_position.php
Expand Up @@ -26,4 +26,4 @@
if (count($modules)) {
echo '<jdoc:include type="modules" name="' . $position . '" style="'.$module_styles.'" />';
}
echo Astroid\Framework::getDocument()->_positionContent($position, 'after');
echo Astroid\Framework::getDocument()->_positionContent($position, 'after');
98 changes: 49 additions & 49 deletions framework/frontend/blog/gallery.php
Expand Up @@ -29,58 +29,58 @@
?>
<div style="<?php echo $width; ?>" id="article-gallery" class="article-gallery carousel uk-margin-medium slide" data-bs-ride="carousel">
<?php if (!empty($params->get('astroid_article_gallery_bullets', 1))) { ?>
<ol class="carousel-indicators">
<?php foreach ($items as $item) { ?>
<div class="carousel-indicators">
<?php foreach ($items as $item) { ?>
<?php
if (empty($item['image'])) {
continue;
}
?>
<button type="button" data-bs-target="#article-gallery" data-bs-slide-to="<?php echo $index; ?>" class="<?php echo $active ? 'active' : ''; ?>"></button>
<?php
$index++;
$active = false;
}
$active = true;
?>
</div>
<?php } ?>
<div class="carousel-inner">
<?php foreach ($items as $item) { ?>
<?php
if (empty($item['image'])) {
continue;
continue;
}
$hasItems = true;
?>
<li data-bs-target="#article-gallery" data-bs-slide-to="<?php echo $index; ?>" class="<?php echo $active ? 'active' : ''; ?>"></li>
<?php
$index++;
<div class="carousel-item<?php echo $active ? ' active' : ''; ?>">
<?php if (!empty($item['image'])) { ?>
<img class="d-block w-100" src="<?php echo Uri::root() . $item['image']; ?>" alt="<?php echo empty($item['title']) ? '' : $item['title']; ?>">
<?php } ?>
<?php if (!empty($item['title']) || !empty($item['description'])) { ?>
<div class="carousel-caption d-none d-md-block">
<?php if (!empty($item['title'])) { ?>
<h5><?php echo $item['title']; ?></h5>
<?php } ?>
<?php if (!empty($item['description'])) { ?>
<p><?php echo $item['description']; ?></p>
<?php } ?>
</div>
<?php } ?>
</div>
<?php
$active = false;
}
$active = true;
?>
</ol>
<?php } ?>
<div class="carousel-inner">
<?php foreach ($items as $item) { ?>
<?php
if (empty($item['image'])) {
continue;
}
$hasItems = true;
?>
<div class="carousel-item<?php echo $active ? ' active' : ''; ?>">
<?php if (!empty($item['image'])) { ?>
<img class="d-block w-100" src="<?php echo Uri::root() . $item['image']; ?>" alt="<?php echo empty($item['title']) ? '' : $item['title']; ?>">
<?php } ?>
<?php if (!empty($item['title']) || !empty($item['description'])) { ?>
<div class="carousel-caption d-none d-md-block">
<?php if (!empty($item['title'])) { ?>
<h5><?php echo $item['title']; ?></h5>
<?php } ?>
<?php if (!empty($item['description'])) { ?>
<p><?php echo $item['description']; ?></p>
<?php } ?>
</div>
<?php } ?>
</div>
<?php
$active = false;
}
?>
</div>
<?php if ($hasItems && !empty($params->get('astroid_article_gallery_navigation', 1))) { ?>
<a class="carousel-control-prev" href="#article-gallery" role="button" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::_('JPREVIOUS'); ?></span>
</a>
<a class="carousel-control-next" href="#article-gallery" role="button" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::_('JNEXT'); ?></span>
</a>
<?php } ?>
}
?>
</div>
<?php if ($hasItems && !empty($params->get('astroid_article_gallery_navigation', 1))) { ?>
<button class="carousel-control-prev" type="button" data-bs-target="#article-gallery" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden"><?php echo Text::_('JPREVIOUS'); ?></span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#article-gallery" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden"><?php echo Text::_('JNEXT'); ?></span>
</button>
<?php } ?>
</div>

0 comments on commit 78a79cf

Please sign in to comment.