Skip to content

Commit

Permalink
add styles to article page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignaherrero committed Apr 9, 2022
1 parent ee446fe commit d254e37
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions pages/posts/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,45 @@ export default function Posts({ post }) {
<meta property="og:description" content={post.metas.description} />
<meta property="og:image" content={post.metas.image} />
</Head>
<h1>{post.title}</h1>
<p>{post.bibliography}</p>
<p>{post.categories.name}</p>
<p>{moment(post.published).format("llll")}</p>
{parse(post.content)}

<div className="container my-10 mx-auto">
<section className="mb-32 text-gray-800">
<img
src={post.featured_media.large}
className="w-3/5 m-auto shadow-lg rounded-lg mb-6 object-cover"
alt=""
/>

<div className="flex items-center mb-6">
<div>
<span>
{moment(post.published).format("llll")}
{post.author && (
<>
<span>
<a href="#!" className="font-medium">
{post.author}
</a>
by{" "}
</span>
</>
)}
</span>
</div>
</div>

<h1 className="font-bold text-3xl mb-6">{post.title}</h1>

{parse(post.content)}

{post.bibliography && (
<>
<h1 className="font-bold text-3xl mb-2 mt-4">Bibliografia</h1>
{parse(post.bibliography)}
</>
)}
</section>
</div>
</>
);
}
Expand Down

1 comment on commit d254e37

@vercel
Copy link

@vercel vercel bot commented on d254e37 Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

challenge-atomik – ./

challenge-atomik-nacho93.vercel.app
challenge-atomik.vercel.app
challenge-atomik-git-main-nacho93.vercel.app

Please sign in to comment.