summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorJonathan Tschanter <jmtw@tutanota.de>2022-01-22 21:24:24 +0100
committerJonathan Tschanter <jmtw@tutanota.de>2022-01-22 21:24:24 +0100
commit10c86197f1f63e222dfc9e937911e35ab500a208 (patch)
tree388ca37920808a66697385c6d69cf6a76e5aaf7b /public/js
parent432bba3dee1d9be25b9626ac45115929a6422961 (diff)
Adds edit cards and templates to include
Diffstat (limited to 'public/js')
-rw-r--r--public/js/nav_highlight.js9
-rw-r--r--public/js/splides.js6
2 files changed, 15 insertions, 0 deletions
diff --git a/public/js/nav_highlight.js b/public/js/nav_highlight.js
new file mode 100644
index 0000000..b8ebb09
--- /dev/null
+++ b/public/js/nav_highlight.js
@@ -0,0 +1,9 @@
+document.addEventListener( 'DOMContentLoaded', function() {
+ var url = window.location.href;
+ var navs = document.getElementsByTagName("nav")[0].getElementsByTagName("a");
+ for (var i = 0; i < navs.length; i++) {
+ if (url.startsWith(navs[i].href)) {
+ navs[i].classList.add('active');
+ }
+ }
+});
diff --git a/public/js/splides.js b/public/js/splides.js
new file mode 100644
index 0000000..0a4faae
--- /dev/null
+++ b/public/js/splides.js
@@ -0,0 +1,6 @@
+document.addEventListener( 'DOMContentLoaded', function() {
+ var splides = document.getElementsByClassName("splide");
+ for (var i = 0; i < splides.length; i++) {
+ new Splide(splides[i]).mount();
+ }
+}); \ No newline at end of file