From b513f1c9cc9150a414c0008822edc07fd0f2e89c Mon Sep 17 00:00:00 2001 From: Keren Villatoro Date: Tue, 14 May 2024 22:54:47 -0500 Subject: [PATCH 1/3] app routes and navbar --- package-lock.json | 4 ++-- src/app/about/page.jsx | 9 ++++++++ src/app/admin/page.jsx | 9 ++++++++ src/app/blog/[slug]/page.jsx | 9 ++++++++ src/app/blog/layout.js | 10 +++++++++ src/app/blog/page.jsx | 9 ++++++++ src/app/contact/page.jsx | 9 ++++++++ src/app/error.jsx | 12 +++++++++++ src/app/globals.css | 19 +++++++++++++++++ src/app/layout.js | 8 ++++++- src/app/loading.jsx | 10 +++++++++ src/app/not-found.jsx | 12 +++++++++++ src/app/page.jsx | 2 +- src/components/footer/Footer.jsx | 7 +++++++ src/components/navbar/Navbar.jsx | 16 ++++++++++++++ src/components/navbar/link/Links.jsx | 31 ++++++++++++++++++++++++++++ 16 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 src/app/about/page.jsx create mode 100644 src/app/admin/page.jsx create mode 100644 src/app/blog/[slug]/page.jsx create mode 100644 src/app/blog/layout.js create mode 100644 src/app/blog/page.jsx create mode 100644 src/app/contact/page.jsx create mode 100644 src/app/error.jsx create mode 100644 src/app/loading.jsx create mode 100644 src/app/not-found.jsx create mode 100644 src/components/footer/Footer.jsx create mode 100644 src/components/navbar/Navbar.jsx create mode 100644 src/components/navbar/link/Links.jsx diff --git a/package-lock.json b/package-lock.json index d257486b3..d5bca6c14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "next14githubstarter", + "name": "next14starter", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "next14githubstarter", + "name": "next14starter", "version": "0.1.0", "dependencies": { "next": "14.0.4", diff --git a/src/app/about/page.jsx b/src/app/about/page.jsx new file mode 100644 index 000000000..acf448705 --- /dev/null +++ b/src/app/about/page.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +function AboutPage() { + return ( +
AboutPage
+ ) +} + +export default AboutPage \ No newline at end of file diff --git a/src/app/admin/page.jsx b/src/app/admin/page.jsx new file mode 100644 index 000000000..ba2264700 --- /dev/null +++ b/src/app/admin/page.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +function AdminPage() { + return ( +
AdminPage
+ ) +} + +export default AdminPage \ No newline at end of file diff --git a/src/app/blog/[slug]/page.jsx b/src/app/blog/[slug]/page.jsx new file mode 100644 index 000000000..57b18d1f9 --- /dev/null +++ b/src/app/blog/[slug]/page.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +function SinglePostPage() { + return ( +
SinglePostPage
+ ) +} + +export default SinglePostPage \ No newline at end of file diff --git a/src/app/blog/layout.js b/src/app/blog/layout.js new file mode 100644 index 000000000..a6e451042 --- /dev/null +++ b/src/app/blog/layout.js @@ -0,0 +1,10 @@ +const BlogLayout = ({children}) => { + return ( +
+

This is the Blog Layout

+ {children} +
+ ); +}; + +export default BlogLayout; \ No newline at end of file diff --git a/src/app/blog/page.jsx b/src/app/blog/page.jsx new file mode 100644 index 000000000..f38ce3486 --- /dev/null +++ b/src/app/blog/page.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +function BlogPage() { + return ( +
BlogPage
+ ) +} + +export default BlogPage \ No newline at end of file diff --git a/src/app/contact/page.jsx b/src/app/contact/page.jsx new file mode 100644 index 000000000..3ec767f27 --- /dev/null +++ b/src/app/contact/page.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +function ContactPage() { + return ( +
ContactPage
+ ) +} + +export default ContactPage \ No newline at end of file diff --git a/src/app/error.jsx b/src/app/error.jsx new file mode 100644 index 000000000..9bd0730cb --- /dev/null +++ b/src/app/error.jsx @@ -0,0 +1,12 @@ +'use client' +import React from 'react'; +const Error = ({ statusCode }) => { + return ( +
+

Error {statusCode}

+

Oops! Something went wrong.

+
+ ); +}; + +export default Error; \ No newline at end of file diff --git a/src/app/globals.css b/src/app/globals.css index e69de29bb..2df1548ed 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -0,0 +1,19 @@ +:root { + --bg: #0d0c22; + --bgSoft: #2d2b42; + --text: white; + --textSoft: #e5e5e5; + --btn: #3673fd; + +} + + +body { + background-color: var(--bg); + color: var(--text); +} + +a { + text-decoration: none; + color: inherit; +} \ No newline at end of file diff --git a/src/app/layout.js b/src/app/layout.js index e680e139d..59b740428 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -1,5 +1,7 @@ import { Inter } from 'next/font/google' import './globals.css' +import Navbar from "@/components/navbar/Navbar" +import Footer from "@/components/footer/Footer" const inter = Inter({ subsets: ['latin'] }) @@ -11,7 +13,11 @@ export const metadata = { export default function RootLayout({ children }) { return ( - {children} + + + {children} +