Remove custom component styles and use shadcn components instead, then format the code.

This commit is contained in:
PrinOrange
2023-12-29 20:28:13 +08:00
parent 986c8f891c
commit 9b9055e4b1
12 changed files with 60 additions and 51 deletions

View File

@@ -17,7 +17,9 @@ export default function AboutPage() {
/>
<NavBar />
<ContentContainer>
<h2 className={`my-5 flex justify-around text-2xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}>{"ABOUT ME"}</h2>
<h2 className={`my-5 flex justify-around text-2xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}>
{"ABOUT ME"}
</h2>
<hr />
<div className={`${fontSourceSerifScreenCN.className} my-5 justify-center md:flex md:space-x-10`}>
<div className="my-auto flex md:w-1/3">

View File

@@ -65,7 +65,9 @@ const ReaderPage = (props: ReaderPageProps) => {
{props.frontMatter?.title}
</h2>
{props.frontMatter?.subtitle && (
<div className={`${fontFangZhengXiaoBiaoSongCN.className} my-1 flex justify-center text-xl font-bold capitalize`}>
<div
className={`${fontFangZhengXiaoBiaoSongCN.className} my-1 flex justify-center text-xl font-bold capitalize`}
>
{props.frontMatter.subtitle}
</div>
)}

View File

@@ -14,7 +14,9 @@ export default function FriendsPage() {
<SEO title={`${Config.SiteTitle} - Friends`} description={"My Friend Links"} />
<NavBar />
<ContentContainer>
<h2 className={`my-5 flex justify-center text-2xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}>{"FRIENDS"}</h2>
<h2 className={`my-5 flex justify-center text-2xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}>
{"FRIENDS"}
</h2>
<hr />
<div className={`my-5 py-3 flex flex-wrap justify-center text-2xl ${fontSourceSerifScreenCN.className}`}>
{FriendsList.map((item) => (

View File

@@ -1,5 +1,6 @@
import { HomeCover } from "@/components/homepage/HomeCover";
import { ContentContainer, Page } from "@/components/layouts/layouts";
import { Button } from "@/components/ui/button";
import { Footer } from "@/components/utils/Footer";
import { NavBar } from "@/components/utils/NavBar";
import { PostList } from "@/components/utils/PostList";
@@ -52,9 +53,11 @@ export default function Home(props: HomePageProps) {
<hr />
<PostList data={props.latestPostList} />
<div className="my-2 flex justify-end">
<Link href="/posts" className="link-button font-bold text-base">
{"MORE POSTS >"}
</Link>
<Button asChild>
<Link href="/posts" className="font-bold">
{"MORE POSTS >"}
</Link>
</Button>
</div>
</div>
)}

View File

@@ -1,4 +1,5 @@
import { ContentContainer, Page } from "@/components/layouts/layouts";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Footer } from "@/components/utils/Footer";
import { NavBar } from "@/components/utils/NavBar";
@@ -59,9 +60,11 @@ export default function PostsPage(props: PostsPageProps) {
<PostList data={props.postList} />
<div className="my-5 flex justify-between text-base font-bold">
{props.pageNumber !== 1 && (
<Link href={`/posts/${props.pageNumber - 1}`} className="link-button my-auto">
{"< PREV"}
</Link>
<Button asChild>
<Link href={`/posts/${props.pageNumber - 1}/`} className="font-bold">
{"< PREV"}
</Link>
</Button>
)}
<div className="my-auto font-bold flex justify-center">
<Input
@@ -73,9 +76,11 @@ export default function PostsPage(props: PostsPageProps) {
<div className="my-auto">{` / ${props.pageAmount}`}</div>
</div>
{props.pageNumber !== props.pageAmount && (
<Link href={`/posts/${props.pageNumber + 1}`} className="link-button my-auto">
{"NEXT >"}
</Link>
<Button asChild>
<Link href={`/posts/${props.pageNumber + 1}/`} className="font-bold">
{"NEXT >"}
</Link>
</Button>
)}
</div>
</ContentContainer>

View File

@@ -24,7 +24,9 @@ export default function AboutPage() {
<ContentContainer>
<div className="md:flex">
<div className="flex flex-col justify-center md:w-1/2">
<h2 className={`my-5 flex justify-center text-2xl font-bold text-red-500 ${fontFangZhengXiaoBiaoSongCN.className}`}>
<h2
className={`my-5 flex justify-center text-2xl font-bold text-red-500 ${fontFangZhengXiaoBiaoSongCN.className}`}
>
<GoHeartFill className="mx-2 my-auto" />
{"SPONSOR"}
</h2>

View File

@@ -1,4 +1,5 @@
import { ContentContainer, Page } from "@/components/layouts/layouts";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Footer } from "@/components/utils/Footer";
import { NavBar } from "@/components/utils/NavBar";
@@ -51,16 +52,20 @@ export default function TagsContentPage(props: TagsContentPageProps) {
/>
<NavBar />
<ContentContainer>
<h2 className={`my-5 flex flex-col justify-center text-center text-3xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}>
<h2
className={`my-5 flex flex-col justify-center text-center text-3xl font-bold ${fontFangZhengXiaoBiaoSongCN.className}`}
>
{`Posts of ${props.tagName}`}
</h2>
<hr />
<PostList data={props.postList} />
<div className="my-5 flex justify-between text-base font-bold">
{props.pageNumber !== 1 && (
<Link href={`/tags/${props.tagName}/${props.pageNumber - 1}/`} className="link-button my-auto">
{"< PREV"}
</Link>
<Button asChild>
<Link href={`/tags/${props.tagName}/${props.pageNumber - 1}/`} className="font-bold">
{"< PREV"}
</Link>
</Button>
)}
<div className="my-auto font-bold flex justify-center">
<Input
@@ -72,9 +77,11 @@ export default function TagsContentPage(props: TagsContentPageProps) {
<div className="my-auto">{` / ${props.pageAmount}`}</div>
</div>
{props.pageNumber !== props.pageAmount && (
<Link href={`/tags/${props.tagName}/${props.pageNumber + 1}/`} className="link-button my-auto">
{"NEXT >"}
</Link>
<Button asChild>
<Link href={`/tags/${props.tagName}/${props.pageNumber + 1}/`} className="font-bold">
{"NEXT >"}
</Link>
</Button>
)}
</div>
</ContentContainer>