diff --git a/components/BlogCard.css b/components/BlogCard.css new file mode 100644 index 0000000..18d6ebe --- /dev/null +++ b/components/BlogCard.css @@ -0,0 +1,37 @@ +.components__blog_card { + min-width: 10rem; + aspect-ratio: 3 / 4; + display: flex; + flex-direction: column; + padding: var(--_gap-half); + gap: var(--_gap); + box-shadow: 0 0 0.4rem 0.2rem var(--_translucent); + border: var(--_border-size) solid transparent; + background-repeat: no-repeat; + background-size: contain; + + &:focus-visible, + &:hover { + border: var(--_border-size) solid var(--_accent-color); + } + + & h3 { + margin: 0; + } +} + +.components__blog_card__spacer { + height: 50%; +} + +.components__blog_card__text { + text-wrap: balance; + flex-grow: 1; +} + +.components__blog_card__footer { + height: fit-content; + display: flex; + gap: var(--_gap); + justify-content: space-between; +} diff --git a/components/BlogCard.tsx b/components/BlogCard.tsx new file mode 100644 index 0000000..1fb431e --- /dev/null +++ b/components/BlogCard.tsx @@ -0,0 +1,54 @@ +type BlogCardProps = { + img: string + title: string + text: string + author: string + lasUpdate: Date + id: string +} + +export function BlogCard( + { img, title, text, author, lasUpdate, id }: BlogCardProps, +) { + return ( +