From 977f4f66f0a25f07092ddf2164687b9bbd180b4d Mon Sep 17 00:00:00 2001 From: Nikita Tchayka Date: Sat, 16 Sep 2023 18:03:42 +0100 Subject: Update features --- src/components/HomepageFeatures/index.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/components/HomepageFeatures/index.tsx') diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 337d39a..ce03948 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -9,9 +9,28 @@ import { FeatureItem } from "./feature-item"; import { ReadyFeatures } from "./ready-features"; import { ComingSoonFeatures } from "./coming-soon-features"; +const bgAndShadows = [ + { + bg: "bg-violet-200", + shadow: "shadow-neocyan", + button: "yellow", + }, + { + bg: "bg-yellow-200", + shadow: "shadow-neoviolet", + button: "cyan", + }, + { + bg: "bg-green-200", + shadow: "shadow-neoyellow", + button: "violet", + }, +]; + function Feature({ n, title, showcase, description, buttonText }: FeatureItem) { const k = n ?? 0; const reverse = k % 2 === 0 ? "xl:flex-row" : "xl:flex-row-reverse"; + const { bg, shadow, button } = bgAndShadows[k % bgAndShadows.length]; const showcaseComponent = "code" in showcase ? ( // {showcase.code} @@ -28,7 +47,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) { //
return (
{showcaseComponent} @@ -37,7 +56,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {

{title}

{description}

-
@@ -50,7 +69,7 @@ export default function HomepageFeatures(): JSX.Element { return (
- +
{/* horrible hack to hide the vertical bar */} -- cgit