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>
|
<head>
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="lightmode">
|
||||||
<header>
|
<header>
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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");
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue