AsiaH9-1/modules/e_paper/_latest_slider_aside.html.erb

48 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2021-05-03 03:02:51 +00:00
<div class="latest_slider">
<h3 class="e-annc__widget-title">
<span>{{widget-title}}</span>
<a class="e-paper btn btn-default pull-right" href="/zh_tw/epapers?method=papers"><%= (I18n.locale.to_s =="zh_tw") ? "更多 +" : "More NEWS" %></a>
</h3>
<div class="e-paper cycle-slideshow"
data-level="0"
data-list="categories"
data-cycle-slides=".banner-Container"
data-cycle-fx="carousel"
data-cycle-log="false"
data-cycle-carousel-fluid=true
data-cycle-pause-on-hover="true"
data-cycle-speed="100"
data-cycle-carousel-visible="1"
data-cycle-prev=".cycle-prev"
data-cycle-next=".cycle-next"
data-cycle-swipe=true
data-cycle-swipe-fx="carousel"
>
<div class="banner-Container" data-list="topics" data-level="1">
<div class="item">
<div class="row epaper-container">
<h3>{{category_title}}</h3>
<a href="{{link_to_show}}">
<h4>{{title}}</h4>
<img src="{{img_url_thumb}}" alt="{{title}}">
</a>
<div class="epaper-description">{{description}}</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
var len = 80;
$(".latest_slider .epaper-description").each(function(i){
if($(this).text().length>len){
$(this).attr("title",$(this).text());
var text=$(this).text().substring(0,len-1)+" ...";
$(this).text(text);
}
});
});
</script>