aboutsummaryrefslogtreecommitdiff
path: root/src/components/HomepageFeatures/index.tsx
diff options
context:
space:
mode:
authorNikita Tchayka <nikitatchayka@gmail.com>2023-09-16 18:03:42 +0100
committerNikita Tchayka <nikitatchayka@gmail.com>2023-09-16 18:03:42 +0100
commit977f4f66f0a25f07092ddf2164687b9bbd180b4d (patch)
treea86f41341db28fff933b3f9fd956612801b0362e /src/components/HomepageFeatures/index.tsx
parent87342ba2cc5ed495b28c3302a264f2ab1d44d3ed (diff)
downloadneohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.tar.gz
neohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.tar.bz2
neohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.zip
Update features
Diffstat (limited to 'src/components/HomepageFeatures/index.tsx')
-rw-r--r--src/components/HomepageFeatures/index.tsx25
1 files changed, 22 insertions, 3 deletions
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 ? (
// <CodeFrame language={showcase.language}>{showcase.code}</CodeFrame>
@@ -28,7 +47,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {
// <div className="bg-white -z-0 my-7 p-7 border-4 border-black"></div>
return (
<div
- className={`bg-violet-200 shadow-neocyan border-4 border-black xl:p-16 sm:p-8 p-0 flex sm:flex-col xl:flex-nowrap flex-wrap md:mx-32 sm:gap-16 gap-8 ${reverse}`}
+ className={`${bg} ${shadow} border-4 border-black xl:p-16 sm:p-8 p-0 flex sm:flex-col xl:flex-nowrap flex-wrap md:mx-32 sm:gap-16 gap-8 ${reverse}`}
>
<div className="self-center bg-codeBg flex-grow sm:overflow-visible overflow-hidden">
{showcaseComponent}
@@ -37,7 +56,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {
<h3 className="text-3xl">{title}</h3>
<p className="text-lg">{description}</p>
<div className="xl:self-start self-center">
- <Button rounded="full" color="cyan">
+ <Button rounded="full" color={button as any}>
<h3>{buttonText}</h3>
</Button>
</div>
@@ -50,7 +69,7 @@ export default function HomepageFeatures(): JSX.Element {
return (
<section>
<div className="sm:container relative">
- <span className="absolute left-1/2 w-4 h-full bg-violet-500 border-black border-2 -z-20" />
+ <span className="absolute left-1/2 w-4 h-full bg-black border-black border-2 -z-20" />
<div className="flex flex-col gap-32">
<div className="relative mb-10">
{/* horrible hack to hide the vertical bar */}