Code style update.

This commit is contained in:
Greenscreener
2019-07-17 22:47:57 +02:00
parent 76a5987a23
commit 94462d172c
7 changed files with 27 additions and 27 deletions
+5
View File
@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", () => {
if (window.location.search.indexOf("darkmode=true") > -1) {
document.getElementById("content").classList.add("dark-mode");
}
});
-5
View File
@@ -1,5 +0,0 @@
document.addEventListener("DOMContentLoaded", () => {
if (window.location.search.indexOf("darkmode=true") > -1) {
document.getElementById("content").classList.add("dark-mode");
}
});
+10
View File
@@ -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);
});
});
-10
View File
@@ -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);
});
});
+3 -3
View File
@@ -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" . }}