diff --git a/dist/app.js b/dist/app.js index 352a90d..9504519 100644 --- a/dist/app.js +++ b/dist/app.js @@ -7,7 +7,20 @@ \***********************/ /***/ (() => { - +var observer = new IntersectionObserver(function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + entry.target.classList.add('visible'); + } else { + entry.target.classList.remove('visible'); + } + }); +}, { + threshold: 0.1 // adjust as needed +}); +document.querySelectorAll('.watch-vp').forEach(function (el) { + observer.observe(el); +}); /***/ }), diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index 043c3ed..f3ba1bb 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,4 +1,4 @@ { - "/app.js": "/app.js?id=099e96d934e937b07341f2ca9fb82ec2", + "/app.js": "/app.js?id=1121838d4c96cc32c63518343f8e22d9", "/app.css": "/app.css?id=159c4185aeca54a7f71b7d4d18e14c75" } diff --git a/src/js/app.js b/src/js/app.js index e69de29..1dd6324 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -0,0 +1,15 @@ +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.classList.add('visible'); + } else { + entry.target.classList.remove('visible'); + } + }); +}, { + threshold: 0.1 // adjust as needed +}); + +document.querySelectorAll('.watch-vp').forEach(el => { + observer.observe(el); +}); diff --git a/tpl/flex_intro_block.tpl b/tpl/flex_intro_block.tpl index e3b0435..9468077 100644 --- a/tpl/flex_intro_block.tpl +++ b/tpl/flex_intro_block.tpl @@ -2,7 +2,7 @@
-

{{ headline }}

+

{{ headline }}

{{#if sub_headline}}

{{ sub_headline }}

{{/if}}