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> <head>
{{ partial "head.html" . }} {{ partial "head.html" . }}
</head> </head>
<body> <body class="lightmode">
<header> <header>
{{ partial "header.html" . }} {{ partial "header.html" . }}
</header> </header>

View file

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

View file

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