From 7cef36a1ca70a8d1a576dd5dd1b3a4e73328412e Mon Sep 17 00:00:00 2001 From: Dipanshu Rawat Date: Sat, 4 Oct 2025 14:29:05 +0530 Subject: [PATCH 1/5] fix: card style --- .../testimonials/TestimonialCard.tsx | 96 +++++++++++-------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/src/components/testimonials/TestimonialCard.tsx b/src/components/testimonials/TestimonialCard.tsx index d6536b85..90191163 100644 --- a/src/components/testimonials/TestimonialCard.tsx +++ b/src/components/testimonials/TestimonialCard.tsx @@ -23,82 +23,102 @@ const TestimonialCard: React.FC = ({ const { colorMode } = useColorMode(); const isDark = colorMode === "dark"; - // Function to format the link display const formatLinkDisplay = (url: string) => { try { const urlObj = new URL(url); - return urlObj.hostname + urlObj.pathname; + return urlObj.hostname.replace("www.", ""); } catch { - // If URL parsing fails, return the original link return url; } }; return ( - {/* Header with Avatar and Name */} + {/* Header */}
- - - CN + + + {name?.charAt(0) ?? "U"}
-

- {name} -

-

+

{name}

+

@{username}

{/* Content */} -

- {content} +

+ {content.length > 220 ? content.slice(0, 220) + "..." : content}

- {/* Footer with Hashtags and Date */} + {/* Footer */}
{/* Hashtags */} -
- {content.match(/#\w+/g)?.map((hashtag, index) => ( - - {hashtag} - - ))} -
+ {content.match(/#\w+/g) && ( +
+ {content + .match(/#\w+/g) + ?.slice(0, 3) + .map((tag, i) => ( + + {tag} + + ))} +
+ )} - {/* Link and Date Row */} + {/* Link and Date */}
- {formatLinkDisplay(link)} - {date} + + {date} +
); }; -export default TestimonialCard; \ No newline at end of file +export default TestimonialCard; From 8af41c8f5df7c38f40580004efd8ffb8cbc10b06 Mon Sep 17 00:00:00 2001 From: Dipanshu Rawat Date: Sat, 4 Oct 2025 22:21:23 +0530 Subject: [PATCH 2/5] fix: card height --- src/components/testimonials/TestimonialCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/testimonials/TestimonialCard.tsx b/src/components/testimonials/TestimonialCard.tsx index 90191163..ef7c6614 100644 --- a/src/components/testimonials/TestimonialCard.tsx +++ b/src/components/testimonials/TestimonialCard.tsx @@ -38,7 +38,7 @@ const TestimonialCard: React.FC = ({ animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -12 }} transition={{ duration: 0.3 }} - className={`rounded-2xl max-h-[400px] h-[350px] p-5 shadow-md hover:shadow-lg transition-all duration-300 flex flex-col justify-between ${ + className={`rounded-2xl max-h-[250px] h-[246px] p-5 shadow-md hover:shadow-lg transition-all duration-300 flex flex-col justify-between ${ isDark ? "bg-[#18181b] text-white" : "bg-white text-gray-900" }`} > From 42f736cd2076932b6a13e9959a140d48494c0263 Mon Sep 17 00:00:00 2001 From: Dipanshu Rawat Date: Sat, 4 Oct 2025 22:26:35 +0530 Subject: [PATCH 3/5] fix gap --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 12665676..9f74b606 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -88,7 +88,7 @@ export default function Home(): ReactNode { -
+
{showTopmate && (
From b58da24a39d015c6d521b20d3de48ef7f5d6e1b1 Mon Sep 17 00:00:00 2001 From: Dipanshu Rawat Date: Mon, 6 Oct 2025 20:22:21 +0530 Subject: [PATCH 4/5] ref: styles and css --- .../testimonials/TestimonialCard.tsx | 92 +++++++++---------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/src/components/testimonials/TestimonialCard.tsx b/src/components/testimonials/TestimonialCard.tsx index ef7c6614..3e93f3b4 100644 --- a/src/components/testimonials/TestimonialCard.tsx +++ b/src/components/testimonials/TestimonialCard.tsx @@ -1,3 +1,4 @@ +// prettier-ignore import React from "react"; import { motion } from "framer-motion"; import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"; @@ -26,7 +27,7 @@ const TestimonialCard: React.FC = ({ const formatLinkDisplay = (url: string) => { try { const urlObj = new URL(url); - return urlObj.hostname.replace("www.", ""); + return urlObj.hostname + urlObj.pathname; } catch { return url; } @@ -34,27 +35,30 @@ const TestimonialCard: React.FC = ({ return ( - {/* Header */} -
- - - {name?.charAt(0) ?? "U"} + {/* Header with Avatar and Name */} +
+ + + CN -
-

{name}

-

+

+

+ {name} +

+

@{username}

@@ -62,47 +66,39 @@ const TestimonialCard: React.FC = ({ {/* Content */}

- {content.length > 220 ? content.slice(0, 220) + "..." : content} + {content.length > 100 ? content.slice(0, 99) + "..." : content}

- {/* Footer */} + {/* Footer with Hashtags and Date */}
{/* Hashtags */} - {content.match(/#\w+/g) && ( -
- {content - .match(/#\w+/g) - ?.slice(0, 3) - .map((tag, i) => ( - - {tag} - - ))} -
- )} +
+ {content + .match(/#\w+/g) + ?.slice(0, 3) + .map((hashtag, index) => ( + + {hashtag} + + ))} +
- {/* Link and Date */} -
+ {/* Link and Date Row */} +
Date: Tue, 7 Oct 2025 13:11:08 +0530 Subject: [PATCH 5/5] fix: card image size --- .../testimonials/TestimonialCard.tsx | 77 ++++++++++++------- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/src/components/testimonials/TestimonialCard.tsx b/src/components/testimonials/TestimonialCard.tsx index 3e93f3b4..b12f4297 100644 --- a/src/components/testimonials/TestimonialCard.tsx +++ b/src/components/testimonials/TestimonialCard.tsx @@ -38,19 +38,32 @@ const TestimonialCard: React.FC = ({ initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} - className={`rounded-2xl p-4 shadow-md hover:shadow-lg transition-shadow duration-300 flex flex-col justify-between ${ + className={`rounded-2xl p-6 shadow-md hover:shadow-lg transition-all duration-300 flex flex-col justify-between h-full ${ isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-gray-900" }`} > - {/* Header with Avatar and Name */} -
- - - CN - -
+ {/* Header */} +
+
+
+ {avatar ? ( + {name} + ) : ( + + {name?.charAt(0)?.toUpperCase() ?? "U"} + + )} +
+
+ +

@@ -66,34 +79,42 @@ const TestimonialCard: React.FC = ({ {/* Content */}

- {content.length > 100 ? content.slice(0, 99) + "..." : content} + {content.length > 111 ? content.slice(0, 111) + "..." : content}

- {/* Footer with Hashtags and Date */} + {/* Footer */}
{/* Hashtags */} -
- {content - .match(/#\w+/g) - ?.slice(0, 3) - .map((hashtag, index) => ( - - {hashtag} - - ))} -
+ {content.match(/#\w+/g) && ( +
+ {content + .match(/#\w+/g) + ?.slice(0, 3) + .map((tag, i) => ( + + {tag} + + ))} +
+ )} - {/* Link and Date Row */} -
+ {/* Link and Date */} +