initial commit

This commit is contained in:
PrinOrange
2023-12-25 17:21:39 +08:00
commit 0bd1089d74
94 changed files with 18648 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { Config } from "@/data/config";
import Giscus from "@giscus/react";
import { useTheme } from "next-themes";
export const PostComments = (props: { postId: string }) => {
const { theme } = useTheme();
return (
Config.Giscus && (
<div className="my-5">
<Giscus
id={props.postId}
repo={Config.Giscus.repo as `${string}/${string}`}
repoId={Config.Giscus.repoId}
category={Config.Giscus.category}
categoryId={Config.Giscus.categoryId}
mapping="pathname"
term={props.postId}
reactionsEnabled="1"
emitMetadata="0"
theme={theme === "light" ? "light_tritanopia" : "dark_tritanopia"}
inputPosition="top"
loading="eager"
lang="en"
/>
</div>
)
);
};