From 4aeff81aded0d3c95c4fb7a0e6b47ba372241365 Mon Sep 17 00:00:00 2001 From: Khelan <141972056+khelanmodi@users.noreply.github.com> Date: Tue, 10 Mar 2026 16:17:05 -0700 Subject: [PATCH] Added card for DocumentDB Samples --- app/docs/page.tsx | 50 +++++++++++--------------------------------- articles/content.yml | 4 +++- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/app/docs/page.tsx b/app/docs/page.tsx index 1fabea7..eb3fb05 100644 --- a/app/docs/page.tsx +++ b/app/docs/page.tsx @@ -52,46 +52,17 @@ export default function Docs() { {/* Documentation Grid */}
{articleContent.landing.links.map((item) => { + const isExternal = item.link.startsWith("http"); const isReference = item.link === "/docs/reference"; - - if (isReference) { - return ( - -
-
-
-
- - - -
-

- {item.title} -

-
-
- - ); - } + const Wrapper = isExternal ? "a" : Link; + const wrapperProps = isExternal + ? { href: item.link, target: "_blank", rel: "noopener noreferrer" } + : { href: item.link }; return ( -
@@ -108,7 +79,10 @@ export default function Docs() { strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} - d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" + d={isReference + ? "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" + : "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" + } />
@@ -117,7 +91,7 @@ export default function Docs() { - + ); })} diff --git a/articles/content.yml b/articles/content.yml index 8514350..38118b4 100644 --- a/articles/content.yml +++ b/articles/content.yml @@ -11,4 +11,6 @@ landing: - title: DocumentDB Local link: /docs/documentdb-local - title: Architecture under the hood - link: /docs/architecture \ No newline at end of file + link: /docs/architecture + - title: Samples & Demos + link: https://github.com/documentdb/documentdb-samples-gallery \ No newline at end of file