From 7f62550c7a56372230dac2a4e8d459601d8449b1 Mon Sep 17 00:00:00 2001 From: deme Date: Fri, 21 Apr 2023 14:22:44 -0300 Subject: [PATCH] [website,#778][m]: add Get Started and Gallery button to the hero section --- site/components/ButtonLink.tsx | 26 ++++++++++++++++++++++++++ site/components/Gallery.tsx | 9 +++++---- site/components/Hero.tsx | 10 ++++++++++ site/components/NewsletterForm.tsx | 2 +- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 site/components/ButtonLink.tsx diff --git a/site/components/ButtonLink.tsx b/site/components/ButtonLink.tsx new file mode 100644 index 00000000..24f4ba94 --- /dev/null +++ b/site/components/ButtonLink.tsx @@ -0,0 +1,26 @@ +import Link from 'next/link'; + +export default function ButtonLink({ + style = 'primary', + className = '', + href = '', + children, +}) { + let styleClassName = ''; + + if (style == 'primary') { + styleClassName = 'text-primary bg-blue-400 hover:bg-blue-300'; + } else if (style == 'secondary') { + styleClassName = + 'text-secondary border !border-secondary hover:text-primary hover:bg-blue-300'; + } + + return ( + + {children} + + ); +} diff --git a/site/components/Gallery.tsx b/site/components/Gallery.tsx index f109fb35..daf2e890 100644 --- a/site/components/Gallery.tsx +++ b/site/components/Gallery.tsx @@ -49,12 +49,13 @@ const items = [ export default function Gallery() { return ( -

+

-

- Discover what's being powered by Portal.JS -

+

Discover what's being powered by Portal.JS

{items.map((item) => { return ; diff --git a/site/components/Hero.tsx b/site/components/Hero.tsx index 50d584e2..286be50f 100644 --- a/site/components/Hero.tsx +++ b/site/components/Hero.tsx @@ -1,6 +1,7 @@ import clsx from 'clsx'; import Highlight, { defaultProps } from 'prism-react-renderer'; import { Fragment, useRef } from 'react'; +import ButtonLink from './ButtonLink'; import NewsletterForm from './NewsletterForm'; const codeLanguage = 'javascript'; @@ -53,6 +54,15 @@ export function Hero() { present a single dataset or build a full-scale data catalog/portal.

+ + + Get Started + + + + Gallery + +
diff --git a/site/components/NewsletterForm.tsx b/site/components/NewsletterForm.tsx index 2a889daa..f372ae6f 100644 --- a/site/components/NewsletterForm.tsx +++ b/site/components/NewsletterForm.tsx @@ -51,7 +51,7 @@ export default function NewsletterForm() { > - Notify me + Notify Me