trucs inutilesé
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
import { BlogInterface } from "@/components/blog";
|
||||
import { Blog } from "@/types/types";
|
||||
|
||||
export interface BlogItemParams {
|
||||
slug: string;
|
||||
title_style: string;
|
||||
subtitle_style: string;
|
||||
p_style: string;
|
||||
default_img: string;
|
||||
blog_content: BlogInterface;
|
||||
blog: Blog;
|
||||
}
|
||||
|
||||
export default function BlogItem({ params }: { params: BlogItemParams }) {
|
||||
const blog: Blog = params.blog
|
||||
return (
|
||||
<main className="flex flex-col w-full lg:md:py-24 sm:py-24">
|
||||
<section className="container self-center max-w-2xl">
|
||||
<div className="blog-title w-full h-28 justify-center">
|
||||
<h1 className="mb-3 text-pretty text-3xl font-semibold lg:text-5xl">
|
||||
{params.slug}
|
||||
{blog.slug}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="content">
|
||||
{/* blog.content here will be transformed from markdown to actual code */}
|
||||
<div>
|
||||
<h2 className={params.subtitle_style}>Subtitle 1</h2>
|
||||
<p className={params.p_style}>
|
||||
@@ -32,7 +33,7 @@ export default function BlogItem({ params }: { params: BlogItemParams }) {
|
||||
<div>
|
||||
<img
|
||||
src={params.default_img}
|
||||
alt={params.slug}
|
||||
alt={blog.slug}
|
||||
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
@@ -49,7 +50,7 @@ export default function BlogItem({ params }: { params: BlogItemParams }) {
|
||||
<div>
|
||||
<img
|
||||
src={params.default_img}
|
||||
alt={params.slug}
|
||||
alt={blog.slug}
|
||||
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user