styles: add border-radius img

This commit is contained in:
unknown
2021-09-06 12:50:27 +07:00
parent 7832649d08
commit d1679422b2
5 changed files with 36 additions and 5 deletions

View File

@@ -38,6 +38,9 @@ module.exports = withCommerceConfig({
}, },
].filter(Boolean) ].filter(Boolean)
}, },
eslint: {
ignoreDuringBuilds: true,
}
}) })
// Don't delete this console log, useful to see the commerce config in Vercel deployments // Don't delete this console log, useful to see the commerce config in Vercel deployments

View File

@@ -9,14 +9,11 @@ interface BreadcrumbCommonProps {
showHomePage?: boolean; showHomePage?: boolean;
} }
const BreadcrumbCommon = ({ crumbs, showHomePage=false } : BreadcrumbCommonProps) => { const BreadcrumbCommon = ({ crumbs, showHomePage=true } : BreadcrumbCommonProps) => {
if (showHomePage) {
crumbs.unshift({link: "/", name: "Home"});
}
return ( return (
<section className={s.breadcrumbCommon}> <section className={s.breadcrumbCommon}>
{ {
crumbs.map((crumb, i) => { showHomePage && crumbs[0].link==="/" && crumbs.map((crumb, i) => {
if (i === 0) { if (i === 0) {
return ( return (
<BreadcrumbItem key={crumb.name} text={crumb.name} href={crumb.link} /> <BreadcrumbItem key={crumb.name} text={crumb.name} href={crumb.link} />
@@ -36,6 +33,30 @@ const BreadcrumbCommon = ({ crumbs, showHomePage=false } : BreadcrumbCommonProps
) )
}) })
} }
{
!showHomePage && crumbs.map((crumb, i) => {
if (i === 0) {
return
}
if (i === 1) {
return (
<BreadcrumbItem key={crumb.name} text={crumb.name} href={crumb.link} />
)
}
if (i === crumbs.length-1) {
return (
<BreadcrumbSeparator key={crumb.name}>
<span>{crumb.name}</span>
</BreadcrumbSeparator>
)
}
return (
<BreadcrumbSeparator key={crumb.name}>
<BreadcrumbItem text={crumb.name} href={crumb.link} />
</BreadcrumbSeparator>
)
})
}
</section> </section>
) )
} }

View File

@@ -11,6 +11,9 @@
&:hover{ &:hover{
cursor: pointer; cursor: pointer;
} }
img{
border-radius: 2.4rem;
}
} }
.title{ .title{
padding: 1.6rem 0.8rem 0.4rem 0.8rem; padding: 1.6rem 0.8rem 0.4rem 0.8rem;

View File

@@ -2,6 +2,7 @@ import { BreadcrumbCommon } from "src/components/common"
import s from './BlogBreadCrumb.module.scss' import s from './BlogBreadCrumb.module.scss'
const BLOG_DATA = [ const BLOG_DATA = [
{link: "/", name: "Home"},
{link: "/blogs", name: "Blog"}, {link: "/blogs", name: "Blog"},
]; ];

View File

@@ -9,6 +9,9 @@
} }
.left{ .left{
max-width: 59.8rem; max-width: 59.8rem;
img{
border-radius: 2.4rem;
}
} }
.right{ .right{
flex-shrink: 3; flex-shrink: 3;