mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Update blog image previews
This commit is contained in:
@@ -9,6 +9,7 @@ type BlogPost = {
|
|||||||
tags: string[];
|
tags: string[];
|
||||||
description: string;
|
description: string;
|
||||||
image?: string;
|
image?: string;
|
||||||
|
imagePosition?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -46,6 +47,7 @@ export const BlogPostList = ({ posts }: BlogPostListProps) => {
|
|||||||
src={post.data.image || "/blog/placeholder.png"}
|
src={post.data.image || "/blog/placeholder.png"}
|
||||||
alt={post.data.title}
|
alt={post.data.title}
|
||||||
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
|
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
|
||||||
|
style={{ objectPosition: post.data.imagePosition || "center center" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ author: Timothy Pidashev
|
|||||||
tags: [greeting]
|
tags: [greeting]
|
||||||
date: January 9, 2025
|
date: January 9, 2025
|
||||||
image: "/blog/my-first-post/thumbnail.png"
|
image: "/blog/my-first-post/thumbnail.png"
|
||||||
|
imagePosition: "center 30%"
|
||||||
---
|
---
|
||||||
|
|
||||||
import Cookie from "@/content/blog/components/my-first-post/cookie";
|
import Cookie from "@/content/blog/components/my-first-post/cookie";
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export const collections = {
|
|||||||
tags: z.array(z.string()),
|
tags: z.array(z.string()),
|
||||||
date: z.string(),
|
date: z.string(),
|
||||||
image: z.string().optional(),
|
image: z.string().optional(),
|
||||||
|
imagePosition: z.string().optional(),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
projects: defineCollection({
|
projects: defineCollection({
|
||||||
|
|||||||
Reference in New Issue
Block a user