mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
home page
This commit is contained in:
parent
82301d91e1
commit
0c281bc602
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -2,8 +2,8 @@
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": true,
|
||||
"source.organizeImports": true,
|
||||
"source.sortMembers": true
|
||||
"source.fixAll": "explicit",
|
||||
"source.organizeImports": "explicit",
|
||||
"source.sortMembers": "explicit"
|
||||
}
|
||||
}
|
||||
|
18
app/landing.tsx
Normal file
18
app/landing.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import { Carousel } from 'components/carousel';
|
||||
import { ThreeItemGrid } from 'components/grid/three-items';
|
||||
import Footer from 'components/layout/footer';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
export default function Landing() {
|
||||
return (
|
||||
<>
|
||||
<ThreeItemGrid />
|
||||
<Suspense>
|
||||
<Carousel />
|
||||
<Suspense>
|
||||
<Footer />
|
||||
</Suspense>
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
}
|
@ -37,7 +37,9 @@ export default async function RootLayout({ children }: { children: ReactNode })
|
||||
<body className="bg-neutral-50 text-black selection:bg-teal-300 dark:bg-neutral-900 dark:text-white dark:selection:bg-pink-500 dark:selection:text-white">
|
||||
<Navbar />
|
||||
<Suspense>
|
||||
<main>{children}</main>
|
||||
<main>
|
||||
<div className="max-w-10xl mx-auto sm:px-8 lg:px-10">{children}</div>
|
||||
</main>
|
||||
</Suspense>
|
||||
</body>
|
||||
</html>
|
||||
|
32
app/page.tsx
32
app/page.tsx
@ -1,7 +1,7 @@
|
||||
import { Carousel } from 'components/carousel';
|
||||
import { ThreeItemGrid } from 'components/grid/three-items';
|
||||
import { Hero } from 'components/home/hero';
|
||||
import Newsletter from 'components/home/newsletter';
|
||||
import Services from 'components/home/services';
|
||||
import Footer from 'components/layout/footer';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
@ -15,13 +15,25 @@ export const metadata = {
|
||||
export default async function HomePage() {
|
||||
return (
|
||||
<>
|
||||
<ThreeItemGrid />
|
||||
<Suspense>
|
||||
<Carousel />
|
||||
<Suspense>
|
||||
<Footer />
|
||||
</Suspense>
|
||||
</Suspense>
|
||||
<div className="overflow-hidden">
|
||||
<div className="mx-auto max-w-7xl px-6 pb-32 pt-36 sm:pt-60 lg:px-8 lg:pt-10">
|
||||
<Hero
|
||||
title="Eco friendly living now"
|
||||
description=""
|
||||
ctaText1="We believe sustainable living is possible starting from right inside our homes."
|
||||
ctaText2="We aim to bring sustainable, eco friendly, zero waste alternatives to common household items."
|
||||
ctaText3="Our mission is to replace 10 million plastic items with sustainable alternatives by 2030."
|
||||
image1="/home/sapling.jpg"
|
||||
image2="/home/water.jpg"
|
||||
image3="/home/lava.jpg"
|
||||
image4="/home/forest.jpg"
|
||||
image5="/home/fish.jpg"
|
||||
/>
|
||||
<Services />
|
||||
<Newsletter />
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
111
components/home/hero.tsx
Normal file
111
components/home/hero.tsx
Normal file
@ -0,0 +1,111 @@
|
||||
import Image from 'next/image';
|
||||
|
||||
export function Hero({
|
||||
title,
|
||||
description,
|
||||
ctaText1,
|
||||
ctaText2,
|
||||
ctaText3,
|
||||
image1,
|
||||
image2,
|
||||
image3,
|
||||
image4,
|
||||
image5
|
||||
}: {
|
||||
title: string;
|
||||
description: string;
|
||||
ctaText1: string;
|
||||
ctaText2: string;
|
||||
ctaText3: string;
|
||||
image1: string;
|
||||
image2: string;
|
||||
image3: string;
|
||||
image4: string;
|
||||
image5: string;
|
||||
}) {
|
||||
return (
|
||||
<div className="mx-auto max-w-2xl gap-x-14 lg:mx-0 lg:flex lg:max-w-none lg:items-center">
|
||||
<div className="relative w-full max-w-xl lg:shrink-0 xl:max-w-2xl">
|
||||
<h1 className="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">
|
||||
<p>{title}</p>
|
||||
<p>{description}</p>
|
||||
</h1>
|
||||
<p className="mt-6 text-lg leading-8 text-gray-600 sm:max-w-md lg:max-w-none">
|
||||
<p>{ctaText1}</p>
|
||||
<p>{ctaText2}</p>
|
||||
<br />
|
||||
<p>{ctaText3}</p>
|
||||
</p>
|
||||
<div className="mt-10 flex items-center gap-x-6">
|
||||
<a
|
||||
href="#"
|
||||
className="rounded-md bg-0-fern_green-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-0-fern_green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-0-fern_green-600"
|
||||
>
|
||||
Shop
|
||||
</a>
|
||||
<a href="#" className="text-sm font-semibold leading-6 text-gray-900">
|
||||
Consulting <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-14 flex justify-end gap-8 sm:-mt-44 sm:justify-start sm:pl-20 lg:mt-0 lg:pl-0">
|
||||
<div className="ml-auto w-44 flex-none space-y-8 pt-32 sm:ml-0 sm:pt-80 lg:order-last lg:pt-36 xl:order-none xl:pt-80">
|
||||
<div className="relative">
|
||||
<Image
|
||||
src={image1}
|
||||
alt={''}
|
||||
width={528}
|
||||
height={528}
|
||||
className="aspect-[2/3] w-full rounded-xl bg-gray-900/5 object-cover shadow-lg"
|
||||
></Image>
|
||||
<div className="pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-gray-900/10" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="mr-auto w-44 flex-none space-y-8 sm:mr-0 sm:pt-52 lg:pt-36">
|
||||
<div className="relative">
|
||||
<Image
|
||||
src={image2}
|
||||
alt={''}
|
||||
width={528}
|
||||
height={528}
|
||||
className="aspect-[2/3] w-full rounded-xl bg-gray-900/5 object-cover shadow-lg"
|
||||
></Image>
|
||||
<div className="pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-gray-900/10" />
|
||||
</div>
|
||||
<div className="relative">
|
||||
<Image
|
||||
src={image3}
|
||||
alt={''}
|
||||
width={528}
|
||||
height={528}
|
||||
className="aspect-[2/3] w-full rounded-xl bg-gray-900/5 object-cover shadow-lg"
|
||||
></Image>
|
||||
<div className="pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-gray-900/10" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-44 flex-none space-y-8 pt-32 sm:pt-0">
|
||||
<div className="relative">
|
||||
<Image
|
||||
src={image4}
|
||||
alt={''}
|
||||
width={528}
|
||||
height={528}
|
||||
className="aspect-[2/3] w-full rounded-xl bg-gray-900/5 object-cover shadow-lg"
|
||||
></Image>
|
||||
<div className="pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-gray-900/10" />
|
||||
</div>
|
||||
<div className="relative">
|
||||
<Image
|
||||
src={image5}
|
||||
alt={''}
|
||||
width={528}
|
||||
height={528}
|
||||
className="aspect-[2/3] w-full rounded-xl bg-gray-900/5 object-cover shadow-lg"
|
||||
></Image>
|
||||
<div className="pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-gray-900/10" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
41
components/home/newsletter.tsx
Normal file
41
components/home/newsletter.tsx
Normal file
@ -0,0 +1,41 @@
|
||||
export default function Newsletter() {
|
||||
return (
|
||||
<div className="bg-white py-16 sm:py-24 lg:py-32">
|
||||
<div className="mx-auto max-w-lg px-6 text-center lg:px-8">
|
||||
<div className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
|
||||
<h2 className="inline max-w-xl sm:block">Want product news and updates?</h2>{' '}
|
||||
<p className="inline sm:block">Sign up for our newsletter.</p>
|
||||
</div>
|
||||
<form className="mt-10 max-w-xl">
|
||||
<div className="flex gap-x-4">
|
||||
<label htmlFor="email-address" className="sr-only">
|
||||
Email address
|
||||
</label>
|
||||
<input
|
||||
id="email-address"
|
||||
name="email"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
required
|
||||
className="min-w-0 flex-auto rounded-md border-0 px-3.5 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-0-fern_green-600 sm:text-sm sm:leading-6"
|
||||
placeholder="Enter your email"
|
||||
/>
|
||||
<button
|
||||
type="submit"
|
||||
className="flex-none rounded-md bg-0-fern_green-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-0-fern_green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-0-fern_green-600"
|
||||
>
|
||||
Subscribe
|
||||
</button>
|
||||
</div>
|
||||
<p className="mt-4 text-sm leading-6 text-gray-900">
|
||||
We care about your data. Read our{' '}
|
||||
<a href="#" className="font-semibold text-0-fern_green-600 hover:text-0-fern_green-500">
|
||||
privacy policy
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
42
components/home/services.tsx
Normal file
42
components/home/services.tsx
Normal file
@ -0,0 +1,42 @@
|
||||
import { BriefcaseIcon, ShoppingBagIcon } from '@heroicons/react/24/outline';
|
||||
|
||||
const features = [
|
||||
{
|
||||
name: 'Products',
|
||||
description: 'Eco friendly products that are sustainable and recyclable.',
|
||||
icon: ShoppingBagIcon
|
||||
},
|
||||
{
|
||||
name: 'Consulting services',
|
||||
description:
|
||||
'Talk to us if you would like to know more about sustainable living or are looking to setup a sustainable business.',
|
||||
icon: BriefcaseIcon
|
||||
}
|
||||
];
|
||||
|
||||
export default function Services() {
|
||||
return (
|
||||
<div className="bg-white py-24 sm:py-32">
|
||||
<div className="mx-auto max-w-7xl px-6 lg:px-8">
|
||||
<div className="mx-auto grid max-w-2xl grid-cols-1 gap-x-8 gap-y-16 sm:gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3">
|
||||
<h2 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
|
||||
Stay on top of customer support
|
||||
</h2>
|
||||
<dl className="col-span-2 grid grid-cols-1 gap-x-8 gap-y-16 sm:grid-cols-2">
|
||||
{features.map((feature) => (
|
||||
<div key={feature.name}>
|
||||
<dt className="text-base font-semibold leading-7 text-gray-900">
|
||||
<div className="mb-6 flex h-10 w-10 items-center justify-center rounded-lg bg-0-fern_green-600">
|
||||
<feature.icon className="h-6 w-6 text-white" aria-hidden="true" />
|
||||
</div>
|
||||
{feature.name}
|
||||
</dt>
|
||||
<dd className="mt-1 text-base leading-7 text-gray-600">{feature.description}</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -5,12 +5,16 @@ module.exports = {
|
||||
ignoreDuringBuilds: true
|
||||
},
|
||||
images: {
|
||||
formats: ['image/avif', 'image/webp'],
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: 'cdn.shopify.com',
|
||||
pathname: '/s/files/**'
|
||||
},
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: 'images.unsplash.com',
|
||||
pathname: '/**'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
31
package.json
31
package.json
@ -22,13 +22,14 @@
|
||||
"*": "prettier --write --ignore-unknown"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"clsx": "^2.0.0",
|
||||
"geist": "^1.0.0",
|
||||
"next": "14.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
"@headlessui/react": "^1.7.18",
|
||||
"@heroicons/react": "^2.1.1",
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"clsx": "^2.1.0",
|
||||
"geist": "^1.2.2",
|
||||
"next": "^14.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/container-queries": "^0.1.1",
|
||||
@ -37,16 +38,16 @@
|
||||
"@types/react": "18.2.33",
|
||||
"@types/react-dom": "18.2.14",
|
||||
"@vercel/git-hooks": "^1.0.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint-config-next": "^14.0.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-next": "^14.1.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-unicorn": "^48.0.1",
|
||||
"lint-staged": "^15.0.2",
|
||||
"postcss": "^8.4.31",
|
||||
"lint-staged": "^15.2.2",
|
||||
"postcss": "^8.4.35",
|
||||
"prettier": "3.0.3",
|
||||
"prettier-plugin-tailwindcss": "^0.5.6",
|
||||
"tailwindcss": "^3.3.5",
|
||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "5.2.2"
|
||||
}
|
||||
}
|
||||
|
1438
pnpm-lock.yaml
generated
1438
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
public/home/fish.jpg
Normal file
BIN
public/home/fish.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
BIN
public/home/forest.jpg
Normal file
BIN
public/home/forest.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 MiB |
BIN
public/home/lava.jpg
Normal file
BIN
public/home/lava.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 MiB |
BIN
public/home/sapling.jpg
Normal file
BIN
public/home/sapling.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
public/home/water.jpg
Normal file
BIN
public/home/water.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 MiB |
@ -5,6 +5,70 @@ module.exports = {
|
||||
content: ['./app/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: [
|
||||
{
|
||||
fern_green: {
|
||||
DEFAULT: '#4b7f52',
|
||||
100: '#0f1a11',
|
||||
200: '#1e3321',
|
||||
300: '#2d4d32',
|
||||
400: '#3c6742',
|
||||
500: '#4b7f52',
|
||||
600: '#65a46d',
|
||||
700: '#8bbb92',
|
||||
800: '#b2d2b6',
|
||||
900: '#d8e8db'
|
||||
},
|
||||
uranian_blue: {
|
||||
DEFAULT: '#a3cef1',
|
||||
100: '#0a2b46',
|
||||
200: '#15578c',
|
||||
300: '#1f82d2',
|
||||
400: '#5ca8e7',
|
||||
500: '#a3cef1',
|
||||
600: '#b4d7f4',
|
||||
700: '#c7e1f7',
|
||||
800: '#daebf9',
|
||||
900: '#ecf5fc'
|
||||
},
|
||||
hunyadi_yellow: {
|
||||
DEFAULT: '#f6bd60',
|
||||
100: '#412904',
|
||||
200: '#815308',
|
||||
300: '#c27c0b',
|
||||
400: '#f2a11f',
|
||||
500: '#f6bd60',
|
||||
600: '#f8ca80',
|
||||
700: '#f9d7a0',
|
||||
800: '#fbe4bf',
|
||||
900: '#fdf2df'
|
||||
},
|
||||
'tea_rose_(red)': {
|
||||
DEFAULT: '#f5cac3',
|
||||
100: '#4b150d',
|
||||
200: '#962a19',
|
||||
300: '#db432c',
|
||||
400: '#e88677',
|
||||
500: '#f5cac3',
|
||||
600: '#f7d4ce',
|
||||
700: '#f9deda',
|
||||
800: '#fbe9e7',
|
||||
900: '#fdf4f3'
|
||||
},
|
||||
rich_black: {
|
||||
DEFAULT: '#001514',
|
||||
100: '#000404',
|
||||
200: '#000808',
|
||||
300: '#000c0c',
|
||||
400: '#001010',
|
||||
500: '#001514',
|
||||
600: '#007670',
|
||||
700: '#00d8cd',
|
||||
800: '#3bfff5',
|
||||
900: '#9dfffa'
|
||||
}
|
||||
}
|
||||
],
|
||||
fontFamily: {
|
||||
sans: ['var(--font-geist-sans)']
|
||||
},
|
||||
@ -34,6 +98,7 @@ module.exports = {
|
||||
hoverOnlyWhenSupported: true
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/forms'),
|
||||
require('@tailwindcss/container-queries'),
|
||||
require('@tailwindcss/typography'),
|
||||
plugin(({ matchUtilities, theme }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user