import { Markdown } from ':components/Markdown.tsx' import { NewsFrontMatter } from ':src/blog/types.ts' export type BlogProps = { title: string description: string body: string author: string publisher: string lastUpdate: Date name: string url: string hash: string options: NewsFrontMatter['x-cohabit'] tags: NewsFrontMatter['tags'] } export function BlogCard( { title, description, author, lastUpdate, name, options, tags, publisher }: BlogProps, ) { return (

{title}

{`@${publisher}`}
{description}
) } export function BlogPost( { title, description, author, lastUpdate, body, url, options, tags, publisher, }: BlogProps, ) { return (

{title}

{`@${publisher}`}
{`Visibilité : ${options.visibility}`} {`Date de délivrance : ${new Date(options.dueDate).toLocaleString()}`}
{description}
{body}
) } function NewsTags({ tags }: Pick) { return (
{tags ? tags.map((tag) => {tag}) : Aucun tag}
) } function NewsFooter( { author, lastUpdate }: Pick, ) { return ( ) } function NewsLinks({ links }: Pick) { return ( ) } function NewsStatus( { status, long = false }: Pick & { long?: boolean }, ) { const title = status === 'canceled' ? 'Annulé' : status === 'current' ? 'En cours' : status === 'finished' ? 'Terminé' : 'Prévu' return ( {status === 'canceled' ? : status === 'current' ? : status === 'finished' ? : } {long ? ` ${title}` : ''} ) }