Commit bef6b62c authored by Étienne Oz's avatar Étienne Oz 🖖

effet resize

parent d2e8021c
w/site/templates/style/main.css
# ProcessWire Files And Folders
.DS_Store?
.DS_Store
*.old
*.old/*
*.new
*.new/*
old
old/*
*[a-z].1
*[a-z].1/*
sess_*
*.cache
*.swp
*.swo
site-default/config-dev.php
site-default/assets/logs
site-default/assets/files
site-default/assets/sessions
site-default/assets/cache
site-default/assets/installed.php
site-skyscrapers
.htaccess
pw/site/templates/style/main.css
# ProcessWire Files And Folders
.DS_Store?
.DS_Store
*.old
*.old/*
*.new
*.new/*
old
old/*
*[a-z].1
*[a-z].1/*
sess_*
*.cache
*.swp
*.swo
site-default/config-dev.php
site-default/assets/logs
site-default/assets/files
site-default/assets/sessions
site-default/assets/cache
site-default/assets/installed.php
site-skyscrapers
......@@ -6,7 +6,7 @@
<section id="projets">
<div class="grid">
<?php for ($i=0; $i < 1; $i++) { ?>
<?php for ($i=0; $i < 5; $i++) { ?>
<?php foreach ($projets as $projet): ?>
<?php
......
// function classContent(article){
// var filter = $('.categories').find('li');
// filter.click(function(){
// var theClass = $(this).attr('class').split(' ')[0];
// if (!$(this).hasClass('beyond')){
// $(this).addClass('beyond');
// article.removeClass('beyond').addClass('behind');
// $('#projets').find('.'+theClass).addClass('beyond');
// } else {
// $(this).removeClass('beyond');
// if (!filter.hasClass('beyond')) {
// article.removeClass('beyond').removeClass('behind');
// } else{
// $('#projets').find('.'+theClass).removeClass('beyond').addClass('behind');
// }
// }
// })
// }
function classContent(article){
var filter = $('.categories').find('li');
filter.click(function(){
zoomContent(article);
var theClass = $(this).attr('class').split(' ')[0];
var theArticles = $('section:nth-of-type(1)').find('.'+theClass);
// var articlesOffset = [];
// theArticles.each(function(){
// theId = $(this).attr('data-id');
// theOffset = $(this).offset().top;
// articlesOffset.push({id: theId, offset: theOffset});
// })
// console.log(articlesOffset);
var lastOffset = theArticles.last().offset().top;
console.log(lastOffset);
if (!$(this).hasClass('beyond')){
$(this).addClass('beyond');
article.removeClass('beyond').addClass('behind');
$('#projets').find('.'+theClass).addClass('beyond');
} else {
$(this).removeClass('beyond');
if (!filter.hasClass('beyond')) {
article.removeClass('beyond').removeClass('behind');
} else{
$('#projets').find('.'+theClass).removeClass('beyond').addClass('behind');
}
}
})
}
function zoomContent(article){
article.css({'width': '15%'}, function(){
});
goGoMaso()
}
// function classContent(article){
// var filter = $('.categories').find('li');
// filter.click(function(){
// var windowH = $(window).height();
// var theClass = $(this).attr('class').split(' ')[0];
// var theArticles = $('section:nth-of-type(1)').find('.'+theClass);
// var lastArticle = $('section:nth-of-type(1)').find('.'+theClass+':last');
// // var articlesOffset = [];
// // theArticles.each(function(){
// // theId = $(this).attr('data-id');
// // theOffset = $(this).offset().top;
// // articlesOffset.push({id: theId, offset: theOffset});
// // })
// console.log(lastArticle);
// var lastOffset = lastArticle.offset().top;
// var i = 33;
// // while (lastOffset > windowH) {
// // article.css({'width': i + '%'}, function(){
// // var lastOffset = lastArticle.offset().top;
// // });
// // i--;
// // }
// })
// }
function sizeImagesGrid(article){
article.each(function(){
......
......@@ -6,7 +6,7 @@
<section id="projets">
<div class="grid">
<?php for ($i=0; $i < 1; $i++) { ?>
<?php for ($i=0; $i < 5; $i++) { ?>
<?php foreach ($projets as $projet): ?>
<?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment