AsiaV2b/modules/ad_banner/_ad_banner_widget1.html.erb

82 lines
3.3 KiB
Plaintext
Raw Normal View History

2021-09-03 03:45:44 +00:00
<div class="w-ad-banner w-ba-banner ad-banner-widget-1 ba-banner-widget-1">
<div class="w-ad-banner__wrap w-ba-banner__wrap cycle-slideshow"
2021-04-19 03:12:17 +00:00
data-list="images"
data-level="0"
data-cycle-slides=".w-ba-banner__slide"
data-cycle-log="false"
data-overlay=".w-ad-banner__overlay_{{subpart-id}}"
data-cycle-auto-height="{{base_image}}"
data-cycle-speed="{{speed}}"
data-cycle-timeout="{{timeout}}"
data-cycle-fx="{{ad_fx}}"
data-cycle-pager=".banner_caption_{{subpart-id}}"
2021-09-03 03:45:44 +00:00
data-pager-template=""
2021-04-19 03:12:17 +00:00
data-pager-active-class="active-slide"
data-cycle-swipe=true
data-cycle-swipe-fx="scrollHorz"
>
2021-09-03 03:45:44 +00:00
<div class="w-ad-banner__slide w-ba-banner__slide {{class}}"
2021-04-19 03:12:17 +00:00
data-link="{{link}}"
data-cycle-title="{{title}}"
data-cycle-desc="{{context}}"
data-overlay-template="<h3>{{title}}</h3><p>{{desc}}</p>"
data-target="{{target}}"
>
<a href="{{link}}" target="{{target}}" title="{{alt_title}}">
2021-09-03 03:45:44 +00:00
<img class="w-ad-banner__image w-ba-banner__image banner-responsive" src="{{image_link}}" alt="{{alt_title}}">
2021-04-19 03:12:17 +00:00
</a>
</div>
</div>
2021-09-03 03:45:44 +00:00
<div class="w-ad-banner__caption ad-overlay w-ba-banner__caption w-ad-banner__caption w-ad-banner__overlay_{{subpart-id}}"></div>
<div class="w-ad-banner__pager-1 w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0">
<li><button title="Slide {{slide_number}}"><span style="display: none;">Slide {{slide_number}}</span></button></li>
</div>
2021-05-03 02:29:25 +00:00
<ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul>
<ul class="button-mid">
2021-04-19 03:12:17 +00:00
<i class="fa fa-angle-left prev-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>"></i>
<i class="fa fa-angle-right next-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>"></i>
2021-05-03 02:29:25 +00:00
</ul>
2021-04-19 03:12:17 +00:00
</div>
<script>
2021-05-03 02:29:25 +00:00
var flag = 1;
$('.pause-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
$(this).addClass('active')
$(this).parents('.controlplay').eq(0).find('.resume-slide').removeClass('active')
});
$('.resume-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume');
$(this).addClass('active')
$(this).parents('.controlplay').eq(0).find('.pause-slide').removeClass('active')
});
$('.next-button').off('click').on('click',function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
})
$('.prev-button').off('click').on('click',function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
2021-04-19 03:12:17 +00:00
})
2021-05-03 02:29:25 +00:00
</script>
<style type="text/css">
2021-09-03 03:45:44 +00:00
.w-ba-banner .controlplay .resume-slide.active i{
2021-05-03 02:29:25 +00:00
color: #32D9C3;
}
2021-09-03 03:45:44 +00:00
.w-ba-banner .controlplay .pause-slide.active i{
2021-05-03 02:29:25 +00:00
color: #ff4500;
}
2021-09-03 03:45:44 +00:00
.w-ba-banner .controlplay{
width: auto;
}
.w-ba-banner .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.next-button,.prev-button{
cursor: pointer;
}
2021-05-03 02:29:25 +00:00
</style>