first commit
This commit is contained in:
+12
File diff suppressed because one or more lines are too long
@@ -0,0 +1,111 @@
|
||||
// function hovercat() {
|
||||
// var $work = $('.navbar > ul > li:nth-child(1)');
|
||||
// var $workafter = $('.navbar > ul > li:nth-child(1)::after');
|
||||
// var $cat = $('.navbar > ul.tags');
|
||||
//
|
||||
// $work.hover(
|
||||
// function() {
|
||||
// $( this ).addClass( "hover" );
|
||||
// $(this).parents().find('.tags').addClass("visible");
|
||||
// }, function() {
|
||||
// $( this ).removeClass( "hover" );
|
||||
// $(this).parents().find('.tags').removeClass("visible");
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// $cat.hover(
|
||||
// function() {
|
||||
// $( this ).addClass( "visible" );
|
||||
// $(this).parents().find($work).addClass('hover');
|
||||
// }, function() {
|
||||
// $( this ).removeClass( "visible" );
|
||||
// $(this).parents().find($work).removeClass('hover');
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
|
||||
function catprojets() {
|
||||
$(window).load(function () {
|
||||
var $content = $('.content');
|
||||
var $txt = $('#items .content .txt');
|
||||
var $cat = $('#items .content .taxonomy');
|
||||
|
||||
var $Hcontent = $content.outerHeight();
|
||||
var $Hcat = $cat.outerHeight();
|
||||
var $Htxt = $Hcontent - $Hcat;
|
||||
|
||||
$txt.css({
|
||||
"height" : $Htxt + "px"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function removeAct(){
|
||||
var $cat = $('.navbar > ul.tags');
|
||||
var $work = $('.navbar > ul:first-child > li:first-child .cat');
|
||||
var $start = $("body #start");
|
||||
|
||||
$work.click(function(event) {
|
||||
event.preventDefault();
|
||||
$(this).parents('.navbar').find('.tags').toggleClass('visible');
|
||||
$(this).parents('.navbar').find(' ul > li:first-child').toggleClass('act');
|
||||
});
|
||||
|
||||
$start.click(function(event) {
|
||||
$(this).parents('#top').find('.tags').removeClass('visible');
|
||||
$(this).parents('#top').find(' ul > li:first-child').removeClass('act');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function scrollreveal() {
|
||||
var slideUp = {
|
||||
distance: '0%',
|
||||
interval: 20,
|
||||
origin: 'top',
|
||||
};
|
||||
|
||||
ScrollReveal().reveal('.card', slideUp);
|
||||
ScrollReveal().reveal('#body-wrapper img', slideUp);
|
||||
ScrollReveal().reveal('.item .news', slideUp);
|
||||
|
||||
}
|
||||
|
||||
function burger() {
|
||||
var $col = $('.col');
|
||||
var $colOpen = $('.navbar ul.open');
|
||||
|
||||
$col.click(function(e){
|
||||
$(this).parents('.navbar').find('ul:first-child').toggleClass('open');
|
||||
})
|
||||
}
|
||||
|
||||
function deplacement_cat() {
|
||||
var $cat = $('.navbar .tags');
|
||||
var $projets = $('.navbar ul li:first-child');
|
||||
|
||||
var result = document.getElementById('result');
|
||||
if (window.matchMedia("(min-width: 700px)").matches) {
|
||||
/* La largeur minimum de l'affichage est 600 px inclus */
|
||||
} else {
|
||||
/* L'affichage est inférieur à 600px de large */
|
||||
$projets.after($cat);
|
||||
}
|
||||
|
||||
if("matchMedia" in window) { // Détection
|
||||
if(window.matchMedia("(min-width:700px)").matches) {
|
||||
} else {
|
||||
$projets.after($cat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
burger();
|
||||
scrollreveal();
|
||||
removeAct();
|
||||
catprojets();
|
||||
deplacement_cat();
|
||||
window.addEventListener('resize', deplacement_cat, false);
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user