diff --git a/src/app/(public)/blogs/(posts)/about-the-author.mdx b/src/app/(public)/blogs/(posts)/about-the-author.mdx new file mode 100644 index 0000000..96f041e --- /dev/null +++ b/src/app/(public)/blogs/(posts)/about-the-author.mdx @@ -0,0 +1 @@ +[@joulev](https://github.com/joulev) is a lead Next.js developer at his company. He has also been one of the most active helpers in the [Next.js official Discord server](https://nextjs-forum.com), and is (as of 4 June 2024) among top 100 of [all-time Next.js contributors](https://github.com/vercel/next.js/graphs/contributors). diff --git a/src/app/(public)/blogs/(posts)/client-components.tsx b/src/app/(public)/blogs/(posts)/client-components.tsx index e26c3e7..cfd4766 100644 --- a/src/app/(public)/blogs/(posts)/client-components.tsx +++ b/src/app/(public)/blogs/(posts)/client-components.tsx @@ -4,12 +4,11 @@ import { usePathname } from "next/navigation"; import { useEffect } from "react"; import { Balancer } from "react-wrap-balancer"; -import { CopyButton } from "~/components/copy-button"; -import { Check, Share } from "~/components/icons"; import { Link } from "~/components/ui/link"; import { incrementViews } from "~/lib/blogs/increment-view"; import { formatTime } from "~/lib/blogs/utils"; +import { useHoverBackground } from "~/components/ui/hooks/use-hover-background"; import { meta } from "../meta"; function useMetadata() { @@ -33,11 +32,34 @@ export function PostedDate() { const { postedDate } = useMetadata(); const publishedTime = new Date(postedDate); return ( -
- Posted{" "} - +
+ +
+ ); +} + +export function Author() { + return ( +
+ + Vu Van Dung +
+
+ Vu Van Dung +
+
@joulev
+
+
); } @@ -55,26 +77,6 @@ export function ViewSourceHistory() { ); } -export function ShareButton() { - const { slug } = useMetadata(); - return ( - - Share - - } - copiedChildren={ - <> - Link copied! - - } - /> - ); -} - export function IncrementViews() { const { slug } = useMetadata(); useEffect(() => { diff --git a/src/app/(public)/blogs/(posts)/layout.tsx b/src/app/(public)/blogs/(posts)/layout.tsx index a8e944d..4d35f7e 100644 --- a/src/app/(public)/blogs/(posts)/layout.tsx +++ b/src/app/(public)/blogs/(posts)/layout.tsx @@ -3,11 +3,12 @@ import { LinkButton } from "~/components/ui/button"; import { Card } from "~/components/ui/card"; import type { LayoutProps } from "./$types"; +import AboutTheAuthor from "./about-the-author.mdx"; import { + Author, IncrementViews, PostTitle, PostedDate, - ShareButton, ViewSourceHistory, } from "./client-components"; @@ -15,7 +16,7 @@ export default function Layout({ children }: LayoutProps) { return (
-
+
-
+
+ -
-
- -
- -
+
-
+
{children}
@@ -45,14 +42,23 @@ export default function Layout({ children }: LayoutProps) {
-
+
-
-
- Unless explicitly noted,{" "} - all opinions are personal. +
+
+

About the author

+
+ +
+
+
+
+
+ Unless explicitly noted,{" "} + all opinions are personal. +
+
-