This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(nextjs): complete landing page design
- Loading branch information
Showing
15 changed files
with
437 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,101 @@ | ||
import React from "react"; | ||
import Image from "next/image"; | ||
|
||
import { cn } from "@ubus/ui"; | ||
import { Button } from "@ubus/ui/button"; | ||
import { Input } from "@ubus/ui/input"; | ||
import { Label } from "@ubus/ui/label"; | ||
import { Textarea } from "@ubus/ui/textarea"; | ||
|
||
interface IFromItem { | ||
label: string; | ||
name: string; | ||
placholder: string; | ||
} | ||
|
||
const formItems: IFromItem[] = [ | ||
{ | ||
label: "First name", | ||
name: "first_name", | ||
placholder: "First name", | ||
}, | ||
{ | ||
label: "Last name", | ||
name: "last_name", | ||
placholder: "Last name", | ||
}, | ||
{ | ||
label: "Email", | ||
name: "email", | ||
placholder: "[email protected]", | ||
}, | ||
{ | ||
label: "Phone (Optional)", | ||
name: "phone", | ||
placholder: "01400-12345", | ||
}, | ||
]; | ||
|
||
export const Contact = () => { | ||
return <div>Contact</div>; | ||
return ( | ||
<div className="container my-16 flex flex-col gap-8 lg:my-32 lg:gap-24"> | ||
<div className="flex flex-col gap-3"> | ||
<h2 className="text-center text-headline-large font-bold md:text-display-large"> | ||
Contact our team | ||
</h2> | ||
<p className="text-center text-body-small md:text-headline-small"> | ||
Got any questions about the product or scaling on our platform? | ||
</p> | ||
</div> | ||
<div className="lg:grid lg:grid-cols-2 lg:gap-20"> | ||
<div className="grid grid-cols-1 gap-5 lg:grid-cols-2 lg:gap-8"> | ||
{formItems.map((item) => ( | ||
<FormInput key={item.name} formItem={item} /> | ||
))} | ||
<div className="flex flex-col gap-3 lg:col-span-2"> | ||
<Label className="text-xl" htmlFor="message"> | ||
Message | ||
</Label> | ||
<Textarea | ||
className="col-span-2 border-outline bg-surface-container-low text-xl text-outline placeholder:text-xl placeholder:text-outline/30" | ||
rows={10} | ||
name="message" | ||
placeholder="Leave us a message..." | ||
/> | ||
</div> | ||
<Button className="h-[52px] text-xl font-medium lg:col-span-2"> | ||
Send Message | ||
</Button> | ||
</div> | ||
<div className="hidden rounded-3xl lg:block"> | ||
<Image | ||
alt="contact form banner image" | ||
src={"hey.svg"} | ||
width={1024} | ||
height={2048} | ||
className="h-full w-full" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
const FormInput = ({ formItem }: { formItem: IFromItem }) => { | ||
return ( | ||
<div | ||
className={cn( | ||
"flex flex-col gap-3 lg:col-span-2", | ||
formItem.name.includes("name") && "lg:col-span-1", | ||
)} | ||
> | ||
<Label className="text-xl" htmlFor={formItem.name}> | ||
{formItem.label} | ||
</Label> | ||
<Input | ||
className="h-[52px] border-outline bg-surface-container-low text-xl text-outline placeholder:text-xl placeholder:text-outline/30" | ||
name={formItem.name} | ||
placeholder={formItem.placholder} | ||
/> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,138 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import useThemeBasedValue from "@ubus/hooks/useThemeBasedValue"; | ||
import { Separator } from "@ubus/ui/separator"; | ||
|
||
export interface IMenuItem { | ||
title: string; | ||
links: { | ||
label: string; | ||
href: string; | ||
}[]; | ||
} | ||
|
||
const footerMenuItems: IMenuItem[] = [ | ||
{ | ||
title: "Resources", | ||
links: [ | ||
{ | ||
label: "Newsletter", | ||
href: "", | ||
}, | ||
{ | ||
label: "Blog", | ||
href: "", | ||
}, | ||
{ | ||
label: "Support", | ||
href: "", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Socials", | ||
links: [ | ||
{ | ||
label: "Facebook", | ||
href: "", | ||
}, | ||
{ | ||
label: "LinkedIn", | ||
href: "", | ||
}, | ||
{ | ||
label: "GitHub", | ||
href: "", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Important", | ||
links: [ | ||
{ | ||
label: "Settings", | ||
href: "", | ||
}, | ||
{ | ||
label: "Contact", | ||
href: "", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Legals", | ||
links: [ | ||
{ | ||
label: "License", | ||
href: "", | ||
}, | ||
{ | ||
label: "Privacy", | ||
href: "", | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export const Footer = () => { | ||
return <div>Footer</div>; | ||
const logoSrc = useThemeBasedValue("ubus.svg", "ubus-dark.svg"); | ||
return ( | ||
<div className="border-t border-outline-variant bg-surface-dim py-8 pt-12 lg:pt-20"> | ||
<div className="container flex flex-col gap-2"> | ||
<div className="flex flex-col gap-9"> | ||
<div className="flex flex-col gap-4"> | ||
<Link | ||
href="/" | ||
className="flex items-center space-x-3 rtl:space-x-reverse" | ||
> | ||
<Image | ||
src={logoSrc} | ||
width={32} | ||
height={24} | ||
className="h-8 w-6" | ||
alt="ubus logo" | ||
/> | ||
<span className="self-center whitespace-nowrap text-headline-large font-semibold dark:text-white"> | ||
UBus | ||
</span> | ||
</Link> | ||
<p className="text-body-large sm:text-headline-small"> | ||
Access live bus locations, schedules, and important updates all in | ||
one place. | ||
</p> | ||
</div> | ||
<div className="grid gap-9 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"> | ||
{footerMenuItems.map((item) => ( | ||
<FooterMenu menu={item} /> | ||
))} | ||
</div> | ||
<Separator /> | ||
</div> | ||
<p className="text-label-small text-on-surface/40 md:text-label-large"> | ||
Copyright 2024. All right reserved. | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
const FooterMenu = ({ menu }: { menu: IMenuItem }) => { | ||
return ( | ||
<div className="flex flex-col gap-1"> | ||
<h3 className="text-headline-small text-outline">{menu.title}</h3> | ||
<div className="flex flex-col items-start"> | ||
{menu.links.map((link) => ( | ||
<Link | ||
className="text-headline-large hover:underline" | ||
href={{ href: link.href }} | ||
> | ||
{link.label} | ||
</Link> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.