diff --git a/themes/NSP/assets/js/main.js b/themes/NSP/assets/js/main.js index 603e889..65cc08c 100644 --- a/themes/NSP/assets/js/main.js +++ b/themes/NSP/assets/js/main.js @@ -1 +1 @@ -console.log('This site was generated by Hugo. Test'); +// console.log('This site was generated by Hugo. Test'); diff --git a/themes/NSP/layouts/_default/baseof.html b/themes/NSP/layouts/_default/baseof.html index ce9613a..aa5aefb 100644 --- a/themes/NSP/layouts/_default/baseof.html +++ b/themes/NSP/layouts/_default/baseof.html @@ -3,7 +3,7 @@ {{ partial "head.html" . }} - +
{{ partial "header.html" . }}
diff --git a/themes/NSP/layouts/partials/head.html b/themes/NSP/layouts/partials/head.html index 83f4d09..cff964b 100644 --- a/themes/NSP/layouts/partials/head.html +++ b/themes/NSP/layouts/partials/head.html @@ -1,7 +1,6 @@ {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} - diff --git a/themes/NSP/static/navbar.js b/themes/NSP/static/navbar.js index fc6e641..e9ebbf1 100644 --- a/themes/NSP/static/navbar.js +++ b/themes/NSP/static/navbar.js @@ -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"; }