aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/terrassa/assets/js')
-rw-r--r--themes/terrassa/assets/js/form.js3
-rw-r--r--themes/terrassa/assets/js/header.js7
2 files changed, 10 insertions, 0 deletions
diff --git a/themes/terrassa/assets/js/form.js b/themes/terrassa/assets/js/form.js
new file mode 100644
index 0000000..1c9bd4d
--- /dev/null
+++ b/themes/terrassa/assets/js/form.js
@@ -0,0 +1,3 @@
+function cleanForm() {
+ document.getElementById("contact-form").reset();
+} \ No newline at end of file
diff --git a/themes/terrassa/assets/js/header.js b/themes/terrassa/assets/js/header.js
new file mode 100644
index 0000000..12de881
--- /dev/null
+++ b/themes/terrassa/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