feat(Projects): Update project entry design
Also update project card in index and project list. Also added portrait image.
This commit is contained in:
parent
944b553e73
commit
a85f9adc9b
18 changed files with 227 additions and 173 deletions
|
|
@ -3,29 +3,6 @@ import { z, defineCollection } from 'astro:content';
|
|||
|
||||
// AstroJS collection configuration
|
||||
|
||||
const games = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
has_content: z.boolean().optional(),
|
||||
date_added: z.coerce.date(),
|
||||
release: z.coerce.date(),
|
||||
developers: z.array(z.string()),
|
||||
genres: z.array(z.string()),
|
||||
status: z.enum([
|
||||
'Backlog',
|
||||
'On Line',
|
||||
'Playing',
|
||||
'Played',
|
||||
'Wishlist',
|
||||
'Want to Replay',
|
||||
'Always Playable',
|
||||
'Tried',
|
||||
]),
|
||||
times_played: z.number(),
|
||||
}),
|
||||
});
|
||||
|
||||
const blog = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
|
|
@ -39,30 +16,30 @@ const blog = defineCollection({
|
|||
|
||||
const portafolio = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
draft: z.boolean().optional(),
|
||||
status: z.enum(['Backlog', 'Activo', 'Fixes', 'Finalizado']),
|
||||
tags: z.array(z.string()).optional(),
|
||||
technologies: z.array(z.string()),
|
||||
published_at: z.coerce.date().optional(),
|
||||
updated_at: z.coerce.date().optional(),
|
||||
media: z
|
||||
.array(
|
||||
z.object({
|
||||
type: z.nativeEnum(MediaType),
|
||||
url: z.string(),
|
||||
alt: z.string(),
|
||||
mime: z.string().optional(),
|
||||
thumbnail: z.string().optional(),
|
||||
}),
|
||||
)
|
||||
.catch([]),
|
||||
}),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
draft: z.boolean().optional(),
|
||||
brief: z.string(),
|
||||
status: z.enum(['Backlog', 'Activo', 'Fixes', 'Finalizado']),
|
||||
tags: z.array(z.string()).optional(),
|
||||
technologies: z.array(z.string()),
|
||||
created_at: z.coerce.date().optional(),
|
||||
updated_at: z.coerce.date().optional(),
|
||||
thumbnail: image().refine((img) => img.width >= 1080, {
|
||||
message: 'Cover image must be at least 1080 pixels wide!',
|
||||
}),
|
||||
timeframe: z.string().optional(),
|
||||
links: z
|
||||
.object({
|
||||
repo: z.string().url(),
|
||||
url: z.string().url(),
|
||||
})
|
||||
.optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
games,
|
||||
blog,
|
||||
portafolio,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue