Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
- initial commit with header and hero section
Browse files Browse the repository at this point in the history
  • Loading branch information
mertthesamael committed Aug 12, 2023
1 parent e795856 commit 7144814
Show file tree
Hide file tree
Showing 28 changed files with 312 additions and 138 deletions.
Binary file modified app/favicon.ico
Binary file not shown.
27 changes: 0 additions & 27 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -1,27 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
13 changes: 8 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import './globals.css'
import { eudox } from '@/libs/fonts'
import '@/styles/global.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import Header from '@/components/Header'

const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: 'Create Next App',
title: 'Lalasia',
description: 'Generated by create next app',
}

Expand All @@ -16,7 +16,10 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={eudox.className}>
<Header />
{children}
</body>
</html>
)
}
109 changes: 3 additions & 106 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,10 @@
import HeroSection from '@/containers/home-page/hero-section'
import Image from 'next/image'

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore the Next.js 13 playground.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
<main>
<HeroSection/>
</main>
)
}
14 changes: 14 additions & 0 deletions components/Buttons/PrimaryButton/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { FC } from 'react'

interface PrimaryButtonProps {
text:string
}

const PrimaryButton: FC<PrimaryButtonProps> = ({ text }) => {
return (
<button className='bg-primaryColor w-[130px] p-2 md:p-4 md:w-[170px] md:h-[52px] text-sm md:text-md'>{text}</button>
)

}

export default PrimaryButton;
19 changes: 19 additions & 0 deletions components/Forms/Inputs/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import PrimaryButton from '@/components/Buttons/PrimaryButton';
import { Search } from '@/components/Icons/Search';
import React, { FC } from 'react'

interface SearchInputProps {

}

const SearchInput: FC<SearchInputProps> = ({ }) => {
return (
<div className='w-full rounded-lg p-2 md:p-4 bg-white flex items-center gap-4' style={{boxShadow:'0 -5px 30px -25px black'}}>
<Search />
<input type='text' placeholder='Search property' className='h-full w-full text-black border-none outline-none'/>
<PrimaryButton text='Search'/>
</div>
)
}

export default SearchInput;
26 changes: 26 additions & 0 deletions components/Header/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { HeaderNav } from "@/types/HeaderNav";


export const HeaderNavs : HeaderNav [] = [
{
id:1,
value:'Product',
href:'/'
},
{
id:2,
value:'Services',
href:'/'
},
{
id:3,
value:'Article',
href:'/'
},
{
id:4,
value:'About Us',
href:'/'
},

]
36 changes: 36 additions & 0 deletions components/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { FC } from 'react'
import { Logo } from '../Icons/Logo';
import Link from 'next/link';
import { Basket } from '../Icons/Basket';
import { Profile } from '../Icons/Profile';
import { HamburgerIcon } from '../Icons/HamburgerIcon';
import { HeaderNavs } from './constants';

interface HeaderProps {

}

const Header: FC<HeaderProps> = ({ }) => {
return (
<header className='w-full flex justify-center py-4 md:py-8 border-b-2 border-[#F3F3F3] abs'>
<div className='w-full max-w-screen-xl mx-5 md:mx-20 flex items-center justify-between'>
<div className='flex gap-3 items-center w-40'>
<Logo />
<h1 className='text-black text-2xl font-bold'>Lalasia</h1>
</div>
<nav className=' gap-14 hidden md:flex'>
{HeaderNavs.map((el,_i)=> <Link key={_i} href={el.href} className='text-black font-medium'>{el.value}</Link>)}
</nav>
<div className='gap-6 w-40 justify-end hidden md:flex'>
<Basket />
<Profile />
</div>
<div className='flex md:hidden'>
<HamburgerIcon />
</div>
</div>
</header>
)
}

export default Header;
14 changes: 14 additions & 0 deletions components/Icons/Basket.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@



export const Basket = () => {

return(
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" fill="none">
<path d="M9.375 9.58739V8.37489C9.375 5.56239 11.6375 2.79989 14.45 2.53739C17.8 2.21239 20.625 4.84989 20.625 8.13739V9.86239" stroke="#151411" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M11.25 27.5H18.75C23.775 27.5 24.675 25.4875 24.9375 23.0375L25.875 15.5375C26.2125 12.4875 25.3375 10 20 10H10C4.66253 10 3.78753 12.4875 4.12503 15.5375L5.06253 23.0375C5.32503 25.4875 6.22503 27.5 11.25 27.5Z" stroke="#151411" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M19.3691 15H19.3803" stroke="#151411" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M10.6181 15H10.6294" stroke="#151411" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
)
}
12 changes: 12 additions & 0 deletions components/Icons/HamburgerIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


