From 8b175054e93ec88b0d612021c976ff5f724f85db Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 12 Nov 2022 21:14:42 +0100 Subject: [PATCH] Testing add directory --- .gitignore | 1 + next.config.js | 12 +- src/app/[locale]/contents/page.tsx | 2 + src/app/[locale]/page.tsx | 8 + src/app/head.tsx | 19 + src/app/layout.tsx | 64 ++ src/components/Panels/SettingsPopup.tsx | 30 - src/contexts/LightBoxProvider.tsx | 17 +- src/contexts/appLayout.ts | 2 +- src/contexts/atoms.ts | 15 +- src/contexts/localData.ts | 5 +- src/contexts/settings.ts | 50 +- src/pages/404.tsx | 54 -- src/pages/500.tsx | 54 -- src/pages/_app.tsx | 46 - src/pages/_document.tsx | 42 - src/pages/about-us/accords-handbook.tsx | 30 - src/pages/about-us/contact.tsx | 185 ---- src/pages/about-us/index.tsx | 59 -- src/pages/about-us/legality.tsx | 30 - src/pages/about-us/sharing-policy.tsx | 30 - src/pages/api/mail.ts | 52 -- src/pages/api/revalidate.ts | 253 ----- src/pages/archives/index.tsx | 54 -- src/pages/archives/videos/c/[uid].tsx | 180 ---- src/pages/archives/videos/index.tsx | 150 --- src/pages/archives/videos/v/[uid].tsx | 195 ---- src/pages/chronicles/[slug]/index.tsx | 285 ------ src/pages/chronicles/index.tsx | 84 -- src/pages/contents/[slug].tsx | 525 ----------- src/pages/contents/all.tsx | 315 ------- src/pages/contents/folder/[slug].tsx | 286 ------ src/pages/contents/index.tsx | 22 - src/pages/dev/checkup/contents.tsx | 264 ------ src/pages/dev/checkup/libraryitems.tsx | 654 ------------- src/pages/dev/editor.tsx | 422 --------- src/pages/dev/showcase/design-system.tsx | 961 ------------------- src/pages/dev/transcript.tsx | 558 ----------- src/pages/index.tsx | 62 -- src/pages/library/[slug]/index.tsx | 806 ---------------- src/pages/library/[slug]/reader.tsx | 1075 ---------------------- src/pages/library/index.tsx | 507 ---------- src/pages/merch/index.tsx | 49 - src/pages/news/[slug].tsx | 103 --- src/pages/news/index.tsx | 206 ----- src/pages/wiki/[slug]/index.tsx | 318 ------- src/pages/wiki/chronology.tsx | 393 -------- src/pages/wiki/index.tsx | 289 ------ src/styles/others.css | 4 - src/types/next.d.ts | 20 + tsconfig.json | 23 +- 51 files changed, 169 insertions(+), 9701 deletions(-) create mode 100644 src/app/[locale]/contents/page.tsx create mode 100644 src/app/[locale]/page.tsx create mode 100644 src/app/head.tsx create mode 100644 src/app/layout.tsx delete mode 100644 src/pages/404.tsx delete mode 100644 src/pages/500.tsx delete mode 100644 src/pages/_app.tsx delete mode 100644 src/pages/_document.tsx delete mode 100644 src/pages/about-us/accords-handbook.tsx delete mode 100644 src/pages/about-us/contact.tsx delete mode 100644 src/pages/about-us/index.tsx delete mode 100644 src/pages/about-us/legality.tsx delete mode 100644 src/pages/about-us/sharing-policy.tsx delete mode 100644 src/pages/api/mail.ts delete mode 100644 src/pages/api/revalidate.ts delete mode 100644 src/pages/archives/index.tsx delete mode 100644 src/pages/archives/videos/c/[uid].tsx delete mode 100644 src/pages/archives/videos/index.tsx delete mode 100644 src/pages/archives/videos/v/[uid].tsx delete mode 100644 src/pages/chronicles/[slug]/index.tsx delete mode 100644 src/pages/chronicles/index.tsx delete mode 100644 src/pages/contents/[slug].tsx delete mode 100644 src/pages/contents/all.tsx delete mode 100644 src/pages/contents/folder/[slug].tsx delete mode 100644 src/pages/contents/index.tsx delete mode 100644 src/pages/dev/checkup/contents.tsx delete mode 100644 src/pages/dev/checkup/libraryitems.tsx delete mode 100644 src/pages/dev/editor.tsx delete mode 100644 src/pages/dev/showcase/design-system.tsx delete mode 100644 src/pages/dev/transcript.tsx delete mode 100644 src/pages/index.tsx delete mode 100644 src/pages/library/[slug]/index.tsx delete mode 100644 src/pages/library/[slug]/reader.tsx delete mode 100644 src/pages/library/index.tsx delete mode 100644 src/pages/merch/index.tsx delete mode 100644 src/pages/news/[slug].tsx delete mode 100644 src/pages/news/index.tsx delete mode 100644 src/pages/wiki/[slug]/index.tsx delete mode 100644 src/pages/wiki/chronology.tsx delete mode 100644 src/pages/wiki/index.tsx create mode 100644 src/types/next.d.ts diff --git a/.gitignore b/.gitignore index c1491a3..b78acfb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ src/graphql/generated.ts # next.js /.next/ /out/ +src/pages.old # production /build diff --git a/next.config.js b/next.config.js index 50cd568..809ac5a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,17 +1,9 @@ -/* CONFIG */ - -const locales = ["en", "es", "fr", "pt-br", "ja"]; - -/* END CONFIG */ - /* @type {import('next').NextConfig} */ module.exports = { - swcMinify: true, reactStrictMode: true, poweredByHeader: false, - i18n: { - locales: locales, - defaultLocale: "en", + experimental: { + appDir: true, }, images: { domains: ["img.accords-library.com", "watch.accords-library.com"], diff --git a/src/app/[locale]/contents/page.tsx b/src/app/[locale]/contents/page.tsx new file mode 100644 index 0000000..9affc90 --- /dev/null +++ b/src/app/[locale]/contents/page.tsx @@ -0,0 +1,2 @@ +const Page: Page = () => <>Hello from contents; +export default Page; diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx new file mode 100644 index 0000000..410f6b9 --- /dev/null +++ b/src/app/[locale]/page.tsx @@ -0,0 +1,8 @@ +export const generateStaticParams: GenerateStaticParams = () => + ["en", "es", "fr", "pt-br", "ja", ""].map((locale) => ({ locale })); + +// Disabled using locales other than the one defined +export const dynamicParams = false; + +const Page: Page = () => <>Hello from within locale; +export default Page; diff --git a/src/app/head.tsx b/src/app/head.tsx new file mode 100644 index 0000000..c9b2864 --- /dev/null +++ b/src/app/head.tsx @@ -0,0 +1,19 @@ +const Head: Head = () => ( + <> + + + + + + + + + + + + + + + +); +export default Head; diff --git a/src/app/layout.tsx b/src/app/layout.tsx new file mode 100644 index 0000000..01253d3 --- /dev/null +++ b/src/app/layout.tsx @@ -0,0 +1,64 @@ +"use client"; + +import "@fontsource/material-icons"; +import "@fontsource/material-icons-outlined"; +import "@fontsource/opendyslexic/400.css"; +import "@fontsource/share-tech-mono/400.css"; +import "@fontsource/opendyslexic/700.css"; +import "@fontsource/vollkorn/700.css"; +import "@fontsource/zen-maru-gothic/500.css"; +import "@fontsource/zen-maru-gothic/900.css"; + +import "styles/debug.css"; +import "styles/formatted.css"; +import "styles/others.css"; +import "styles/rc-slider.css"; +import "styles/tippy.css"; + +import Script from "next/script"; +import { useLocalData } from "contexts/localData"; +// import { useAppLayout } from "contexts/appLayout"; +import { LightBoxProvider } from "contexts/LightBoxProvider"; +import { SettingsPopup } from "components/Panels/SettingsPopup"; +import { useSettings } from "contexts/settings"; +import { useContainerQueries } from "contexts/containerQueries"; +import { Ids } from "types/ids"; +import { atoms } from "contexts/atoms"; +import { useAtomGetter } from "helpers/atoms"; +import { cIf, cJoin } from "helpers/className"; + +const Layout: Layout = ({ children }) => { + useLocalData(); + // useAppLayout(); + useSettings(); + useContainerQueries(); + + const isDyslexic = useAtomGetter(atoms.settings.dyslexic); + const isDarkMode = useAtomGetter(atoms.settings.darkMode); + + return ( + + + + + + + +