[format] format the code

This commit is contained in:
PrinOrange
2024-08-12 11:55:21 +08:00
parent 0fa04a99fc
commit ec50c6e770
4 changed files with 11 additions and 4 deletions

View File

@@ -33,7 +33,10 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
{copied ? <FaCheck /> : <IoCopyOutline />} {copied ? <FaCheck /> : <IoCopyOutline />}
</Button> </Button>
)} )}
<pre className="p-2 dark:bg-[#0d1117] bg-[#F6F8FA] rounded-md flat-scrollbar-normal not-prose text-sm dark:selection:bg-gray-700 selection:bg-gray-300 selection:text-inherit" dir="ltr"> <pre
className="p-2 dark:bg-[#0d1117] bg-[#F6F8FA] rounded-md flat-scrollbar-normal not-prose text-sm dark:selection:bg-gray-700 selection:bg-gray-300 selection:text-inherit"
dir="ltr"
>
{children} {children}
</pre> </pre>
</div> </div>

View File

@@ -2,7 +2,11 @@ import { Head, Html, Main, NextScript } from "next/document";
export default function Document() { export default function Document() {
return ( return (
<Html lang="en"> // If you are using a language based on RTL typesetting direction such as Arabic,
// please change the dir prop value in the following code to rtl
// Like <Html dir="rtl" lang="en">
// Otherwise, please do not change
<Html dir="ltr" lang="en">
<Head /> <Head />
<body> <body>
<Main /> <Main />

View File

@@ -18,7 +18,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse<Respon
const result: TSearchResultItem[] = SearchIndex.search(searchText).map((item) => ({ const result: TSearchResultItem[] = SearchIndex.search(searchText).map((item) => ({
id: item.id, id: item.id,
title: item.title, title: item.title,
summary:item.summary, summary: item.summary,
tags: item.tags, tags: item.tags,
})); }));
res.status(200).json(result); res.status(200).json(result);

View File

@@ -2,6 +2,7 @@
overflow: auto hidden; overflow: auto hidden;
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
direction: ltr;
} }
.katex-display::-webkit-scrollbar-track { .katex-display::-webkit-scrollbar-track {
@@ -20,5 +21,4 @@
.katex-display::-webkit-scrollbar { .katex-display::-webkit-scrollbar {
height: 0.4rem; height: 0.4rem;
width: 0.5rem; width: 0.5rem;
direction: ltr;
} }