From e6f9b04d997b1bedc48f65f1af5bad8d050b034c Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 28 Feb 2026 21:59:35 +0000 Subject: [PATCH] Add a new blog post display style with larger images and author details Introduce a BlogCard component to display articles in a two-column grid layout below the carousel, featuring larger images, author information, date, title, excerpt, and view count. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: c8fc9f7d-54c1-4d04-bfaa-75be55bf11bb Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/0ZGabQy Replit-Helium-Checkpoint-Created: true --- client/src/pages/home.tsx | 49 ++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index b86f630..4bdac0d 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -180,6 +180,41 @@ function MediumCard({ article, focalPoints }: { article: Article; focalPoints?: ); } +function BlogCard({ 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}

+

{article.excerpt}

+
+ + {article.views.toLocaleString()} +
+
+
+ + ); +} + function SideCard({ article, focalPoints }: { article: Article; focalPoints?: Record }) { const isVideo = article.category === "Video"; const objPos = getObjectPosition(article.coverImage, focalPoints); @@ -381,10 +416,6 @@ export default function Home() { const row2 = articles.slice(0, 2); const row3 = articles.slice(2, 4); const remaining = articles.slice(4); - const rows: Article[][] = []; - for (let i = 0; i < remaining.length; i += 4) { - rows.push(remaining.slice(i, i + 4)); - } return (
@@ -414,13 +445,13 @@ export default function Home() {
- {rows.map((row, ri) => ( -
- {row.map((a) => ( - + {remaining.length > 0 && ( +
+ {remaining.map((a) => ( + ))}
- ))} + )}