Skip to content

Commit

Permalink
Banner style
Browse files Browse the repository at this point in the history
  • Loading branch information
Serov-RA committed Nov 4, 2019
1 parent d50986e commit 27114b8
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions components/widgets/views/banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

?>

<div id="main-banners-carousel" class="carousel slide main_banners" data-ride="carousel">
<div id="main-banners-carousel" class="carousel slide main_banners hidden-xs hidden-sm" data-ride="carousel">
<?php if (count($banners) > 1) { ?>
<!-- Indicators -->
<ol class="carousel-indicators hidden-xs">
<ol class="carousel-indicators">
<?php for ($s = 0; $s < count($banners); $s++) { ?>
<li data-target="#main-banners-carousel" data-slide-to="<?= $s ?>"<?= !$s ? ' class="active"' : '' ?>></li>
<?php } ?>
Expand All @@ -34,8 +34,31 @@

<?php if (count($banners) > 1) { ?>
<!-- Controls -->
<a class="left carousel-control hidden-xs" href="#main-banners-carousel" role="button" data-slide="prev"></a>
<a class="right carousel-control hidden-xs" href="#main-banners-carousel" role="button" data-slide="next"></a>
<a class="left carousel-control" href="#main-banners-carousel" role="button" data-slide="prev"></a>
<a class="right carousel-control" href="#main-banners-carousel" role="button" data-slide="next"></a>
<?php } ?>
</div>

</div>
</div>

<div id="main-banners-carousel_mobile" class="carousel slide main_banners hidden-lg hidden-md" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<?php for ($s = 0; $s < count($banners); $s++) { ?>
<<?= $banners[$s]->link ? 'a href="'.$banners[$s]->link.'"' : 'div' ?> class="item<?= !$s ? ' active' : '' ?>">
<div class="banner_caption">
<?= $banners[$s]->banner_text ?>
</div>
<?= file_exists($banners[$s]->uploadFolder.'/'.$banners[$s]->id.'.jpg') ? Html::img($banners[$s]->getPreview($banners[$s]->uploadFolder.'/'.$banners[$s]->id.'.jpg', 1440, 500, true)) : '' ?>
<div class="carousel-caption"></div>
</<?= $banners[$s]->link ? 'a' : 'div' ?>>
<?php } ?>
</div>
</div>

<div class="container content_block">
<div class="container_content_block">



0 comments on commit 27114b8

Please sign in to comment.