<?php //custom css - $stylesheet = array('admin/plugins/albuns/css/gridGallery.css');
?>
<?php include PATH_VIEW . '/layout/header.tpl'; ?>

<div id="ajaxArea">
    <div class="container bg-body-tertiary p-3">
        <h1 class="visually-hidden"><?php echo $setting->title_site; ?></h1>

        <?php if (statusModule('publish', 'sliders') == 1) { ?>
            <?php if ($sliders) { ?>
                <div id="slide" class="carousel slide mb-4" data-bs-ride="carousel">
                    <div class="carousel-inner">
                        <?php foreach ($sliders as $slider) {
                            $slider_count++; ?>
                            <div class="carousel-item <?php echo ($slider_count == 1) ? 'active' : ''; ?>" data-bs-interval="7000">
                                <?php if (empty($slider->link)) { ?>
                                    <img <?php echo ($slider_count == 1) ? 'loading="lazy"' : ''; ?> src="<?php echo PATH_SYSTEM . "public/slider/" . $slider->image; ?>" class="d-block w-100" alt="<?php echo $slider->title; ?>">
                                <?php } else { ?>
                                    <a href="<?php echo $slider->link; ?>" target="<?php echo $slider->link_target; ?>">
                                        <img <?php echo ($slider_count == 1) ? 'loading="lazy"' : ''; ?> src="<?php echo PATH_SYSTEM . "public/slider/" . $slider->image; ?>" class="d-block w-100" alt="<?php echo $slider->title; ?>">
                                    </a>
                                <?php } ?>
                                <?php if (!empty($slider->title)) { ?>
                                    <div class="carousel-caption d-none d-md-block">
                                        <h5><?php echo $slider->title; ?></h5>
                                    </div>
                                <?php } ?>
                            </div>
                        <?php } ?>
                    </div>
                    <button class="carousel-control-prev" type="button" data-bs-target="#slide" data-bs-slide="prev">
                        <span class="prev" aria-hidden="true"><i class="fas fa-angle-left"></i></span>
                        <span class="visually-hidden"><?php echo $_LANG['previous']; ?></span>
                    </button>
                    <button class="carousel-control-next" type="button" data-bs-target="#slide" data-bs-slide="next">
                        <span class="next" aria-hidden="true"><i class="fas fa-angle-right"></i></span>
                        <span class="visually-hidden"><?php echo $_LANG['next']; ?></span>
                    </button>
                </div>
            <?php } ?>
        <?php } ?>


        <div class="row">
            <div class="col-md-3">
                <aside>
                    <section id="column2" class="row">
                        <?php
                        $widgetPos = 3;
                        include PATH_VIEW . '/layout/widget.tpl';
                        ?>
                    </section>
                </aside>
            </div>

            <div class="col-md-6">
                <section id="column1" class="row">
                    <?php
                    $widgetPos = 2;
                    include PATH_VIEW . '/layout/widget.tpl';
                    ?>
                </section>
            </div>

            <div class="col-md-3">
                <aside>
                    <section id="column2" class="row">
                        <?php
                        $widgetPos = 4;
                        include PATH_VIEW . '/layout/widget.tpl';
                        ?>
                    </section>
                </aside>
            </div>

        </div>
    </div>
</div>

<?php include PATH_VIEW . '/layout/footer.tpl'; ?>
