This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
|
||||
if(_is_mobile){
|
||||
initMobile();
|
||||
}else if(drupalSettings.path.isFront){
|
||||
initDesktopHome();
|
||||
}
|
||||
|
||||
initEvents();
|
||||
@@ -179,6 +181,19 @@
|
||||
// .parents('.taxonomy-term.vocabulary-entrees.home_mobile').toggleClass(part+'-opened');
|
||||
// }
|
||||
|
||||
function initDesktopHome(){
|
||||
console.log('initDesktopHome');
|
||||
// allow multiple prods on home but display only one randomly
|
||||
var $prods = $('.grid .col .node--type-page');
|
||||
$r = Math.floor(Math.random() * $prods.length)
|
||||
$prods.each(function(index) {
|
||||
if(index != $r){
|
||||
$(this).parents('.col').remove();
|
||||
}
|
||||
});
|
||||
console.log('$prods', $prods);
|
||||
}
|
||||
|
||||
// ___ _
|
||||
// | __|_ _____ _ _| |_ ___
|
||||
// | _|\ V / -_) ' \ _(_-<
|
||||
|
||||
Reference in New Issue
Block a user