Web/main/scripts/main.js
Ell 0fe42beb59
All checks were successful
Web/pipeline/head This commit looks good
move imprint and privacy to separate pages
2021-10-11 13:43:03 +02:00

21 lines
556 B
JavaScript

const dark = getCookie("dark") === "true";
if (dark)
addStyle("/style/dark.css");
$(function () {
$('.navbar-collapse a').on('click', function () {
$('.navbar-collapse').collapse('hide');
});
$('#blobheart').on('click', function () {
$('#navbar-image').attr('src', 'res/heart.jpeg');
});
let mode = $('#dark-mode');
mode.prop('checked', dark);
mode.on('click', function () {
setCookie("dark", $(this).prop('checked'), 365);
window.location.hash = "";
location.reload();
});
});