mirror of
https://github.com/MaggieAppleton/digital-gardeners.git
synced 2025-09-20 23:53:38 +02:00
fixed next images, renamed posts to gardens
This commit is contained in:
parent
131130785e
commit
d6cf6d10fc
21 changed files with 58 additions and 28 deletions
|
@ -2,11 +2,11 @@ import { motion } from "framer-motion";
|
|||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Card({ post }) {
|
||||
export default function Card({ garden }) {
|
||||
return (
|
||||
<motion.li
|
||||
className="w-60 mr-10 mb-14 space-y-2 opacity-80"
|
||||
key={post.filePath}
|
||||
key={garden.filePath}
|
||||
whileHover={{
|
||||
scale: 1.02,
|
||||
opacity: 1,
|
||||
|
@ -17,27 +17,27 @@ export default function Card({ post }) {
|
|||
}}
|
||||
>
|
||||
<Link
|
||||
as={`${post.filePath.replace(/\.mdx?$/, "")}`}
|
||||
as={`${garden.filePath.replace(/\.mdx?$/, "")}`}
|
||||
href={`[slug]`}
|
||||
>
|
||||
<a>
|
||||
{post.data.image && (
|
||||
{garden.data.image && (
|
||||
<Image
|
||||
className="rounded-md"
|
||||
src={post.data.image}
|
||||
src={garden.data.image}
|
||||
width={250}
|
||||
height={200}
|
||||
alt={post.data.title}
|
||||
alt={garden.data.title}
|
||||
/>
|
||||
)}
|
||||
<h3 className="text-coolGray-600 leading-tight mt-2">
|
||||
{post.data.title}
|
||||
{garden.data.title}
|
||||
</h3>
|
||||
</a>
|
||||
</Link>
|
||||
<motion.div>
|
||||
{post.data.tools &&
|
||||
post.data.tools.map((tool) => <p>{tool}</p>)}
|
||||
{garden.data.tools &&
|
||||
garden.data.tools.map((tool) => <p>{tool}</p>)}
|
||||
</motion.div>
|
||||
<svg className="h-4 w-4 text-coolGray-600" viewBox="0 0 20 20">
|
||||
<path d="M12.95 10.707l.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue