mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
🎨 styles: img banner home
:%s
This commit is contained in:
@@ -11,11 +11,19 @@
|
|||||||
@apply grid;
|
@apply grid;
|
||||||
grid-template-columns: 1fr 1.8fr;
|
grid-template-columns: 1fr 1.8fr;
|
||||||
.left {
|
.left {
|
||||||
@apply flex items-end justify-center custom-border-radius-lg;
|
@apply relative flex items-end justify-center custom-border-radius-lg;
|
||||||
margin-right: 1.6rem;
|
margin-right: 1.6rem;
|
||||||
background-image: url('./assets/home_banner.png');
|
.imgWrap {
|
||||||
background-repeat: no-repeat;
|
@apply absolute w-full h-full;
|
||||||
background-size: cover;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
> div {
|
||||||
|
@apply w-full h-full custom-border-radius-lg;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
@apply relative font-heading text-center;
|
@apply relative font-heading text-center;
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Banner } from 'src/components/common'
|
import { Banner } from 'src/components/common'
|
||||||
import BannerImgRight from './assets/banner_full.png'
|
import BannerImgRight from './assets/banner_full.png'
|
||||||
|
import HomeBannerImg from './assets/home_banner.png'
|
||||||
import s from './HomeBanner.module.scss'
|
import s from './HomeBanner.module.scss'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string
|
className?: string
|
||||||
@@ -12,6 +14,9 @@ const HomeBanner = ({ }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div className={s.homeBanner}>
|
<div className={s.homeBanner}>
|
||||||
<section className={s.left}>
|
<section className={s.left}>
|
||||||
|
<div className={s.imgWrap}>
|
||||||
|
<Image src={HomeBannerImg} placeholder='blur' />
|
||||||
|
</div>
|
||||||
<div className={s.text}>
|
<div className={s.text}>
|
||||||
Freshness<br />guaranteed
|
Freshness<br />guaranteed
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +35,7 @@ const HomeBanner = ({ }: Props) => {
|
|||||||
imgLink: BannerImgRight.src,
|
imgLink: BannerImgRight.src,
|
||||||
size: "small",
|
size: "small",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div >
|
</div >
|
||||||
|
Reference in New Issue
Block a user