Skip to content

Commit 800c978

Browse files
committed
Enhance Showcase component with dark mode support and layout adjustments
1 parent c58b13d commit 800c978

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

src/pages/showcase/index.tsx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { sortedUsers,
2424
type User,
2525
type TagType,} from '@site/src/data/users';
2626
import FavoriteIcon from '@site/src/components/svgIcons/FavoriteIcon';
27+
import { useColorMode } from '@docusaurus/theme-common';
2728

2829
const TITLE =
2930
'Recode Hive: Framing all the opensource projects built by our community members';
@@ -440,23 +441,39 @@ function ShowcaseCards() {
440441
}
441442

442443
export default function Showcase(): JSX.Element {
444+
443445
return (
444446
<Layout
445-
title={"Showcase of CodeHarborHub"}
446-
description="Showcase of CodeHarborHub for CodeHarborHub Learners, and users"
447+
title="Showcase of CodeHarborHub"
448+
description="Showcase of CodeHarborHub for CodeHarborHub Learners and users"
449+
>
450+
<ShowcaseContent />
451+
</Layout>
452+
);
453+
}
454+
455+
function ShowcaseContent() {
456+
const { colorMode } = useColorMode();
457+
const isDark = colorMode === "dark";
458+
459+
return (
460+
<main
461+
className={clsx(
462+
"",
463+
isDark ? "bg-[#121212] text-white" : "bg-white text-black"
464+
)}
447465
>
448466
<Head>
449467
<script
450468
async
451469
custom-element="amp-auto-ads"
452470
src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"
453-
/>
471+
/>
454472
</Head>
455-
<main className="margin-vert--lg">
456-
<ShowcaseHeader />
457-
<ShowcaseFilters />
458-
<ShowcaseCards />
459-
</main>
460-
</Layout>
473+
474+
<ShowcaseHeader />
475+
<ShowcaseFilters />
476+
<ShowcaseCards />
477+
</main>
461478
);
462-
}
479+
}

0 commit comments

Comments
 (0)