modif css

This commit is contained in:
2020-01-20 11:51:20 +01:00
parent 7ca69e1549
commit b81be5ec03
178 changed files with 14005 additions and 187 deletions
+53 -24
View File
@@ -13,6 +13,7 @@ function click_link() {
cat = url[2];
project_name = url[3];
console.log(project_name);
if ($this.hasClass('open')) {
$this.removeClass('open');
$('#item_list.'+ cat).remove();
@@ -29,12 +30,12 @@ function click_link() {
$(data).find('#item_list').addClass(cat).insertAfter($this);
$this.addClass('open');
lazy();
},
},
complete: function(data) {
// console.log('cat', cat);
$loader.hide();
click_img(e, $this, $href, url, page, cat, project_name);
closeAjax();
// console.log('cat', cat);
$loader.hide();
click_img(e, $this, $href, url, page, cat, project_name);
closeAjax();
},
});
}
@@ -46,6 +47,12 @@ function click_list() {
$link.click(function(e) {
$('.sidebar-right, .sidebar-right button.hamburger').removeClass('is-active');
var idthis = $(this).attr("id");
var $loader = $(this).parents('#start').find('#text_figli #'+idthis+' .loader');
console.log('$loader',$loader);
e.preventDefault();
var $this = $(this);
$href = $this.attr("href");
@@ -86,6 +93,8 @@ function click_list() {
$('#item_list').remove();
$('.open').removeClass('open');
$loader.css('display','inline-block');
$.ajax({
url : '/' + page + '/' + cat, // La ressource ciblée
type : 'GET', // Le type de la requête HTTP
@@ -102,12 +111,14 @@ function click_list() {
},
complete: function(data) {
// console.log('cat', cat);
$loader.hide();
var $link_card = $('.card > #'+project_name + ' a');
setTimeout( function(){
// console.log('project_name', project_name);
// console.log('$link_card', $link_card);
if ($link_card.hasClass('open')) {
}else {
} else {
anchor($href);
$.ajax({
url : '/' + page + '/' + cat + '/' + project_name, // La ressource ciblée
@@ -200,12 +211,12 @@ function marg_item(project_name) {
var $item = $('.card-image#'+project_name+' #item');
var $card = $item.parents('.card');
var pos_card = $card.offset().left-8;
var pos_card = $card.offset().left-16;
$item.css('margin-left', '-'+pos_card +'px');
$(window).resize(function() {
var pos_card = $card.offset().left-8;
var pos_card = $card.offset().left-16;
$item.css('margin-left', '-'+pos_card +'px');
})
}
@@ -300,15 +311,19 @@ function scrollTop() {
function imgmouse() {
var currentMousePos = { x: 0, y: 0 };
var $list_projets = $('.list-projets');
var $img = $('.list-projets .img');
$(document).mousemove(function(event) {
currentMousePos.x = event.pageX;
currentMousePos.y = event.pageY;
$list_projets.mousemove(function(e) {
var pos = $list_projets.offset();
currentMousePos.x = e.pageX - pos.left ;
currentMousePos.y = e.pageY - pos.top;
$img.css('left', currentMousePos.x );
$img.css('top', currentMousePos.y );
});
}
function scrollreveal() {
@@ -318,18 +333,6 @@ function scrollreveal() {
duration: 1000,
distance: '10px',
});
var $button = $('.sidebar button');
var $title_menu = $('.title-menu h2');
$button.click(function() {
ScrollReveal().destroy($txt, {
duration: 1000,
distance: '10px',
});
});
}
function clickmenu() {
@@ -337,10 +340,36 @@ function clickmenu() {
$menu.click(function() {
$('#text_figli').toggleClass('hidden');
})
$('html, body').toggleClass('hidden');
});
var $list_projetsA = $('.list-projets .container a');
$list_projetsA.click(function() {
$('#text_figli').toggleClass('hidden');
$('html, body').toggleClass('hidden');
});
}
function scrollcustom() {
$(window).on("load",function(){
// $(".sidebar-right").mCustomScrollbar({
// scrollbarPosition: "outside",
// axis:"y",
// });
//
// $("body").mCustomScrollbar({
// scrollbarPosition: "outside",
// axis:"y",
// });
});
}
$(document).ready(function($){
scrollcustom();
scrollreveal();
click_link();
click_list();