Skip to content

Commit

Permalink
feat(home): Add join us button at end of page
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokamoto committed Feb 19, 2024
1 parent 4d9496a commit bdb207e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
58 changes: 36 additions & 22 deletions src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Button from '@/components/Button';
import Duck from '@/components/Duck';
import FancyRectangle from '@/components/FancyRectangle';
import ImageCarousel from '@/components/ImageCarousel';
Expand Down Expand Up @@ -230,41 +231,54 @@ export default function HomePage() {
</section>

{/* CTA part 2 */}
<section>
<section className="mb-[1em] lg:mb-[6em] xl:mb-[10em]">
<div className="h-24"></div>
<div className="mb-[3em] md:mb-[8.75em] lg:md:mb-[11.3em]">
<div className="mb-[3em] md:mb-[8em] lg:mb-[6em]">
{/* <Grid /> */}
<Image
src="/images/rectangle-grid.svg"
alt="Rectangle Grid"
width={500}
height={500}
className="absolute -z-10 mt-12 w-[20em] md:w-[35em] lg:w-[35em]"
className="absolute -z-10 mt-10 w-[25em] md:w-[40em] lg:w-[45em]"
/>
</div>

<div className="relative z-10 ml-[2.5em] flex w-fit flex-col md:ml-[4.4em]">
<div className="relative mb-2 flex flex-row justify-end space-x-4 *:h-8 md:*:h-10">
<Duck colour="white" outline />
<Duck colour="white" outline />
<Duck colour="white" />
<Duck colour="white" />
<Duck colour="white" />
<div className="z-10 flex flex-col gap-20 xl:flex-row">
<div className="relative z-10 flex w-fit flex-col xl:ml-12">
<div className="relative mb-2 flex flex-row justify-end space-x-4 *:h-8 md:*:h-10">
<Duck colour="white" outline />
<Duck colour="white" outline />
<Duck colour="white" />
<Duck colour="white" />
<Duck colour="white" />
</div>
<div className="relative z-10 flex flex-row">
<div className="h-auto w-16 bg-orange"></div>
<div className="relative flex flex-col">
<span className="relative bg-white py-8 pl-4 pr-16 text-3xl font-black text-black lg:pr-32 lg:text-6xl">
Thinking about <span className="text-orange">Joining?</span>
</span>
<p className="border-2 border-white bg-grey py-4 pl-4 pr-16 text-lg lg:pr-32 lg:text-xl">
New members are always welcome!
</p>
</div>
</div>{' '}
</div>
<div className="relative z-10 flex flex-row">
<div className="h-auto w-10 bg-orange"></div>
<div className="relative flex flex-col">
<span className="relative bg-white px-4 py-2 text-2xl font-black text-black lg:text-3xl">
Thinking about <span className="text-orange"> Joining?</span>
</span>
<p className="border-2 border-white bg-grey px-4 py-2 text-lg lg:text-xl">
New members are always welcome!
</p>

<div className="h-fill flex flex-row justify-center py-4 xl:flex-col">
<div className="w-fit">
<Button
colour="purple"
href="/join"
width="w-64"
font="text-center text-black text-xl md:text-4xl lg:text-5xl"
>
Join Us
</Button>
</div>
</div>{' '}
</div>
</div>

<div className="h-16 smr:h-24 md:h-32 lg:h-20"></div>
</section>
</main>
);
Expand Down
5 changes: 3 additions & 2 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ interface ButtonProps {
type?: 'button' | 'submit' | 'reset';
width?: string;
loading?: boolean;
font?: string;
}

const Button = ({ children, colour, href, onClick, width, type, loading }: ButtonProps) => {
const Button = ({ children, colour, href, onClick, width, type, loading, font }: ButtonProps) => {
const isAnchor = !!href;
const Component = isAnchor ? 'a' : 'button';

Expand All @@ -23,7 +24,7 @@ const Button = ({ children, colour, href, onClick, width, type, loading }: Butto
href={isAnchor ? href : undefined}
onClick={onClick}
type={isAnchor ? undefined : type}
className={`${width} ${BG_COLOURS[colour]} ${isAnchor ? 'hover:bg-yellow' : 'hover:enabled:bg-yellow'} whitespace-nowrap border-2 border-black px-12 py-4 text-lg font-bold transition-colors duration-300 disabled:cursor-wait disabled:grayscale md:px-2 md:py-1 md:text-base lg:px-6 lg:py-2`}
className={`${width} ${font ?? 'text-lg md:text-base'} ${BG_COLOURS[colour]} ${isAnchor ? 'hover:bg-yellow' : 'hover:enabled:bg-yellow'} whitespace-nowrap border-2 border-black px-12 py-4 font-bold transition-colors duration-300 disabled:cursor-wait disabled:grayscale md:px-2 md:py-1 lg:px-6 lg:py-2`}
disabled={loading}
>
{children}
Expand Down

0 comments on commit bdb207e

Please sign in to comment.