epaper/modules/e_paper/_latest_slider_aside.html.erb

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-06-15 03:50:03 +00:00
<%= javascript_include_tag "plugin/owl.carousel.min.js"%>
<link rel="stylesheet" type="text/css" href="/assets/template/owl.carousel.min.css">
<link rel="stylesheet" type="text/css" href="/assets/template/owl.theme.default.min.css">
<div class="latest_slider" data-list="categories" data-level="0">
<div class="banner-Container owl-carousel owl-theme" data-list="topics" data-level="1">
<div class="item">
<h3>{{category_title}}</h3>
<div>
<a href="{{link_to_show}}">
<h4>{{title}}</h4>
<img src="{{img_url_thumb}}" alt="{{title}}">
2020-06-15 03:50:03 +00:00
<div class='epaper-description'>{{description}}</div>
</a>
</div>
</div>
</div>
</div>
2020-06-15 03:50:03 +00:00
<script>
$(".owl-carousel").owlCarousel({
loop: true,
center: true,
items: 1,
autoplay: true,
autoplayHoverPause: true,
responsiveClass:true,
responsive:{
600:{
items: 1,
nav:false
}
}
});
$(function(){
var len = 50;
$(".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>