From ced07ba3c9b213c1a9a8610a7a5469494b3d9f11 Mon Sep 17 00:00:00 2001 From: aleensd Date: Mon, 18 Nov 2024 17:57:31 +0200 Subject: [PATCH] some changes --- .../js/components/media-page/MediaPage.scss | 35 ++++++++++--------- .../js/components/media-viewer/ImageViewer.js | 10 +++--- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/frontend/src/static/js/components/media-page/MediaPage.scss b/frontend/src/static/js/components/media-page/MediaPage.scss index 5b2280c..9bdb443 100755 --- a/frontend/src/static/js/components/media-page/MediaPage.scss +++ b/frontend/src/static/js/components/media-page/MediaPage.scss @@ -557,53 +557,56 @@ display: flex; align-items: center; justify-content: center; - width: 90%; - max-width: 900px; + width: auto; + max-width: 90%; } .slideshow-image img { - width: 100%; - max-height: 100vh; + display: block; + width: auto; + height: auto; + max-width: 100%; /* Ensure image doesn't exceed container width */ + max-height: 90vh; border-radius: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); } .arrow { + background: none; position: absolute; top: 50%; transform: translateY(-50%); - background: rgba(255, 255, 255, 0.6); border: none; - color: black; + color: rgb(48, 47, 47); font-size: 2rem; cursor: pointer; padding: 10px; border-radius: 50%; - z-index: 1010; + z-index: 1000; transition: 0.2s ease; } -.arrow:hover { - background: rgba(255, 255, 255, 0.9); -} +// .arrow:hover { +// background: #292928 +// } .arrow.left { - left: -50px; + left: 10px; } .arrow.right { - right: -50px; + right: 10px; } .dots { position: fixed; /* Make the dots container fixed to always be under the image */ - bottom: 20%; /* Adjust this to control the vertical spacing */ - left: 50%; /* Center the dots horizontally */ - transform: translateX(-50%); /* Center the dots container */ + bottom: 10%; + left: 50%; + transform: translateX(-50%); display: flex; gap: 10px; justify-content: center; - z-index: 1000; /* Ensure it stays above the background */ + z-index: 1000; } .dot { diff --git a/frontend/src/static/js/components/media-viewer/ImageViewer.js b/frontend/src/static/js/components/media-viewer/ImageViewer.js index cb8c4a4..6a7dbd8 100755 --- a/frontend/src/static/js/components/media-viewer/ImageViewer.js +++ b/frontend/src/static/js/components/media-viewer/ImageViewer.js @@ -64,9 +64,11 @@ export default function ImageViewer() { setCurrentIndex(index); }; + console.log(slideshowItems[currentIndex]?.original_media_url) + return !image ? null : ( -
+
{MediaPageStore.get('media-data').title setIsModalOpen(true)} /> {/* {slideshowItems &&
{slideshowItems.map((i)=>
  • {i.poster_url}
  • )}
    } */} {isModalOpen && ( @@ -80,11 +82,11 @@ export default function ImageViewer() { onClick={handlePrevious} aria-label="Previous slide" > - < + ‹
    {`Slide
    @@ -93,7 +95,7 @@ export default function ImageViewer() { onClick={handleNext} aria-label="Next slide" > - > + ›
    {slideshowItems.map((_, index) => (