export const HamburgerIcon = () => {

return(
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" fill="none">
<path d="M3.75 8.75H26.25" stroke="#151411" stroke-width="2" stroke-linecap="round"/>
<path d="M3.75 15H26.25" stroke="#151411" stroke-width="2" stroke-linecap="round"/>
<path d="M3.75 21.25H26.25" stroke="#151B33" stroke-width="2" stroke-linecap="round"/>
</svg>
)
}
23 changes: 23 additions & 0 deletions components/Icons/Logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@




export const Logo = () => {

return(
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 42 42" fill="none">
<g clipPath="url(#clip0_2_5593)">
<path d="M42 0H0V42H42V0Z" fill="white"/>
<path d="M32.9034 20.6011L31.9654 24.1011H13.6534L8.66943 5.50562H12.2954L16.3379 20.6011H32.9034Z" fill="#AD7E5C"/>
<path d="M31.4019 26.2009L30.4639 29.7009H9.60743L8.66943 26.2009H31.4019Z" fill="#518581"/>
<path d="M29.9003 31.801L28.9623 35.301H14.5913L13.6533 31.801H29.9003Z" fill="#A6D8D1"/>
</g>
<defs>
<clipPath id="clip0_2_5593">
<rect width="42" height="42" fill="white"/>
</clipPath>
</defs>
</svg>
)
}

9 changes: 9 additions & 0 deletions components/Icons/Profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const Profile = () => {

return(
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" fill="none">
<path d="M15 15C18.4518 15 21.25 12.2018 21.25 8.75C21.25 5.29822 18.4518 2.5 15 2.5C11.5482 2.5 8.75 5.29822 8.75 8.75C8.75 12.2018 11.5482 15 15 15Z" stroke="#151411" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M25.7377 27.5C25.7377 22.6625 20.9252 18.75 15.0002 18.75C9.07519 18.75 4.2627 22.6625 4.2627 27.5" stroke="#151411" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
)
}
12 changes: 12 additions & 0 deletions components/Icons/Search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@



export const Search = () => {

return(
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none">
<path d="M15.3332 28C22.3288 28 27.9998 22.3289 27.9998 15.3333C27.9998 8.33769 22.3288 2.66663 15.3332 2.66663C8.33756 2.66663 2.6665 8.33769 2.6665 15.3333C2.6665 22.3289 8.33756 28 15.3332 28Z" stroke="#AFADB5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M29.3332 29.3333L26.6665 26.6666" stroke="#AFADB5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
)
}
36 changes: 36 additions & 0 deletions containers/home-page/hero-section/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import SearchInput from "@/components/Forms/Inputs/Search";
import Image from "next/image";
import React, { FC } from "react";

interface HeroSectionProps {}

const HeroSection: FC<HeroSectionProps> = ({}) => {
return (
<section className="w-full flex justify-center">
<div className="w-full max-w-screen-xl flex flex-col py-10 md:py-20 items-center mx-5 md:mx-20 gap-8 md:gap-24">
<div className="flex flex-col items-center w-full md:w-[800px] text-center gap-8">
<div className="">
<h1 className="text-2xl md:text-6xl text-black font-bold">
Discover Furniture With High Quality Wood
</h1>
</div>
<div>
<p className="text-textColor text-sm md:text-lg">
Pellentesque etiam blandit in tincidunt at donec. Eget ipsum dignissim placerat nisi, adipiscing mauris non. Purus parturient viverra nunc, tortor sit laoreet. Quam tincidunt aliquam adipiscing tempor.
</p>
</div>
</div>
<div className="w-full relative flex justify-center flex-col items-center gap-8">
<div className="md:absolute top-[-2.5rem] w-full h-[48px] md:w-[810px] z-10">
<SearchInput />
</div>
<div className="w-full h-[160px] md:h-[480px] border-black relative overflow-hidden">
<Image className="rounded-lg object-cover" src={'/hero.png'} fill alt="Hero IMG"/>
</div>
</div>
</div>
</section>
);
};

export default HeroSection;
Loading

0 comments on commit 7144814

Please sign in to comment.