Browse code

fix javascript location

Martin Filipovic Hinrichs authored on27/01/2026 06:56:31
Showing4 changed files
1 1
deleted file mode 100644
... ...
@@ -1,44 +0,0 @@
1
-document.addEventListener('DOMContentLoaded', function () {
2
-    var elements = document.querySelectorAll('[class*="animate-"]');
3
-    var observer = new IntersectionObserver(function (entries, observer) {
4
-        entries.forEach(function (entry) {
5
-            if (entry.isIntersecting) {
6
-                var container = entry.target.parentElement;
7
-                var animateElements = Array.from(container.children).filter(function (element) {
8
-                    return element.getAttribute('class') && element.getAttribute('class').includes('animate-');
9
-                });
10
-
11
-                animateElements.forEach(function (element, index) {
12
-                    var animateClass = element.getAttribute('class').match(/animate-[\w-]+/)[0];
13
-                    var newAnimateClass = animateClass.replace('animate-', 'animate__');
14
-
15
-                    element.classList.remove(animateClass);
16
-                    element.classList.add(newAnimateClass, 'animate__animated');
17
-                    element.style.animationDelay = (index * 0.2) + 's';
18
-                });
19
-
20
-                animateElements.forEach(function (element) {
21
-                    observer.unobserve(element);
22
-                });
23
-            }
24
-        });
25
-    }, {threshold: 0.5});
26
-
27
-    elements.forEach(function (element) {
28
-        observer.observe(element);
29
-    });
30
-});
31
-
32
-
33
-document.addEventListener('DOMContentLoaded', function () {
34
-    const section = document.querySelector('.cms-section-default');
35
-
36
-    if (section) {
37
-        const firstBlock = section.querySelector('.cms-block');
38
-        const breadcrumb = document.querySelector('.breadcrumb');
39
-
40
-        if (firstBlock && breadcrumb) {
41
-            firstBlock.insertAdjacentElement('afterend', breadcrumb);
42
-        }
43
-    }
44
-});
45 0
\ No newline at end of file
46 1
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('[class*="animate-"]'),t=new IntersectionObserver(function(e,t){e.forEach(function(e){if(e.isIntersecting){var n=Array.from(e.target.parentElement.children).filter(function(e){return e.getAttribute("class")&&e.getAttribute("class").includes("animate-")});n.forEach(function(e,t){var n=e.getAttribute("class").match(/animate-[\w-]+/)[0],a=n.replace("animate-","animate__");e.classList.remove(n),e.classList.add(a,"animate__animated"),e.style.animationDelay=.2*t+"s"}),n.forEach(function(e){t.unobserve(e)})}})},{threshold:.5});e.forEach(function(e){t.observe(e)})}),document.addEventListener("DOMContentLoaded",function(){let e=document.querySelector(".cms-section-default");if(e){let t=e.querySelector(".cms-block"),n=document.querySelector(".breadcrumb");t&&n&&t.insertAdjacentElement("afterend",n)}});
0 2
\ No newline at end of file
... ...
@@ -0,0 +1,44 @@
1
+document.addEventListener('DOMContentLoaded', function () {
2
+    var elements = document.querySelectorAll('[class*="animate-"]');
3
+    var observer = new IntersectionObserver(function (entries, observer) {
4
+        entries.forEach(function (entry) {
5
+            if (entry.isIntersecting) {
6
+                var container = entry.target.parentElement;
7
+                var animateElements = Array.from(container.children).filter(function (element) {
8
+                    return element.getAttribute('class') && element.getAttribute('class').includes('animate-');
9
+                });
10
+
11
+                animateElements.forEach(function (element, index) {
12
+                    var animateClass = element.getAttribute('class').match(/animate-[\w-]+/)[0];
13
+                    var newAnimateClass = animateClass.replace('animate-', 'animate__');
14
+
15
+                    element.classList.remove(animateClass);
16
+                    element.classList.add(newAnimateClass, 'animate__animated');
17
+                    element.style.animationDelay = (index * 0.2) + 's';
18
+                });
19
+
20
+                animateElements.forEach(function (element) {
21
+                    observer.unobserve(element);
22
+                });
23
+            }
24
+        });
25
+    }, {threshold: 0.5});
26
+
27
+    elements.forEach(function (element) {
28
+        observer.observe(element);
29
+    });
30
+});
31
+
32
+
33
+document.addEventListener('DOMContentLoaded', function () {
34
+    const section = document.querySelector('.cms-section-default');
35
+
36
+    if (section) {
37
+        const firstBlock = section.querySelector('.cms-block');
38
+        const breadcrumb = document.querySelector('.breadcrumb');
39
+
40
+        if (firstBlock && breadcrumb) {
41
+            firstBlock.insertAdjacentElement('afterend', breadcrumb);
42
+        }
43
+    }
44
+});
0 45
\ No newline at end of file
... ...
@@ -16,7 +16,7 @@
16 16
   ],
17 17
   "script": [
18 18
     "@Storefront",
19
-    "app/storefront/dist/storefront/js/weinmanufaktur-theme.js"
19
+    "app/storefront/dist/storefront/js/weinmanufaktur-theme/weinmanufaktur-theme.js"
20 20
   ],
21 21
   "asset": [
22 22
     "@Storefront",