diff --git a/client/src/components/simple-carousel.tsx b/client/src/components/simple-carousel.tsx index 8c1a567..7349373 100644 --- a/client/src/components/simple-carousel.tsx +++ b/client/src/components/simple-carousel.tsx @@ -122,40 +122,27 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse - {/* Scroll container */} -
-
- {/* Create many copies for infinite feel */} - {Array.from({ length: 20 }).map((_, copyIndex) => - category.videos.map((video, videoIndex) => ( -
- {/* Top 10 Number overlay for first category */} - {category.title.includes("Top 10") && ( -
- {videoIndex + 1} -
- )} - + {/* Flex container z poster postavitvijo */} +
+ {category.videos.map((video, videoIndex) => ( +
+ {/* Top 10 Number overlay for first category */} + {category.title.includes("Top 10") && ( +
+ {videoIndex + 1}
- )) - ).flat()} -
+ )} + +
+ ))}
diff --git a/client/src/index.css b/client/src/index.css index a689e01..cd79817 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -401,6 +401,26 @@ input[data-testid*="search"]::placeholder { font-display: swap; } +/* Poster postavitev style */ +.poster-container { + width: 150px; /* Fiksna širina slik */ +} + +.poster { + width: 150px; /* Fiksna širina slik */ + height: auto; /* Ohranjanje razmerja stranic */ + max-width: 100%; /* Prilagoditev na manjših zaslonih */ +} + +@media (max-width: 768px) { + .poster-container { + width: 120px; /* Manjša širina za mobilne naprave */ + } + .poster { + width: 120px; /* Manjša širina za mobilne naprave */ + } +} + /* Hide picture-in-picture button on all video elements */ video::-webkit-media-controls-picture-in-picture-button { display: none !important;