home page strapi integration
This commit is contained in:
1 parent
91982b8c99
commit
87f4f6a1b8
8 files changed
+101
-136
No files matched your search
@@ -2,7 +2,6 @@ import s from './styles.module.css'
|
||||
|
||||
import cx from 'classnames'
|
||||
import Link from 'next/link'
|
||||
import { Image } from '../Image'
|
||||
|
||||
const layoutClass = {
|
||||
simple: s.simple,
|
||||
@@ -13,11 +12,7 @@ export type CardLayout = 'simple' | 'featured'
|
||||
export type CardProps = {
|
||||
style?: React.CSSProperties
|
||||
href: string
|
||||
img: {
|
||||
alt: string
|
||||
src: string
|
||||
srcSet: string
|
||||
}
|
||||
cover: React.ReactNode
|
||||
layout: CardLayout
|
||||
}
|
||||
|
||||
@@ -26,11 +21,7 @@ export const Card: React.FC<CardProps> = props => (
|
||||
<Link href={props.href}>
|
||||
<a>
|
||||
<div className={s.image}>
|
||||
<Image
|
||||
alt={props.img.alt}
|
||||
src={props.img.src}
|
||||
srcSet={props.img.srcSet}
|
||||
/>
|
||||
{props.cover}
|
||||
</div>
|
||||
|
||||
<div className={s.body}>
|
||||
|
||||
@@ -31,18 +31,6 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
|
||||
transition: all 150ms ease-out;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: var(--color-back);
|
||||
padding: var(--size-m);
|
||||
|
||||
Reference in new issue
Block a user