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

View File

@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", () => {
if (window.location.search.indexOf("darkmode=true") > -1) {
document.getElementById("content").classList.add("dark-mode");
}
});

View File

@ -1,5 +0,0 @@
document.addEventListener("DOMContentLoaded", () => {
if (window.location.search.indexOf("darkmode=true") > -1) {
document.getElementById("content").classList.add("dark-mode");
}
});

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);
});
});

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);
});
});

View File

@ -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");
}
});
});

@ -1 +1 @@
Subproject commit 895805bda1cfc4adc016826c79c400a6d8be6f34
Subproject commit 0a5cf1419b3555f16a069eaa562ebb122b2f6f5d

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" . }}