main page v3

This commit is contained in:
Jerry
2023-06-23 13:02:14 +02:00
parent 51d2d2232a
commit da40aa31a5
19 changed files with 1037 additions and 3 deletions

View File

@@ -75,6 +75,23 @@ window.addEventListener('DOMContentLoaded', function(){
})
}
document.addEventListener('click', function(e){
if (e.target.classList && e.target.closest('.catalogSearchBtn')) {
let searchText = e.target.closest('.input-flex').querySelector('.catalogSearchInput').value;
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
}
if (e.target.classList && e.target.closest('.catalogSearchClear')) {
e.target.closest('.input-flex').querySelector('.catalogSearchInput').value = '';
}
})
document.addEventListener('keyup', function(e){
if (e.keyCode === 13 && e.target.classList.contains('catalogSearchInput')) {
let searchText = e.target.value;
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
}
})
// sliders
if (document.querySelector('.catalog-slider')) {