Initial commit

This commit is contained in:
Cloonar
2024-12-02 12:28:35 +01:00
commit dc264b89a1
89 changed files with 31377 additions and 0 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.cloonar.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();

View File

@@ -0,0 +1,7 @@
(function($) {
console.log("test");
$('#meta_menu').click(function (e) {
console.log("test");
$('#meta_menu').toggleClass('opened');
});
}(jQuery || $));

View File

@@ -0,0 +1,31 @@
document.querySelectorAll('.f3-widget-paginator a').forEach(function (el) {
el.addEventListener('click', newsAjaxHandler);
});
function newsAjaxHandler(e) {
var ajaxUrl = e.target.getAttribute('href');
if (ajaxUrl !== undefined && ajaxUrl !== '') {
e.preventDefault();
history.pushState(null, '', ajaxUrl.split('?')[0]);
var container = e.target.closest('.frame').getAttribute('id');
document.getElementById(container).classList.add('loading');
var xhr = new XMLHttpRequest();
xhr.open('GET', ajaxUrl, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var parser = new DOMParser();
var result = parser.parseFromString(xhr.responseText, 'text/html');
var ajaxDom = result.getElementById(container);
ajaxDom.querySelectorAll('.f3-widget-paginator a').forEach(function (el) {
el.addEventListener('click', newsAjaxHandler);
});
document.getElementById(container).replaceWith(ajaxDom);
window.scrollTo({
top: document.getElementById(container).offsetTop - 111,
behavior: 'smooth'
});
}
};
xhr.send();
}
}

View File

@@ -0,0 +1,15 @@
const searchButton = document.querySelector(".search-wrap button");
searchButton.addEventListener("click", function (e) {
if(window.innerWidth < 992) return;
e.preventDefault();
if (!searchButton.parentElement.parentElement.parentElement.classList.contains('opened')) {
searchButton.parentElement.parentElement.parentElement.classList.add('opened');
searchButton.parentElement.previousElementSibling.focus();
} else {
if (searchButton.parentElement.previousElementSibling.value != '') {
searchButton.closest('form').submit();
} else {
searchButton.parentElement.parentElement.parentElement.classList.remove('opened');
}
}
});