-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
226 additions
and
1,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import type { Metadata } from "next"; | ||
import type { PropsWithChildren } from "react"; | ||
import { StyleSheets } from "./stylesheets"; | ||
|
||
import "~/styles/main.css"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Yuudachi Report", | ||
viewport: { | ||
minimumScale: 1, | ||
initialScale: 1, | ||
width: "device-width", | ||
}, | ||
icons: { | ||
other: [ | ||
{ | ||
url: "/favicon-32x32.png", | ||
sizes: "32x32", | ||
type: "image/png", | ||
}, | ||
{ | ||
url: "/favicon-16x16.png", | ||
sizes: "16x16", | ||
type: "image/png", | ||
}, | ||
], | ||
apple: [ | ||
"/apple-touch-icon.png", | ||
{ | ||
url: "/safari-pinned-tab.svg", | ||
rel: "mask-icon", | ||
}, | ||
], | ||
}, | ||
|
||
manifest: "/site.webmanifest", | ||
|
||
themeColor: [ | ||
{ media: "(prefers-color-scheme: light)", color: "#ffffff" }, | ||
{ media: "(prefers-color-scheme: dark)", color: "#0d1117" }, | ||
], | ||
colorScheme: "light dark", | ||
|
||
appleWebApp: { | ||
title: "Yuudachi Report", | ||
}, | ||
|
||
applicationName: "Yuudachi Report", | ||
|
||
openGraph: { | ||
siteName: "Yuudachi Report", | ||
type: "website", | ||
title: "Yuudachi Report", | ||
}, | ||
|
||
twitter: { | ||
card: "summary_large_image", | ||
creator: "@iCrawlToGo", | ||
}, | ||
|
||
other: { | ||
"msapplication-TileColor": "#0d1117", | ||
}, | ||
}; | ||
|
||
export default function RootLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<html data-color-mode="dark" data-dark-theme="dark" lang="en"> | ||
<body> | ||
<StyleSheets /> | ||
<script | ||
// eslint-disable-next-line react/no-danger | ||
dangerouslySetInnerHTML={{ | ||
__html: `(() => { | ||
const prefersDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; | ||
const persistedColorPreference = localStorage.getItem('theme') || 'auto'; | ||
if (persistedColorPreference === 'dark' || (prefersDarkMode && persistedColorPreference !== 'light')) { | ||
document.documentElement.classList.toggle('dark', true); | ||
} | ||
})();`, | ||
}} | ||
/> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { SerializeOptions } from "next-mdx-remote/dist/types"; | ||
import { MDXRemote } from "next-mdx-remote/rsc"; | ||
import rehypeHighlight from "rehype-highlight"; | ||
import rehypeIgnore from "rehype-ignore"; | ||
import rehypeRaw from "rehype-raw"; | ||
import rehypeSlug from "rehype-slug"; | ||
import remarkGfm from "remark-gfm"; | ||
import rehypeGithubBlockquoteAdmonitions from "~/util/rehype-github-blockquote-admonitions"; | ||
import rehypeHighlightANSI from "~/util/rehype-highlight-ansi"; | ||
import remarkGithubBlockquoteAdmonitions from "~/util/remark-github-blockquote-admonitions"; | ||
|
||
const mdxOptions = { | ||
mdxOptions: { | ||
remarkPlugins: [remarkGfm, remarkGithubBlockquoteAdmonitions], | ||
remarkRehypeOptions: { allowDangerousHtml: true }, | ||
rehypePlugins: [ | ||
rehypeRaw as any, | ||
rehypeIgnore as any, | ||
rehypeSlug, | ||
rehypeGithubBlockquoteAdmonitions, | ||
rehypeHighlightANSI, | ||
[rehypeHighlight as any, { ignoreMissing: true, detect: true }], | ||
], | ||
format: "md", | ||
}, | ||
} satisfies SerializeOptions; | ||
|
||
export default async function Page({ searchParams }: { readonly searchParams: { url: string } }) { | ||
const res = await fetch(searchParams.url); | ||
const text = await res.text(); | ||
|
||
return ( | ||
<div className="markdown-body"> | ||
<MDXRemote options={mdxOptions} source={text} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"use client"; | ||
|
||
import ReactDOM from "react-dom"; | ||
|
||
export function StyleSheets() { | ||
ReactDOM.preload("https://cdnjs.cloudflare.com/ajax/libs/Primer/20.4.1/base.min.css", { | ||
as: "style", | ||
crossOrigin: "anonymous", | ||
integrity: "sha512-Y3BvSXIyScMEFBi2QYvDc12tw0MpND6sYYKqdObiNlE432O1fv0/jeCbuuVeSNjd2ZuAM3EJbeVBFe/b0rKoYg==", | ||
}); | ||
ReactDOM.preload("https://cdnjs.cloudflare.com/ajax/libs/Primer/20.4.1/color-modes.min.css", { | ||
as: "style", | ||
crossOrigin: "anonymous", | ||
integrity: "sha512-XTbUut8Rc/r06Iif/K7xDOub5F4TO2vTCV4InexCz5RvpGMaSfUf2tMRxYX6ha0zzFy+UfKdb94ehR+dOKYPhg==", | ||
}); | ||
ReactDOM.preload("https://cdnjs.cloudflare.com/ajax/libs/Primer/20.4.1/utilities.min.css", { | ||
as: "style", | ||
crossOrigin: "anonymous", | ||
integrity: "sha512-OS48DOZqdQdDDxUfXtTx/xv8SjfIwc/k8gf75MaFh6uNb7xA50neIEvAi68wzvGJrW646ZVZH0AQXHSsvwMvpw==", | ||
}); | ||
ReactDOM.preload("https://cdnjs.cloudflare.com/ajax/libs/Primer/20.4.1/markdown.min.css", { | ||
as: "style", | ||
crossOrigin: "anonymous", | ||
integrity: "sha512-z9fESt0h0bJJwWXYjGCV8v/SLbIkxgEIRBvt9d4xw+xSNUT+D1RpA/BUu8FBu6RqRWetBNaKeCC9Tr16/hPBhw==", | ||
}); | ||
ReactDOM.preload("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark.min.css", { | ||
as: "style", | ||
crossOrigin: "anonymous", | ||
integrity: "sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==", | ||
}); | ||
|
||
return null; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
643987d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
yuudachi – ./apps/website
yuudachi-git-main-discordjs.vercel.app
yuudachi.vercel.app
yuudachi-discordjs.vercel.app
www.yuudachi.dev
yuudachi.dev
643987d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
yuudachi-report – ./apps/report
yuudachi-report-discordjs.vercel.app
yuudachi-report-git-main-discordjs.vercel.app
yuudachi-report.vercel.app