diff --git a/attached_assets/image_1772314969009.png b/attached_assets/image_1772314969009.png new file mode 100644 index 0000000..4c5ffd8 Binary files /dev/null and b/attached_assets/image_1772314969009.png differ diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 5412fd8..4b89086 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -235,9 +235,9 @@ function TopStoriesList({ articles }: { articles: Article[] }) { Top-Storys
- {articles.slice(0, 6).map((article) => ( + {articles.slice(0, 10).map((article) => ( -
+

{article.title}

{article.author} @@ -251,16 +251,55 @@ function TopStoriesList({ articles }: { articles: Article[] }) { ); } +function FeaturedHeroCard({ article, focalPoints }: { article: Article; focalPoints?: Record }) { + const isVideo = article.category === "Video"; + const objPos = getObjectPosition(article.coverImage, focalPoints); + return ( + +
+
+ {article.title} + {isVideo && ( +
+
+ +
+
+ )} +
+
+
+ {article.author} + {timeAgo(new Date(article.publishedAt))} +
+

{article.title}

+
+
+
+ + ); +} + function FeaturedCarousel({ articles, popular, galleryImages, focalPoints }: { articles: Article[]; popular?: Article[]; galleryImages?: GalleryImage[]; focalPoints?: Record }) { - const featured = articles.slice(0, 3); + const hero = articles[0]; + const bottom = articles.slice(1, 3); return (
-
- {featured.map((a) => ( - - ))} - {popular && popular.length > 0 && } +
+
+
+ {hero && } +
+ {bottom.map((a) => ( + + ))} +
+
+
+
+ {popular && popular.length > 0 && } +
); @@ -310,6 +349,7 @@ export default function Home() { const row2 = articles.slice(3, 5); const row3 = articles.slice(5, 7); const remaining = articles.slice(7); + const topStoriesCount = Math.min(12, articles.length); const rows: Article[][] = []; for (let i = 0; i < remaining.length; i += 4) { rows.push(remaining.slice(i, i + 4));