Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel image size #1858

Merged
merged 1 commit into from
Sep 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion upload/catalog/view/theme/default/stylesheet/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,10 @@ h2.price {


.flexslider .slides img {
width: auto !important;
width: inherit;
}
.flexslider.carousel .slides img {
width: auto;
}
.slides {
padding: 0;
Expand Down
40 changes: 20 additions & 20 deletions upload/catalog/view/theme/default/template/module/carousel.tpl
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<div id="carousel<?php echo $module; ?>" class="flexslider">
<ul class="slides">
<?php foreach ($banners as $banner) { ?>
<?php if ($banner['link']) { ?>
<li><a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" /></a></li>
<?php } else { ?>
<li><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" /></li>
<?php } ?>
<?php } ?>
</ul>
</div>
<script type="text/javascript"><!--
$(window).load(function() {
$('#carousel<?php echo $module; ?>').flexslider({
animation: 'slide',
itemWidth: 130,
itemMargin: 100,
minItems: 2,
maxItems: 4
});});
<div id="carousel<?php echo $module; ?>" class="flexslider carousel">
<ul class="slides">
<?php foreach ($banners as $banner) { ?>
<?php if ($banner['link']) { ?>
<li><a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" /></a></li>
<?php } else { ?>
<li><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" /></li>
<?php } ?>
<?php } ?>
</ul>
</div>
<script type="text/javascript"><!--
$(window).load(function() {
$('#carousel<?php echo $module; ?>').flexslider({
animation: 'slide',
itemWidth: 130,
itemMargin: 100,
minItems: 2,
maxItems: 4
});});
--></script>