Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(HomePage): add Header UI #3

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/img/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { ReactElement } from 'react'
import cn from 'utils/cn'

export default function Header(): ReactElement {
return (
<div className={cn('h-[145px]', 'bg-circles bg-center bg-no-repeat')}>
<div
className={cn(
'-translate-x-px sm:-translate-y-px sm:translate-x-0',
'flex h-full flex-col items-center justify-center'
)}
>
<h2 className='text-[20px]/[27px] font-extrabold text-dark-desaturated-blue sm:text-[28px]/[38px]'>
Simple, traffic-based pricing
</h2>
<span
className={cn(
'pt-2 sm:pt-3',
'whitespace-pre-line text-center sm:whitespace-normal',
'text-[13px]/[23px] sm:text-[15px]/[20px]'
)}
>{`Sign-up for our 30-day trial.\nNo credit card required.`}</span>
</div>
</div>
)
}
16 changes: 15 additions & 1 deletion src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import Header from 'components/Header'
import type { ReactElement } from 'react'
import cn from 'utils/cn'

export default function HomePage(): ReactElement {
return <div>Home Page</div>
return (
<div
className={cn(
'min-h-screen px-6',
'bg-background bg-[length:auto_400px] bg-no-repeat sm:bg-very-pale-blue sm:bg-auto',
'font-semibold text-grayish-blue'
)}
>
<div className='pt-[57px] sm:pt-[67px]'>
<Header />
</div>
</div>
)
}
4 changes: 2 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const config = {
divider: '#EEF1FA'
},
backgroundImage: {
circles: 'url("img/circles.svg")',
background: 'url("img/background.svg")'
circles: 'url("/img/circles.svg")',
background: 'url("/img/background.svg")'
},
keyframes: {
'accordion-down': {
Expand Down
Loading