Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/danielkvist/hugo-piercer-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authordanielkvist <d94.zaragoza@gmail.com>2019-03-24 16:20:22 +0300
committerdanielkvist <d94.zaragoza@gmail.com>2019-03-24 16:20:22 +0300
commit28994ce5b01d14b63bf5ff055f63c87900b11ed6 (patch)
treeffaa68b4529c260b05fef8a0ac4b492010e0dcbc /assets
parent3810397efc67304a086de670ff5128192aa09e0d (diff)
add JS script to fix the header superposition
Diffstat (limited to 'assets')
-rw-r--r--assets/js/header.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/assets/js/header.js b/assets/js/header.js
new file mode 100644
index 0000000..4fe7165
--- /dev/null
+++ b/assets/js/header.js
@@ -0,0 +1,7 @@
+const header = document.querySelector("header")
+
+function paddingHeader() {
+ document.body.style.paddingTop = `${header.offsetHeight}px`;
+}
+
+window.addEventListener("load", paddingHeader) \ No newline at end of file