removed jquery

This commit is contained in:
Nickiel12 2023-11-18 21:17:38 -08:00
parent 0f8a1b1fd8
commit ef6d032106
4 changed files with 8 additions and 20 deletions

View file

@ -1 +1 @@
console.log('This site was generated by Hugo. Test');
// console.log('This site was generated by Hugo. Test');

View file

@ -3,7 +3,7 @@
<head>
{{ partial "head.html" . }}
</head>
<body>
<body class="lightmode">
<header>
{{ partial "header.html" . }}
</header>

View file

@ -1,7 +1,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="text/javascript" src="/navbar.js"></script>
<link rel="stylesheet" href="/catppuccin.css">
<link rel="stylesheet" href="/variables.css">

View file

@ -1,27 +1,16 @@
$(document).ready(function() {
light_mode();
})
function light_mode() {
console.log("light mode!");
$("body").removeClass("darkmode").removeClass("sunsetmode").addClass("lightmode");
$("body").find("*").each(function () {
$(this).removeClass("darkmode").removeClass("sunsetmode").addClass("lightmode");
})
document.body.className = document.body.className.replace("darkmode", "").replace("sunsetmode", "").replace("lightmode", "");
document.body.className += " lightmode";
}
function sunset_mode() {
console.log("sunset mode!");
$("body").removeClass("lightmode").removeClass("darkmode").addClass("sunsetmode");
$("body").find("*").each(function () {
$(this).removeClass("lightmode").removeClass("darkmode").addClass("sunsetmode");
})
document.body.className = document.body.className.replace("darkmode", "").replace("sunsetmode", "").replace("lightmode", "");
document.body.className += " sunsetmode";
}
function dark_mode() {
$("body").removeClass("lightmode").removeClass("sunsetmode").addClass("darkmode");
$("body").find("*").each(function () {
$(this).removeClass("lightmode").removeClass("sunsetmode").addClass("darkmode");
})
document.body.className = document.body.className.replace("darkmode", "").replace("sunsetmode", "").replace("lightmode", "");
document.body.className += " darkmode";
}