Flask application repository for Banner Repeater's DAAP (Digital Archive of Artists Publishing).
SPARQL queries by Lozana Rossenova, CSS and JS by Joana Chicau, python and Jinja by Julie Boschat-Thorez.
See https://daap.network
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
// --> custom scripts
|
|
|
|
// MAIN NAVIGATION MENU — MOBILE
|
|
|
|
function showMenu(navigationmobile){
|
|
var e = document.getElementById('navigationmobile');
|
|
var element = document.getElementById("mobtop");
|
|
if(e.style.display == 'block')
|
|
e.style.display = 'none';
|
|
else
|
|
e.style.display = 'block';
|
|
document.querySelector('body').style.overflow = 'hidden';
|
|
element.classList.toggle("mob-close-icon");
|
|
}
|
|
|
|
// HOMEPAGE — RECENTLY ADDED ITEMS GRID
|
|
|
|
$ShowHideMore = $('#home-recent-grid');
|
|
$ShowHideMore.each(function() {
|
|
var $times = $(this).children('.home-recent-items');
|
|
if ($times.length > 13) {
|
|
$ShowHideMore.children(':nth-of-type(n+13)').addClass('moreShown').hide();
|
|
$(this).find('span.home-show').addClass('more-times').html('SHOW MORE');
|
|
}
|
|
});
|
|
|
|
$(document).on('click', '#home-recent-grid > span', function() {
|
|
var that = $(this);
|
|
var thisParent = that.closest('#home-recent-grid');
|
|
if (that.hasClass('more-times')) {
|
|
thisParent.find('.moreShown').show();
|
|
that.toggleClass('more-times', 'less-times').html('SHOW LESS');
|
|
} else {
|
|
thisParent.find('.moreShown').hide();
|
|
that.toggleClass('more-times', 'less-times').html('SHOW MORE');
|
|
}
|
|
});
|
|
|
|
|
|
// SLIDER — ARTWORK TEMPLATE
|
|
|
|
var slider = tns({
|
|
container: '.my-slider',
|
|
items: 1,
|
|
responsive: {
|
|
640: {
|
|
edgePadding: 20,
|
|
gutter: 20,
|
|
items: 1
|
|
},
|
|
700: {
|
|
gutter: 30
|
|
},
|
|
900: {
|
|
items: 1
|
|
}
|
|
}
|
|
});
|
|
|