From 74baeed29d14677093ba21f0934c7692553e04f3 Mon Sep 17 00:00:00 2001 From: Piyush Tripathi Date: Sat, 19 Sep 2026 01:41:15 +0530 Subject: [PATCH 1/2] fix: correct layout shift on Meet Five and Handbook cards Signed-off-by: Piyush Tripathi --- src/components/AdventuresVol/index.js | 57 +++++++++++++++++++-------- src/components/HandbookCard/index.js | 10 ++--- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/components/AdventuresVol/index.js b/src/components/AdventuresVol/index.js index 468ccd6c6b682f..084e9be8dfa3ff 100644 --- a/src/components/AdventuresVol/index.js +++ b/src/components/AdventuresVol/index.js @@ -1,27 +1,50 @@ import React from "react"; +import { Link } from "gatsby"; import { HiOutlineChevronRight } from "@react-icons/all-files/hi/HiOutlineChevronRight"; import { AdventuresVolWrapper } from "./adventures-vol.style"; const AdventuresVol = ({ title, description, to, image }) => { + const isExternalOrStatic = + to && + (to.startsWith("http://") || + to.startsWith("https://") || + to.split("?")[0].split("#")[0].endsWith(".pdf") || + to.startsWith("mailto:")); + + const cardContent = ( +
+

{title}

+
+ +

{description}

+ {to && ( +
+ + Read More + +
+ )} +
+ ); + return ( - -
-

{title}

-
- -

- {description} -

- {to && ( -
- - Read More - -
- )} -
- + {!to ? ( +
{cardContent}
+ ) : isExternalOrStatic ? ( + + {cardContent} + + ) : ( + + {cardContent} + + )}
); }; diff --git a/src/components/HandbookCard/index.js b/src/components/HandbookCard/index.js index cc6cb8c3c64bc2..ce2754e1da3157 100644 --- a/src/components/HandbookCard/index.js +++ b/src/components/HandbookCard/index.js @@ -6,18 +6,16 @@ import { HandbookCardWrapper } from "./HandbookCard.style"; const HandbookCard = ({ title, description, to }) => { return ( - +

{title}

-

- {description} -

+

{description}

{to && (
- + Read More - +
)}
From abdadeb6f18c47a759a8b9ec8975221d2f6e7db5 Mon Sep 17 00:00:00 2001 From: Piyush Tripathi Date: Sun, 27 Sep 2026 18:23:06 +0530 Subject: [PATCH 2/2] fix: make pdf detection case-insensitive and handle mailto target/rel Signed-off-by: Piyush Tripathi --- src/components/AdventuresVol/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/AdventuresVol/index.js b/src/components/AdventuresVol/index.js index 084e9be8dfa3ff..3c8cbfeb6cfa66 100644 --- a/src/components/AdventuresVol/index.js +++ b/src/components/AdventuresVol/index.js @@ -8,9 +8,11 @@ const AdventuresVol = ({ title, description, to, image }) => { to && (to.startsWith("http://") || to.startsWith("https://") || - to.split("?")[0].split("#")[0].endsWith(".pdf") || + to.split("?")[0].split("#")[0].toLowerCase().endsWith(".pdf") || to.startsWith("mailto:")); + const isMailTo = to && to.startsWith("mailto:"); + const cardContent = (

{title}

@@ -35,8 +37,8 @@ const AdventuresVol = ({ title, description, to, image }) => { {cardContent}