From 097c5c2710e301b86fad048e39db92523c252f22 Mon Sep 17 00:00:00 2001 From: "oleg.vodyanov91@gmail.com" Date: Wed, 23 Apr 2025 13:53:25 +0400 Subject: [PATCH] fix --- static/links/main.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/static/links/main.js b/static/links/main.js index 2669c6b..61db6c9 100644 --- a/static/links/main.js +++ b/static/links/main.js @@ -55,18 +55,18 @@ function renderPaginatedList(linkList, container, isWatched, page, totalPages) { linkList .filter(link => link.watched === isWatched) .forEach(link => { - const col = document.createElement('div'); - col.className = 'col-12 col-sm-6 col-md-4 col-lg-3'; - col.appendChild(createLinkElement(link, isWatched)); - row.appendChild(col); + const column = document.createElement('div'); + column.className = 'col-12 col-sm-6 col-md-4 col-lg-3'; + column.appendChild(createLinkElement(link, isWatched)); + row.appendChild(column); }); container.appendChild(row); // Pagination controls if (totalPages > 1) { - const nav = document.createElement('div'); - nav.className = 'd-flex justify-content-center mt-4 gap-2'; + const navigation = document.createElement('div'); + navigation.className = 'd-flex justify-content-center mt-4 gap-2'; const prevBtn = document.createElement('button'); prevBtn.innerText = '← Previous'; @@ -86,9 +86,9 @@ function renderPaginatedList(linkList, container, isWatched, page, totalPages) { loadLinks(); }; - nav.appendChild(prevBtn); - nav.appendChild(nextBtn); - container.appendChild(nav); + navigation.appendChild(prevBtn); + navigation.appendChild(nextBtn); + container.appendChild(navigation); } reinitializeInstagramEmbeds(); @@ -108,18 +108,17 @@ function createLinkElement(link, isWatched) { // Clean iframe embed const iframeWrapper = document.createElement('div'); iframeWrapper.style.width = '100%'; - iframeWrapper.style.height = '400px'; + iframeWrapper.style.height = '600px'; iframeWrapper.style.overflow = 'hidden'; iframeWrapper.style.borderRadius = '10px'; const iframe = document.createElement('iframe'); iframe.src = `https://www.instagram.com/reel/${reelId}/embed`; iframe.width = '100%'; - iframe.height = '600'; // taller to allow for cropping + iframe.height = '700'; // taller to allow for cropping iframe.style.border = 'none'; - iframe.allowFullscreen = true; + iframe.allow="fullscreen"; iframe.loading = 'lazy'; - iframe.style.marginTop = '-100px'; // shift to crop comments/likes iframeWrapper.appendChild(iframe); wrapper.appendChild(iframeWrapper);