removed jquery
This commit is contained in:
parent
0f8a1b1fd8
commit
ef6d032106
4 changed files with 8 additions and 20 deletions
|
@ -1 +1 @@
|
|||
console.log('This site was generated by Hugo. Test');
|
||||
// console.log('This site was generated by Hugo. Test');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<body class="lightmode">
|
||||
<header>
|
||||
{{ partial "header.html" . }}
|
||||
</header>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue