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 ( + + + + + + + +