diff --git a/pages/about.tsx b/app/about/page.tsx similarity index 97% rename from pages/about.tsx rename to app/about/page.tsx index 2a469fdf..d3968a7e 100644 --- a/pages/about.tsx +++ b/app/about/page.tsx @@ -1,7 +1,6 @@ -import type { NextPage } from 'next'; -import Page from '../source/04-templates/Page/Page'; +import Page from '../../source/04-templates/Page/Page'; -const About: NextPage = () => { +function About() { const title = 'About Forum One Next.js Starter App'; return ( @@ -117,6 +116,6 @@ const About: NextPage = () => {

); -}; +} export default About; diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 00000000..87542479 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,63 @@ +import { JSX, PropsWithChildren } from 'react'; +import '../source/00-config/index.css'; +import '../source/01-global/index.css'; +import SourceSansFontStyle from '../source/01-global/fonts/source-sans'; +import Skiplink from '../source/03-components/Skiplink/Skiplink'; +import SiteContainer from '../source/02-layouts/SiteContainer/SiteContainer'; +import Header from '../source/02-layouts/Header/Header'; +import SiteName from '../source/03-components/SiteName/SiteName'; +import ResponsiveMenu from '../source/03-components/Menu/ResponsiveMenu/ResponsiveMenu'; +import Footer from '../source/02-layouts/Footer/Footer'; +import Menu from '../source/03-components/Menu/Menu'; +import footerStyles from '../source/03-components/Menu/menu-footer.module.css'; +import BackToTop from '../source/03-components/BackToTop/BackToTop'; +import '../source/06-utility/index.css'; + +function RootLayout({ children }: PropsWithChildren): JSX.Element { + return ( + + + + + +
+ + +
+ {/* Breadcrumb */} + {children} +
+ +
+
+ + + + ); +} + +export default RootLayout; diff --git a/pages/index.tsx b/app/page.tsx similarity index 97% rename from pages/index.tsx rename to app/page.tsx index c4349c1f..365af97d 100644 --- a/pages/index.tsx +++ b/app/page.tsx @@ -1,4 +1,3 @@ -import type { NextPage } from 'next'; import Image from 'next/image'; import heroPlaceholder from '../public/images/hero-placeholder.jpg'; import Section from '../source/02-layouts/Section/Section'; @@ -6,7 +5,7 @@ import HeroBgImage from '../source/03-components/HeroBgImage/HeroBgImage'; import Wysiwyg from '../source/03-components/Wysiwyg/Wysiwyg'; import LandingPage from '../source/04-templates/LandingPage/LandingPage'; -const Home: NextPage = () => { +function Home() { const title = 'Forum One Next.js Starter App'; return ( { ); -}; +} export default Home; diff --git a/package-lock.json b/package-lock.json index f99edd1f..cf4d530c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "nextjs-project", "version": "1.0.10", "dependencies": { - "next": "^13.2.3", + "next": "^14.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-select": "^5.8.0" @@ -4306,9 +4306,9 @@ } }, "node_modules/@next/env": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz", - "integrity": "sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==" + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.1.tgz", + "integrity": "sha512-7CnQyD5G8shHxQIIg3c7/pSeYFeMhsNbpU/bmvH7ZnDql7mNRgg8O2JZrhrc/soFnfBnKP4/xXNiiSIPn2w8gA==" }, "node_modules/@next/eslint-plugin-next": { "version": "14.1.1", @@ -4320,9 +4320,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.6.tgz", - "integrity": "sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.1.tgz", + "integrity": "sha512-yDjSFKQKTIjyT7cFv+DqQfW5jsD+tVxXTckSe1KIouKk75t1qZmj/mV3wzdmFb0XHVGtyRjDMulfVG8uCKemOQ==", "cpu": [ "arm64" ], @@ -4335,9 +4335,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.6.tgz", - "integrity": "sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.1.tgz", + "integrity": "sha512-KCQmBL0CmFmN8D64FHIZVD9I4ugQsDBBEJKiblXGgwn7wBCSe8N4Dx47sdzl4JAg39IkSN5NNrr8AniXLMb3aw==", "cpu": [ "x64" ], @@ -4350,9 +4350,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.6.tgz", - "integrity": "sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.1.tgz", + "integrity": "sha512-YDQfbWyW0JMKhJf/T4eyFr4b3tceTorQ5w2n7I0mNVTFOvu6CGEzfwT3RSAQGTi/FFMTFcuspPec/7dFHuP7Eg==", "cpu": [ "arm64" ], @@ -4365,9 +4365,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.6.tgz", - "integrity": "sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.1.tgz", + "integrity": "sha512-fiuN/OG6sNGRN/bRFxRvV5LyzLB8gaL8cbDH5o3mEiVwfcMzyE5T//ilMmaTrnA8HLMS6hoz4cHOu6Qcp9vxgQ==", "cpu": [ "arm64" ], @@ -4380,9 +4380,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.6.tgz", - "integrity": "sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.1.tgz", + "integrity": "sha512-rv6AAdEXoezjbdfp3ouMuVqeLjE1Bin0AuE6qxE6V9g3Giz5/R3xpocHoAi7CufRR+lnkuUjRBn05SYJ83oKNQ==", "cpu": [ "x64" ], @@ -4395,9 +4395,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.6.tgz", - "integrity": "sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.1.tgz", + "integrity": "sha512-YAZLGsaNeChSrpz/G7MxO3TIBLaMN8QWMr3X8bt6rCvKovwU7GqQlDu99WdvF33kI8ZahvcdbFsy4jAFzFX7og==", "cpu": [ "x64" ], @@ -4410,9 +4410,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.6.tgz", - "integrity": "sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.1.tgz", + "integrity": "sha512-1L4mUYPBMvVDMZg1inUYyPvFSduot0g73hgfD9CODgbr4xiTYe0VOMTZzaRqYJYBA9mana0x4eaAaypmWo1r5A==", "cpu": [ "arm64" ], @@ -4425,9 +4425,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.6.tgz", - "integrity": "sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.1.tgz", + "integrity": "sha512-jvIE9tsuj9vpbbXlR5YxrghRfMuG0Qm/nZ/1KDHc+y6FpnZ/apsgh+G6t15vefU0zp3WSpTMIdXRUsNl/7RSuw==", "cpu": [ "ia32" ], @@ -4440,9 +4440,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.6.tgz", - "integrity": "sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.1.tgz", + "integrity": "sha512-S6K6EHDU5+1KrBDLko7/c1MNy/Ya73pIAmvKeFwsF4RmBFJSO7/7YeD4FnZ4iBdzE69PpQ4sOMU9ORKeNuxe8A==", "cpu": [ "x64" ], @@ -13593,7 +13593,8 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true }, "node_modules/global-modules": { "version": "2.0.0", @@ -16307,34 +16308,34 @@ "dev": true }, "node_modules/next": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/next/-/next-13.5.6.tgz", - "integrity": "sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/next/-/next-14.1.1.tgz", + "integrity": "sha512-McrGJqlGSHeaz2yTRPkEucxQKe5Zq7uPwyeHNmJaZNY4wx9E9QdxmTp310agFRoMuIYgQrCrT3petg13fSVOww==", "dependencies": { - "@next/env": "13.5.6", + "@next/env": "14.1.1", "@swc/helpers": "0.5.2", "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001406", + "caniuse-lite": "^1.0.30001579", + "graceful-fs": "^4.2.11", "postcss": "8.4.31", - "styled-jsx": "5.1.1", - "watchpack": "2.4.0" + "styled-jsx": "5.1.1" }, "bin": { "next": "dist/bin/next" }, "engines": { - "node": ">=16.14.0" + "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "13.5.6", - "@next/swc-darwin-x64": "13.5.6", - "@next/swc-linux-arm64-gnu": "13.5.6", - "@next/swc-linux-arm64-musl": "13.5.6", - "@next/swc-linux-x64-gnu": "13.5.6", - "@next/swc-linux-x64-musl": "13.5.6", - "@next/swc-win32-arm64-msvc": "13.5.6", - "@next/swc-win32-ia32-msvc": "13.5.6", - "@next/swc-win32-x64-msvc": "13.5.6" + "@next/swc-darwin-arm64": "14.1.1", + "@next/swc-darwin-x64": "14.1.1", + "@next/swc-linux-arm64-gnu": "14.1.1", + "@next/swc-linux-arm64-musl": "14.1.1", + "@next/swc-linux-x64-gnu": "14.1.1", + "@next/swc-linux-x64-musl": "14.1.1", + "@next/swc-win32-arm64-msvc": "14.1.1", + "@next/swc-win32-ia32-msvc": "14.1.1", + "@next/swc-win32-x64-msvc": "14.1.1" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -24971,6 +24972,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" diff --git a/package.json b/package.json index 8ac735c2..f3eb66aa 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ ">= 1% in US" ], "dependencies": { - "next": "^13.2.3", + "next": "^14.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-select": "^5.8.0" diff --git a/pages/_app.tsx b/pages/_app.tsx deleted file mode 100644 index 20da41f9..00000000 --- a/pages/_app.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import type { AppProps } from 'next/app'; -import Head from 'next/head'; -import '../source/00-config/index.css'; -import '../source/01-global/index.css'; -import Footer from '../source/02-layouts/Footer/Footer'; -import Header from '../source/02-layouts/Header/Header'; -import SiteContainer from '../source/02-layouts/SiteContainer/SiteContainer'; -import BackToTop from '../source/03-components/BackToTop/BackToTop'; -import Menu from '../source/03-components/Menu/Menu'; -import ResponsiveMenu from '../source/03-components/Menu/ResponsiveMenu/ResponsiveMenu'; -import footerStyles from '../source/03-components/Menu/menu-footer.module.css'; -import SiteName from '../source/03-components/SiteName/SiteName'; -import Skiplink from '../source/03-components/Skiplink/Skiplink'; -import addBasePath from '../source/06-utility/addBasePath'; -import '../source/06-utility/index.css'; -import SourceSansFontStyle from '../source/01-global/fonts/source-sans'; - -function MyApp({ Component, pageProps }: AppProps) { - return ( - <> - - - - - - -
- - -
- {/* Breadcrumb */} - -
- -
-
- - - ); -} -export default MyApp; diff --git a/pages/_document.tsx b/pages/_document.tsx deleted file mode 100644 index f0c86340..00000000 --- a/pages/_document.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Document, { Head, Html, Main, NextScript } from 'next/document'; - -class MyDocument extends Document { - render() { - return ( - - - -
- - - - ); - } -} - -export default MyDocument; diff --git a/source/01-global/fonts/source-sans.tsx b/source/01-global/fonts/source-sans.tsx index b1e10d56..7266811f 100644 --- a/source/01-global/fonts/source-sans.tsx +++ b/source/01-global/fonts/source-sans.tsx @@ -1,3 +1,5 @@ +'use client'; + import { Source_Sans_3 as SourceSansPro } from 'next/font/google'; const sourceSansPro = SourceSansPro({ diff --git a/source/03-components/Accordion/Accordion.tsx b/source/03-components/Accordion/Accordion.tsx index 60292930..b5fec12f 100644 --- a/source/03-components/Accordion/Accordion.tsx +++ b/source/03-components/Accordion/Accordion.tsx @@ -1,3 +1,5 @@ +'use client'; + import clsx from 'clsx'; import { GessoComponent } from 'gesso'; import { KeyboardEvent, createRef, useId, useMemo, useState } from 'react'; diff --git a/source/03-components/BackToTop/BackToTop.tsx b/source/03-components/BackToTop/BackToTop.tsx index 147ce408..cd085b41 100644 --- a/source/03-components/BackToTop/BackToTop.tsx +++ b/source/03-components/BackToTop/BackToTop.tsx @@ -1,3 +1,5 @@ +'use client'; + import clsx from 'clsx'; import { GessoComponent } from 'gesso'; import { MouseEvent, useEffect, useState } from 'react'; diff --git a/source/03-components/Menu/OverlayMenu/OverlayMenu.tsx b/source/03-components/Menu/OverlayMenu/OverlayMenu.tsx index 435390e2..83eb3bfd 100644 --- a/source/03-components/Menu/OverlayMenu/OverlayMenu.tsx +++ b/source/03-components/Menu/OverlayMenu/OverlayMenu.tsx @@ -1,3 +1,5 @@ +'use client'; + import clsx from 'clsx'; import { GessoComponent } from 'gesso'; import { useEffect, useId, useState } from 'react'; diff --git a/tsconfig.json b/tsconfig.json index ca7080a0..e87da372 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,13 +22,19 @@ "jsx": "preserve", "noImplicitAny": true, "incremental": true, - "strictBindCallApply": true + "strictBindCallApply": true, + "plugins": [ + { + "name": "next" + } + ] }, "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", - "**/*.module.css" + "**/*.module.css", + ".next/types/**/*.ts" ], "exclude": [ "node_modules"