Skip to content

Commit

Permalink
Merge pull request #3 from yun-cheng/feat/home-page-header-ui
Browse files Browse the repository at this point in the history
feat(HomePage): add Header UI
  • Loading branch information
yun-cheng authored Apr 28, 2024
2 parents 2046fd7 + c72170f commit d77ce8d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
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

0 comments on commit d77ce8d

Please sign in to comment.