Code style update.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (window.location.search.indexOf("darkmode=true") > -1) {
|
||||
document.getElementById("content").classList.add("dark-mode");
|
||||
}
|
||||
});
|
||||
@@ -1,5 +0,0 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (window.location.search.indexOf("darkmode=true") > -1) {
|
||||
document.getElementById("content").classList.add("dark-mode");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const headings = document.querySelectorAll(".content h1, .content h2, .content h3, .content h4, .content h5, .content h6");
|
||||
headings.forEach(e => {
|
||||
const a = document.createElement("a");
|
||||
a.href = "#" + e.id;
|
||||
a.innerText = "#";
|
||||
a.classList.add("header-link");
|
||||
e.prepend(a);
|
||||
});
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const headings = document.querySelectorAll(".content h1, .content h2, .content h3, .content h4, .content h5, .content h6");
|
||||
headings.forEach(e => {
|
||||
const a = document.createElement("a");
|
||||
a.href = "#" + e.id;
|
||||
a.innerText = "#";
|
||||
a.classList.add("header-link");
|
||||
e.prepend(a);
|
||||
});
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.addEventListener("scroll", () => {
|
||||
if (window.scrollY > document.querySelector("#home-navbar .menu-placeholder").offsetTop) {
|
||||
document.getElementById("home-navbar").classList.add("is-fixed-top");
|
||||
} else {
|
||||
document.getElementById("home-navbar").classList.remove("is-fixed-top");
|
||||
}
|
||||
});
|
||||
document.addEventListener("scroll", () => {
|
||||
if (window.scrollY > document.querySelector("#home-navbar .menu-placeholder").offsetTop) {
|
||||
document.getElementById("home-navbar").classList.add("is-fixed-top");
|
||||
} else {
|
||||
document.getElementById("home-navbar").classList.remove("is-fixed-top");
|
||||
}
|
||||
});
|
||||
});
|
||||
Submodule themes/patek/assets/js/patek-logo-custom-element updated: 895805bda1...0a5cf1419b
@@ -11,9 +11,9 @@
|
||||
<meta name="theme-color" content="#0b2a37">
|
||||
{{- end }}
|
||||
{{ block "js" . -}}
|
||||
{{ partial "js.html" "js/headerLink.js" }}
|
||||
{{ partial "js.html" "js/patek-logo-custom-element/patekLogo.js" }}
|
||||
{{ partial "js.html" "js/darkMode.js" }}
|
||||
{{ partial "js.html" "js/header-link.js" }}
|
||||
{{ partial "js.html" "js/patek-logo-custom-element/patek-logo.js" }}
|
||||
{{ partial "js.html" "js/dark-mode.js" }}
|
||||
{{ end }}
|
||||
<body>
|
||||
{{ block "body" . }}
|
||||
|
||||
Reference in New Issue
Block a user