Skip to content

Commit

Permalink
doing script link image component in next js
Browse files Browse the repository at this point in the history
  • Loading branch information
unstoppableayush committed Feb 25, 2024
1 parent 9dd51c2 commit 4870039
Show file tree
Hide file tree
Showing 19 changed files with 5,054 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NextJS/123_script_link_image_component/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions NextJS/123_script_link_image_component/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions NextJS/123_script_link_image_component/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
11 changes: 11 additions & 0 deletions NextJS/123_script_link_image_component/app/about/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'

const about = () => {
return (
<div>
I am About
</div>
)
}

export default about
12 changes: 12 additions & 0 deletions NextJS/123_script_link_image_component/app/contact/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'


const contact = () => {
return (
<div>
I am Contact
</div>
)
}

export default contact
Binary file not shown.
33 changes: 33 additions & 0 deletions NextJS/123_script_link_image_component/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@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;
}
}
26 changes: 26 additions & 0 deletions NextJS/123_script_link_image_component/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Inter } from "next/font/google";
import "./globals.css";
import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";

const inter = Inter({ subsets: ["latin"] });

export const metadata = {
title: "Facebook - Contact with peoples",
description: "Generated by create next app",
};

export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={inter.className}>
<Navbar/>
<div className=" flex justify-center items-center min-h-[85vh]">
{children}
</div>

<Footer/>
</body>
</html>
);
}
9 changes: 9 additions & 0 deletions NextJS/123_script_link_image_component/app/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Image from "next/image";

export default function Home() {
return (
<div>
I am Home
</div>
);
}
19 changes: 19 additions & 0 deletions NextJS/123_script_link_image_component/components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'
import Link from 'next/link'

const Footer = () => {
return (
<div>
<footer className='flex justify-between px-2 bg-slate-700 text-white py-4' >
<div className="text-center">Copyright @ Facebook | All rights reserved</div>
<ul className="flex gap-2 text-sm">
<Link href="/"><li>Home</li></Link>
<Link href="/about"><li>About</li></Link>
<Link href="/contact"><li>Contact</li></Link>
</ul>
</footer>
</div>
)
}

export default Footer
19 changes: 19 additions & 0 deletions NextJS/123_script_link_image_component/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'
import Link from 'next/link'

const Navbar = () => {
return (
<div>
<nav className='flex justify-between px-2 bg-slate-700 text-white py-4' >
<div className="logo font-bold">Facebook</div>
<ul className="flex gap-6">
<Link href="/"><li>Home</li></Link>
<Link href="/about"><li>About</li></Link>
<Link href="/contact"><li>Contact</li></Link>
</ul>
</nav>
</div>
)
}

export default Navbar
7 changes: 7 additions & 0 deletions NextJS/123_script_link_image_component/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
4 changes: 4 additions & 0 deletions NextJS/123_script_link_image_component/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
Loading

0 comments on commit 4870039

Please sign in to comment.