bouton lire la suite
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -220,10 +220,38 @@ $(function(){
 | 
			
		||||
if($(".page-node-type-programme").length > 0 || $(".page-node-type-projet").length > 0 || $(".page-node-type-theme").length > 0){
 | 
			
		||||
	$('.views-element-container header').click(function(){
 | 
			
		||||
		$(this).parent().find(".views-row").fadeToggle();
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	$(".body").append('<footer><a class="more">Lire la suite</a></footer>');
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	//test hauteur
 | 
			
		||||
	let hb = $(".block-region-second .body").height();
 | 
			
		||||
	let ttp = 0;
 | 
			
		||||
	$(".block-region-second .body p").each(function(){
 | 
			
		||||
		ttp = ttp + $(this).height() ;
 | 
			
		||||
	});
 | 
			
		||||
	if(hb < ttp + 30){
 | 
			
		||||
		$(".block-region-second .body").append('<footer><a class="more">Lire la suite</a></footer>');
 | 
			
		||||
	}
 | 
			
		||||
	//reteste on windows resize 
 | 
			
		||||
	window.addEventListener('resize', function(){
 | 
			
		||||
		
 | 
			
		||||
		let hb = $(".block-region-second .body").height();
 | 
			
		||||
		let ttp = 0;
 | 
			
		||||
		$(".block-region-second .body p").each(function(){
 | 
			
		||||
			ttp = ttp + $(this).height() ;
 | 
			
		||||
		});
 | 
			
		||||
		if(hb < ttp+30){
 | 
			
		||||
			
 | 
			
		||||
			if($(".block-region-second .body footer").length == 0){
 | 
			
		||||
				
 | 
			
		||||
				$(".block-region-second .body").append('<footer><a class="more">Lire la suite</a></footer>');
 | 
			
		||||
			}	
 | 
			
		||||
		}else{
 | 
			
		||||
			if($(".block-region-second .body footer").length > 0){
 | 
			
		||||
				$(".block-region-second .body footer").remove();
 | 
			
		||||
			}		
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
	});
 | 
			
		||||
	let elem = "<div class='main_logo'></div>"
 | 
			
		||||
	$('#projets-block_2').prepend(elem);
 | 
			
		||||
 | 
			
		||||
@@ -236,6 +264,8 @@ if($(".page-node-type-programme").length > 0 || $(".page-node-type-projet").leng
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	$(".more").on("click", function(){
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		$(".body").toggleClass("body_open");
 | 
			
		||||
		if($('.body_open').length > 0){
 | 
			
		||||
			$(this).empty().html("Fermer")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user