smartphone home
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import 'slick-carousel';
|
||||
|
||||
var mobile = false;
|
||||
$(function(){
|
||||
console.log("$ ready !!");
|
||||
|
||||
if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i)){
|
||||
mobile = true;
|
||||
}
|
||||
|
||||
if($(".path-frontpage").length > 0){
|
||||
$('.last-news').slick({
|
||||
@@ -10,6 +13,13 @@ $(function(){
|
||||
slidesToScroll: 1,
|
||||
centerMode: true,
|
||||
centerPadding: '300px',
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 800,
|
||||
settings: {
|
||||
centerPadding: '0',
|
||||
}
|
||||
}]
|
||||
});
|
||||
$('.last-ressources').slick({
|
||||
slidesToShow: 3,
|
||||
@@ -17,6 +27,21 @@ $(function(){
|
||||
centerMode: true,
|
||||
centerPadding: '60px',
|
||||
infinite: true,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 800,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
centerPadding: '0',
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 400,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
centerPadding: '0',
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,6 +80,7 @@ $(function(){
|
||||
centerMode: false,
|
||||
centerPadding: '60px',
|
||||
infinite: false,
|
||||
|
||||
});
|
||||
|
||||
$('#home_blocks-block_3>div>div').slick({
|
||||
@@ -82,9 +108,15 @@ $(function(){
|
||||
|
||||
$('.close-block').click(function(){
|
||||
$(this).parent().fadeOut();
|
||||
if(mobile == true){
|
||||
$("body").css("overflow","auto");
|
||||
}
|
||||
});
|
||||
$('.open-block').click(function(){
|
||||
$(this).prev().css("display","grid");
|
||||
if(mobile == true){
|
||||
$("body").css("overflow","hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", ".header_container header", function(){
|
||||
@@ -177,6 +209,15 @@ $(function(){
|
||||
centerMode: false,
|
||||
// centerPadding: '10%',
|
||||
infinite: false,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 800,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 1,
|
||||
centerPadding: '10px',
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// $('#programmes-block_4').after('<div id="home_map_container" class="home_info_container"></div><div id="home_theme_container" class="home_info_container"></div><div id="home_prog_container" class="home_info_container"></div>');
|
||||
|
Reference in New Issue
Block a user