diff --git a/dmwt_session10/src/app/favicon.ico b/dmwt_session10/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 Binary files a/dmwt_session10/src/app/favicon.ico and /dev/null differ diff --git a/dmwt_session10/src/app/globals.css b/dmwt_session10/src/app/globals.css deleted file mode 100644 index 875c01e819b90038f0c3e4aee2a4dcc2086b0e14..0000000000000000000000000000000000000000 --- a/dmwt_session10/src/app/globals.css +++ /dev/null @@ -1,33 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/dmwt_session10/src/app/layout.js b/dmwt_session10/src/app/layout.js deleted file mode 100644 index 9aef1df7d6c3d50515ab62f578c5cc963a1243a7..0000000000000000000000000000000000000000 --- a/dmwt_session10/src/app/layout.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Inter } from "next/font/google"; -import "./globals.css"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ children }) { - return ( - <html lang="en"> - <body className={inter.className}>{children}</body> - </html> - ); -} diff --git a/dmwt_session10/src/app/page.js b/dmwt_session10/src/app/page.js deleted file mode 100644 index c9b26e076ed738853ed11ea262403c7caac16399..0000000000000000000000000000000000000000 --- a/dmwt_session10/src/app/page.js +++ /dev/null @@ -1,113 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( - <main className="flex min-h-screen flex-col items-center justify-between p-24"> - <div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex"> - <p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30"> - Get started by editing - <code className="font-mono font-bold">src/app/page.js</code> - </p> - <div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none"> - <a - className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0" - href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" - target="_blank" - rel="noopener noreferrer" - > - By{" "} - <Image - src="/vercel.svg" - alt="Vercel Logo" - className="dark:invert" - width={100} - height={24} - priority - /> - </a> - </div> - </div> - - <div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]"> - <Image - className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert" - src="/next.svg" - alt="Next.js Logo" - width={180} - height={37} - priority - /> - </div> - - <div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left"> - <a - href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" - className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" - target="_blank" - rel="noopener noreferrer" - > - <h2 className={`mb-3 text-2xl font-semibold`}> - Docs{" "} - <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none"> - -> - </span> - </h2> - <p className={`m-0 max-w-[30ch] text-sm opacity-50`}> - Find in-depth information about Next.js features and API. - </p> - </a> - - <a - href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" - className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800 hover:dark:bg-opacity-30" - target="_blank" - rel="noopener noreferrer" - > - <h2 className={`mb-3 text-2xl font-semibold`}> - Learn{" "} - <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none"> - -> - </span> - </h2> - <p className={`m-0 max-w-[30ch] text-sm opacity-50`}> - Learn about Next.js in an interactive course with quizzes! - </p> - </a> - - <a - href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" - className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" - target="_blank" - rel="noopener noreferrer" - > - <h2 className={`mb-3 text-2xl font-semibold`}> - Templates{" "} - <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none"> - -> - </span> - </h2> - <p className={`m-0 max-w-[30ch] text-sm opacity-50`}> - Explore starter templates for Next.js. - </p> - </a> - - <a - href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" - className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" - target="_blank" - rel="noopener noreferrer" - > - <h2 className={`mb-3 text-2xl font-semibold`}> - Deploy{" "} - <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none"> - -> - </span> - </h2> - <p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}> - Instantly deploy your Next.js site to a shareable URL with Vercel. - </p> - </a> - </div> - </main> - ); -} diff --git a/dmwt_session10/src/components/Navbar.js b/dmwt_session10/src/components/Navbar.js new file mode 100644 index 0000000000000000000000000000000000000000..c43f0530376b0f5b4a00e35a8cfdae522b8afccb --- /dev/null +++ b/dmwt_session10/src/components/Navbar.js @@ -0,0 +1,24 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; + +const Navbar = () => { + const router = useRouter(); + + return ( + <> + <nav style={{ position: 'fixed', top: 0, left: 0, right: 0, background: '#6B2222', padding: '20px', zIndex: 1000 }}> + <ul style={{ listStyleType: 'none', padding: 0, margin: 0, display: 'flex', justifyContent: 'flex-end' }}> + <li style={{ marginRight: '10px' }}> + <Link href="/" style={{ textDecoration: 'none', color: router.pathname === '/' ? '#6B2222' : 'white', background: router.pathname === '/' ? 'white' : '#6B2222', padding: '5px 10px', borderRadius: '5px' , fontSize: router.pathname === '/' ? '20px' : '15px'}}>Main</Link> + </li> + <li style={{ marginRight: '10px' }}> + <Link href="/food" style={{ textDecoration: 'none', color: router.pathname === '/food' ? '#6B2222' : 'white' , background: router.pathname === '/food' ? 'white' : '#6B2222', padding: '5px 10px', borderRadius: '5px', fontSize: router.pathname === '/food' ? '20px' : '15px' }}>Food</Link> + </li> + </ul> + </nav> + <div style={{ height: '50px' }}></div> + </> + ); +}; + +export default Navbar; diff --git a/dmwt_session10/src/pages/_app.js b/dmwt_session10/src/pages/_app.js new file mode 100644 index 0000000000000000000000000000000000000000..bc4acbf11da76a6dceec86285cec9bf0c827e6c6 --- /dev/null +++ b/dmwt_session10/src/pages/_app.js @@ -0,0 +1,13 @@ +function MyApp({ Component, pageProps }) { + return( + + <Component {...pageProps} /> + + ) + + + } + + export default MyApp + + \ No newline at end of file diff --git a/dmwt_session10/src/pages/food.js b/dmwt_session10/src/pages/food.js new file mode 100644 index 0000000000000000000000000000000000000000..11c3c3bf3b6fa074e071d648c31f19baa3df3c6a --- /dev/null +++ b/dmwt_session10/src/pages/food.js @@ -0,0 +1,12 @@ + +import Navbar from '../components/Navbar'; + +const Food = () => { + return ( + <div> + <Navbar /> + + </div> + ); +} +export default Food; \ No newline at end of file diff --git a/dmwt_session10/src/pages/index.js b/dmwt_session10/src/pages/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7e50c71497f0a9fd65de99aede41b121f2bfaebf --- /dev/null +++ b/dmwt_session10/src/pages/index.js @@ -0,0 +1,13 @@ +import Navbar from '../components/Navbar'; + +const Home = () => { + return ( + <div> + <Navbar /> + + </div> + ); + }; + + export default Home; + \ No newline at end of file diff --git a/dmwt_session10/tailwind.config.js b/dmwt_session10/tailwind.config.js index 798035013020311461610354cf66716d7ff781e5..2dc96a309615875a60add2ef5d094287fd73272d 100644 --- a/dmwt_session10/tailwind.config.js +++ b/dmwt_session10/tailwind.config.js @@ -1,4 +1,4 @@ -/** @type {import('tailwindcss').Config} */ +/** @type {import('tailwindcss').Config} */ module.exports = { content: [ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",