summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/swup.js2
-rw-r--r--src/js/transition.js13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/js/swup.js b/src/js/swup.js
new file mode 100644
index 00000000..0866c441
--- /dev/null
+++ b/src/js/swup.js
@@ -0,0 +1,2 @@
+import Swup from 'https://unpkg.com/swup@4?module';
+const swup = new Swup(); \ No newline at end of file
diff --git a/src/js/transition.js b/src/js/transition.js
new file mode 100644
index 00000000..01bd11fc
--- /dev/null
+++ b/src/js/transition.js
@@ -0,0 +1,13 @@
+let a = document.querySelectorAll("a")
+
+a.forEach(element => {
+ element.onclick = event => {
+ element.classList.add("openlink")
+ element.innerHTML = `
+ <iframe src="/" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+ `
+ element.style.zIndex = 999999
+ element.style.overflow = "auto !important"
+ setTimeout(function(){element.classList.remove("openlink")}, 3000);
+ }
+})