|
1 | 1 | import Head from "next/head"; |
| 2 | +import { motion } from "framer-motion"; |
| 3 | + |
| 4 | +import LogoPicture from "@/assets/images/brand/commit-rocket-logo.webp"; |
2 | 5 |
|
3 | 6 | import { Page } from "@/types/page"; |
4 | 7 | import LinkButton from "@/components/controls/LinkButton"; |
| 8 | +import Button from "@/components/controls/Button"; |
| 9 | +import Link from "@/components/navigation/Link"; |
| 10 | + |
| 11 | +import missions from "@/assets/state/missions"; |
| 12 | +import perks from "@/assets/state/perks"; |
5 | 13 |
|
6 | | -const FrontPage: Page = ({ className }) => { |
| 14 | +const logoAnim = { |
| 15 | + initial: { |
| 16 | + translateX: "-2.5%", |
| 17 | + translateY: "15%", |
| 18 | + rotate: "-2deg" |
| 19 | + }, |
| 20 | + animate: { |
| 21 | + translateX: "0", |
| 22 | + translateY: "0", |
| 23 | + rotate: "10deg" |
| 24 | + } |
| 25 | +} as const; |
| 26 | + |
| 27 | +const FrontPage: Page = ({ }) => { |
7 | 28 | return ( |
8 | 29 | <> |
9 | 30 | <Head> |
10 | 31 | <title>Commit Rocket</title> |
11 | 32 | </Head> |
12 | | - <LinkButton href="/about" color="secondary"> |
13 | | - Keep me up to date |
14 | | - </LinkButton> |
| 33 | + <main aria-labelledby="hero-title" className="flex flex-col flex-1 w-full gap-4 pb-8"> |
| 34 | + <section aria-label="hero" className="flex flex-col-reverse items-center h-fit min-h-0 max-w-[105rem] lg:flex-row lg:min-h-[30rem] lg:h-[75dvh] lg:h-[75vh] mx-auto"> |
| 35 | + <div className="relative flex flex-col items-center justify-center h-full col-span-3 gap-8 text-center lg:w-3/5"> |
| 36 | + <div className="absolute w-full h-full opacity-20 aspect-square bg-gradient-radial from-primary to-transparent -z-10" aria-hidden /> |
| 37 | + <h1 |
| 38 | + id="hero-title" |
| 39 | + className="text-3xl font-bold lg:text-6xl text-primary" |
| 40 | + > |
| 41 | + <span className="text-secondary">Launch</span> your <span className="text-secondary">Commits</span> in a <span className="text-secondary">Modern</span> way |
| 42 | + </h1> |
| 43 | + <p className="text-lg lg:text-xl lg:max-w-xl"> |
| 44 | + Experience Git in a modern and fast way with Commit Rocket, the open-source, lightweight and cross-platform Git client. |
| 45 | + </p> |
| 46 | + <LinkButton href="/#try-it-yourself" color="secondary" className="px-5 py-3 text-xl"> |
| 47 | + Try it Yourself |
| 48 | + </LinkButton> |
| 49 | + </div> |
| 50 | + <div className="relative flex items-center justify-center w-full min-h-[20rem] max-h-[40dvh] max-h-[40vh] lg:min-h-0 lg:h-full lg:max-h-full lg:w-2/5" style={{ aspectRatio: `${LogoPicture.width} / ${LogoPicture.height}` }}> |
| 51 | + <div className="absolute w-full h-full opacity-50 aspect-square bg-gradient-radial from-primary to-transparent" aria-hidden /> |
| 52 | + <motion.img |
| 53 | + variants={logoAnim} |
| 54 | + className="absolute max-w-full max-h-full object-contain aspect-auto w-full rotate-[10deg]" |
| 55 | + src={LogoPicture.src} |
| 56 | + width={LogoPicture.width} |
| 57 | + height={LogoPicture.height} |
| 58 | + /> |
| 59 | + </div> |
| 60 | + </section> |
| 61 | + <section |
| 62 | + aria-labelledby="mission" |
| 63 | + className="flex flex-col gap-12 mx-auto text-center max-w-[105rem] py-16" |
| 64 | + > |
| 65 | + <h2 |
| 66 | + id="mission" |
| 67 | + className="text-4xl font-bold md:text-5xl text-secondary" |
| 68 | + > |
| 69 | + Mission |
| 70 | + </h2> |
| 71 | + <div className="flex flex-col flex-wrap justify-between w-full gap-12 lg:flex-row"> |
| 72 | + {missions.map(({ title, image, text }, i) => ( |
| 73 | + <div key={i} className="flex flex-col items-center flex-1 gap-4"> |
| 74 | + <h3 className="text-2xl text-primary md:text-3xl lg:h-[5ex] 2xl:h-auto motion-safe:transition-all"> |
| 75 | + {title} |
| 76 | + </h3> |
| 77 | + <img |
| 78 | + className="w-full sm:w-2/3 lg:w-full" |
| 79 | + src={image.src} |
| 80 | + width={image.width} |
| 81 | + height={image.height} |
| 82 | + /> |
| 83 | + <p className="text-lg">{text}</p> |
| 84 | + </div> |
| 85 | + ))} |
| 86 | + </div> |
| 87 | + </section> |
| 88 | + <section |
| 89 | + aria-labelledby="try-it-yourself" |
| 90 | + className="flex flex-col gap-12 py-16 mx-auto text-center max-w-7xl" |
| 91 | + > |
| 92 | + <h2 |
| 93 | + id="try-it-yourself" |
| 94 | + className="text-4xl font-bold md:text-5xl text-secondary" |
| 95 | + > |
| 96 | + Try it Yourself |
| 97 | + </h2> |
| 98 | + <section className="flex flex-col gap-4"> |
| 99 | + <h3 className="text-2xl text-primary md:text-3xl">Commit Rocket is not out yet!</h3> |
| 100 | + <p className="text-xl"> |
| 101 | + Do you want to join in on this adventure and help develop Commit Rocket? |
| 102 | + We value your input and look forward to involving you in the process of making Commit Rocket as optimal as possible. |
| 103 | + </p> |
| 104 | + </section> |
| 105 | + <section className="flex flex-col gap-4"> |
| 106 | + <h3 className="text-xl font-bold md:text-2xl text-primary">Perks</h3> |
| 107 | + <p className="text-xl"> |
| 108 | + Sign up to stay in the loop on our progress, |
| 109 | + get early access to beta versions, and participate in surveys that help shape the development of our open-source and cross-platform Git client. |
| 110 | + </p> |
| 111 | + <div className="flex flex-wrap justify-center w-full gap-4" aria-hidden> |
| 112 | + {perks.map(({ title, icon: Icon }, i) => ( |
| 113 | + <div key={i} className="flex flex-col items-center w-32 gap-2"> |
| 114 | + <Icon className="w-12 sm:w-16 text-primary" /> |
| 115 | + <div className="font-bold">{title}</div> |
| 116 | + </div> |
| 117 | + ))} |
| 118 | + </div> |
| 119 | + </section> |
| 120 | + <section aria-label="Sign up" className="flex flex-col items-center gap-4"> |
| 121 | + <input |
| 122 | + className="w-full p-4 text-lg bg-white border-2 rounded-md md:text-xl border-primary" |
| 123 | + placeholder="your@email.com" |
| 124 | + /> |
| 125 | + <Button color="secondary" className="px-5 py-3 text-lg md:text-xl w-fit"> |
| 126 | + Keep me up-to-date! |
| 127 | + </Button> |
| 128 | + <p>You can always unsubscribe by going to <Link color="primary" href="/unsubscribe" underline>this link</Link></p> |
| 129 | + </section> |
| 130 | + </section> |
| 131 | + <section |
| 132 | + aria-labelledby="feedback" |
| 133 | + className="flex flex-col w-full gap-4 py-16 mx-auto text-center max-w-7xl" |
| 134 | + > |
| 135 | + <h2 |
| 136 | + id="feedback" |
| 137 | + className="text-4xl font-bold md:text-5xl text-secondary" |
| 138 | + > |
| 139 | + Feedback |
| 140 | + </h2> |
| 141 | + <section aria-labelledby="anon-feedback" className="flex flex-col gap-4"> |
| 142 | + <h3 id="anon-feedback" className="text-2xl text-primary md:text-3xl">Anonymous feedback</h3> |
| 143 | + <p className="text-xl"> |
| 144 | + Want to help us out without signing up? You can send us feedback directly by filling in your feedback below! |
| 145 | + </p> |
| 146 | + </section> |
| 147 | + <section aria-label="feedback-inbox" className="flex flex-col items-center gap-4"> |
| 148 | + <textarea |
| 149 | + className="w-full p-4 text-lg bg-white border-2 rounded-md md:text-xl border-primary h-fit" |
| 150 | + placeholder="I would like this feature!" |
| 151 | + value="" |
| 152 | + rows={5} |
| 153 | + /> |
| 154 | + <Button color="secondary" className="px-5 py-3 text-lg md:text-xl w-fit"> |
| 155 | + Submit Feedback |
| 156 | + </Button> |
| 157 | + <p>Alternatively you can send an email to <Link color="primary" href="mailto:feedback@commitrocket.com" underline>feedback@commitrocket.com</Link></p> |
| 158 | + </section> |
| 159 | + </section> |
| 160 | + </main> |
| 161 | + |
15 | 162 | </> |
16 | 163 | ); |
17 | 164 | }; |
|
0 commit comments