From 643987d2bcafa4bdd5669dc98b2b9f2b08b1758d Mon Sep 17 00:00:00 2001 From: iCrawl Date: Fri, 29 Sep 2023 23:51:19 +0200 Subject: [PATCH] refactor: use app dir properly --- apps/report/package.json | 10 +- apps/report/src/app/layout.tsx | 87 +++ apps/report/src/app/page.tsx | 37 + apps/report/src/app/stylesheets.tsx | 33 + apps/report/src/pages/_app.tsx | 8 - apps/report/src/pages/_document.tsx | 61 -- apps/report/src/pages/index.tsx | 45 -- .../rehype-github-blockquote-admonitions.ts | 0 .../{pages => }/util/rehype-highlight-ansi.ts | 0 .../remark-github-blockquote-admonitions.ts | 0 apps/report/tsconfig.json | 2 +- apps/report/types.d.ts | 1 - apps/report/unocss.config.ts | 13 - apps/report/vercel.json | 3 - apps/website/package.json | 4 - apps/website/src/app/auth/layout.tsx | 14 - apps/website/src/app/auth/login/page.tsx | 33 - .../src/app/auth/redirect/discord/page.tsx | 67 -- apps/website/src/app/head.tsx | 26 - apps/website/src/app/layout.tsx | 62 +- apps/website/src/components/LoginButton.tsx | 19 - apps/website/src/styles/cmdk.css | 3 - apps/website/src/util/getUserFromCookie.ts | 19 - apps/website/src/util/pocketbase.ts | 16 - apps/website/tsconfig.json | 2 +- apps/website/types.d.ts | 1 - apps/website/unocss.config.ts | 8 +- apps/website/vercel.json | 3 - docker-compose.yml | 2 +- yarn.lock | 690 +----------------- 30 files changed, 226 insertions(+), 1043 deletions(-) create mode 100644 apps/report/src/app/layout.tsx create mode 100644 apps/report/src/app/page.tsx create mode 100644 apps/report/src/app/stylesheets.tsx delete mode 100644 apps/report/src/pages/_app.tsx delete mode 100644 apps/report/src/pages/_document.tsx delete mode 100644 apps/report/src/pages/index.tsx rename apps/report/src/{pages => }/util/rehype-github-blockquote-admonitions.ts (100%) rename apps/report/src/{pages => }/util/rehype-highlight-ansi.ts (100%) rename apps/report/src/{pages => }/util/remark-github-blockquote-admonitions.ts (100%) delete mode 100644 apps/report/types.d.ts delete mode 100644 apps/report/unocss.config.ts delete mode 100644 apps/report/vercel.json delete mode 100644 apps/website/src/app/auth/layout.tsx delete mode 100644 apps/website/src/app/auth/login/page.tsx delete mode 100644 apps/website/src/app/auth/redirect/discord/page.tsx delete mode 100644 apps/website/src/app/head.tsx delete mode 100644 apps/website/src/components/LoginButton.tsx delete mode 100644 apps/website/src/styles/cmdk.css delete mode 100644 apps/website/src/util/getUserFromCookie.ts delete mode 100644 apps/website/src/util/pocketbase.ts delete mode 100644 apps/website/types.d.ts delete mode 100644 apps/website/vercel.json diff --git a/apps/report/package.json b/apps/report/package.json index 9e9f397c9..a6c02de5a 100644 --- a/apps/report/package.json +++ b/apps/report/package.json @@ -4,14 +4,11 @@ "description": "", "scripts": { "test": "vitest run", - "build": "yarn build:css && yarn build:next", + "build": "yarn build:next", "build:check": "tsc --noEmit", "build:next": "next build", - "build:css": "yarn generate:css", - "dev": "concurrently 'yarn dev:css' 'yarn dev:next'", + "dev": "concurrently 'yarn dev:next'", "dev:next": "next dev", - "dev:css": "yarn generate:css --watch", - "generate:css": "unocss 'src/**/*.tsx' --out-file ./src/styles/unocss.css", "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext mjs,js,ts,tsx --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src --ext mjs,js,ts,tsx --fix --format=pretty", "fmt": "yarn format" @@ -51,8 +48,6 @@ "@testing-library/react": "^14.0.0", "@types/node": "^18.18.1", "@types/react-dom": "^18.2.8", - "@unocss/cli": "^0.56.4", - "@unocss/reset": "^0.56.4", "@vercel/node": "^3.0.6", "@vitejs/plugin-react": "^4.1.0", "@vitest/coverage-v8": "^0.34.6", @@ -65,7 +60,6 @@ "mdast": "^3.0.0", "prettier": "^3.0.3", "typescript": "^5.2.2", - "unocss": "^0.56.4", "vitest": "^0.34.6" }, "engines": { diff --git a/apps/report/src/app/layout.tsx b/apps/report/src/app/layout.tsx new file mode 100644 index 000000000..56ee6c40d --- /dev/null +++ b/apps/report/src/app/layout.tsx @@ -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 ( + + + +