logo
This commit is contained in:
@@ -10,8 +10,11 @@ import { MarkdownRenderingResult } from "../../types/types";
|
||||
import { MainLayout } from "../../layouts/MainLayout";
|
||||
import Link from "next/link";
|
||||
import { IoMdArrowRoundBack as BackIcon } from "react-icons/io";
|
||||
import { BasicBlogProps } from ".";
|
||||
|
||||
export const BlogArticle = ({ frontMatter, html }: MarkdownRenderingResult) => {
|
||||
const { title, author, date, description, authorLink } =
|
||||
frontMatter as BasicBlogProps;
|
||||
return (
|
||||
<MainLayout>
|
||||
<Link href="/blog">
|
||||
@@ -21,12 +24,19 @@ export const BlogArticle = ({ frontMatter, html }: MarkdownRenderingResult) => {
|
||||
</button>
|
||||
</Link>
|
||||
<div className="lg:mt-10 mt-4 mb-2 text-sm font-medium text-gray-500">
|
||||
{frontMatter.date}
|
||||
{date}
|
||||
</div>
|
||||
<div className="lg:text-5xl font-bold">{frontMatter.title}</div>
|
||||
<div className="lg:text-5xl font-bold">{title}</div>
|
||||
<div className="mt-2 font-medium">
|
||||
By: <span className="text-action">@{frontMatter.author}</span>
|
||||
By{" "}
|
||||
{authorLink && (
|
||||
<Link href={authorLink} className="text-action">
|
||||
@{author}
|
||||
</Link>
|
||||
)}
|
||||
{!authorLink && <span className="text-action">@{author}</span>}
|
||||
</div>
|
||||
<div className="mt-2">{description}</div>
|
||||
<div
|
||||
className="mt-4 prose prose-headings:text-primary-text prose-p:text-gray-400"
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
|
||||
Reference in New Issue
Block a user