mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 19:37:05 +00:00
Add list of articles by same author(s) to each article page
It is in the form of a carousel
This commit is contained in:
39
js/article-page.js
Normal file
39
js/article-page.js
Normal file
@@ -0,0 +1,39 @@
|
||||
$(document).ready(function(){
|
||||
// initiate carousel
|
||||
$('.carousel').slick({
|
||||
dots: true,
|
||||
infinite: false,
|
||||
speed: 300,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4,
|
||||
adaptiveHeight: true,
|
||||
autoplay: true,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1024,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 2,
|
||||
dots: true
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// overwrite auto-generated inline styling
|
||||
$(".slick-prev, .slick-next").hide();
|
||||
});
|
||||
Reference in New Issue
Block a user