www/themes/hellug-minimal-4/layouts/partials/scripts.html
2024-02-09 10:59:23 +02:00

40 γραμμές
1,3 KiB
HTML

<!-- Theme changer -->
<script>
function switchTheme(el) { document.documentElement.setAttribute('data-theme', el.value) }
function switchCSS(cssid, el){ document.getElementById(cssid).href = el.value; }
function addFontSize(addPx){
html = document.querySelector('html');
currentSize = parseFloat(window.getComputedStyle(html, null)
.getPropertyValue('font-size'));
html.style.fontSize = (currentSize + addPx) + 'px';
}
function toggleDarkMode(el){
var theme='light'
if (el.innerText == '🌓'){
el.innerText = '☀'; theme='dark';
} else {
el.innerText = '🌓';
}
document.documentElement.setAttribute('data-theme', theme)
}
</script>
<!-- Theme changer end -->
<!-- Matomo -->
<script>
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://stats.hellug.gr/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->