diff --git a/package-lock.json b/package-lock.json index 4178523..78f56f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3188,6 +3188,15 @@ "postcss": "^8.0.9" } }, + "node_modules/tw-elements/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/ua-parser-js": { "version": "1.0.41", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz", @@ -3430,15 +3439,6 @@ "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "license": "MIT" - }, - "node_modules/yaml": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", - "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", - "license": "ISC", - "engines": { - "node": ">= 6" - } } } } diff --git a/resources/js/responsive.js b/resources/js/responsive.js deleted file mode 100644 index bb56035..0000000 --- a/resources/js/responsive.js +++ /dev/null @@ -1,68 +0,0 @@ -function updateGrid(grid) { - // Skip hidden grids - if (grid.offsetParent === null) { - return; - } - - const items = [...grid.querySelectorAll('.episode-item')]; - - if (!items.length) { - return; - } - - // Reset visibility first - items.forEach(item => { - item.style.display = ''; - }); - - // Determine actual column count - const firstTop = items[0].offsetTop; - - let columns = 0; - - for (const item of items) { - if (item.offsetTop !== firstTop) { - break; - } - - columns++; - } - - const rows = parseInt(grid.dataset.rows || '2', 10); - - const visibleItems = columns * rows; - - items.forEach((item, index) => { - item.style.display = index < visibleItems - ? '' - : 'none'; - }); -} - -function updateAllEpisodeGrids() { - document.querySelectorAll('.episode-grid').forEach(updateGrid); -} - -const observer = new IntersectionObserver(entries => { - entries.forEach(entry => { - if (entry.isIntersecting) { - updateGrid(entry.target); - } - }); -}); - -document.querySelectorAll('.episode-grid').forEach(grid => { - observer.observe(grid); -}); - -let resizeTimeout; - -window.addEventListener('resize', () => { - clearTimeout(resizeTimeout); - - resizeTimeout = setTimeout(() => { - updateAllEpisodeGrids(); - }, 100); -}); - -window.addEventListener('load', updateAllEpisodeGrids); diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index cc0c718..4dcb7e8 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -28,6 +28,4 @@