home page of productions is ok!

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-02 18:00:33 +01:00
parent 44eb8476ac
commit 57fbb35060
36 changed files with 774 additions and 103 deletions
@@ -13,6 +13,9 @@
_$body.on('corpus-map-ready', onCorpusMapReady);
initScrollbars();
initAjaxLinks();
if (_$body.is('.path-productions')) {
initProductions();
}
};
// ___ _ _ ___
@@ -82,6 +85,7 @@
_$body.removeClass('ajax-loading');
// add body class for currently loaded content
_$body.removeClass().addClass('path-'+sys_path.replace(/\//g, '-'));
// id node add a generic path-node class to body
m = sys_path.match(/^\/?(edlp\/node\/\d+)$/g);
if(m){
@@ -89,10 +93,20 @@
}
_$ajaxLinks.removeClass('is-active');
$link.removeClass('ajax-loading').addClass('is-active');
initScrollbars();
console.log(sys_path);
if(sys_path == "productions"){
window.requestAnimationFrame(initProductions);
}
};
// corpus
// ___
// / __|___ _ _ _ __ _ _ ___
// | (__/ _ \ '_| '_ \ || (_-<
// \___\___/_| | .__/\_,_/__/
// |_|
function onCorpusMapReady(e){
console.log('theme : onCorpusReady');
_$corpus_map = $('canvas#corpus-map');
@@ -102,7 +116,34 @@
});
}
//modals
// ___ _ _ _
// | _ \_ _ ___ __| |_ _ __| |_(_)___ _ _ ___
// | _/ '_/ _ \/ _` | || / _| _| / _ \ ' \(_-<
// |_| |_| \___/\__,_|\_,_\__|\__|_\___/_||_/__/
function initProductions(){
console.log('theme : initProductions');
var $grid = $('.row', _$content_container).masonry({
itemSelector:'.col',
columnWidth:'.col-2'
});
// layout Masonry after each image loads
$grid.imagesLoaded().progress( function() {
$grid.masonry('layout');
});
// var $grid = $('.row', _$content_container).imagesLoaded( function() {
// // init Masonry after all images have loaded
// $grid.masonry({
// itemSelector:'.col',
// columnWidth:'.col-2'
// });
// });
};
// __ __ _ _
// | \/ |___ __| |__ _| |___
// | |\/| / _ \/ _` / _` | (_-<
// |_| |_\___/\__,_\__,_|_/__/
function closeAllModals(){
console.log('theme : closeAllModals');
// TODO: animate the remove
@@ -113,8 +154,7 @@
};
init();
}
} // end EdlpTheme()
$(document).ready(function($) {
var edlptheme = new EdlpTheme();