code multi file với nextjs
Browse files- README.md +9 -5
- components/footer.js +150 -0
- components/navbar.js +111 -0
- index.html +92 -19
- next.config.js +12 -0
- package.json +25 -0
- pages/_app.js +11 -0
- pages/index.js +43 -0
- script.js +28 -0
- style.css +28 -19
README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: NextJS Coding Wonderland 🚀
|
| 3 |
+
colorFrom: purple
|
| 4 |
+
colorTo: pink
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
| 14 |
+
|
components/footer.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import Link from 'next/link'
|
| 3 |
+
import { FaTwitter, FaGithub, FaDiscord } from 'react-icons/fa'
|
| 4 |
+
|
| 5 |
+
export default function Footer() {
|
| 6 |
+
return (
|
| 7 |
+
<footer className="bg-gray-900 text-white py-16 px-4">
|
| 8 |
+
<div className="max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 9 |
+
<div>
|
| 10 |
+
<h3 className="text-xl font-semibold mb-4">Next.js</h3>
|
| 11 |
+
<p className="text-gray-400 mb-4">The React Framework for Production</p>
|
| 12 |
+
<div className="flex space-x-4">
|
| 13 |
+
<a href="https://twitter.com/vercel" target="_blank" className="text-gray-400 hover:text-white transition-colors">
|
| 14 |
+
<FaTwitter size={20} />
|
| 15 |
+
</a>
|
| 16 |
+
<a href="https://github.com/vercel/next.js" target="_blank" className="text-gray-400 hover:text-white transition-colors">
|
| 17 |
+
<FaGithub size={20} />
|
| 18 |
+
</a>
|
| 19 |
+
<a href="https://discord.com/invite/nextjs" target="_blank" className="text-gray-400 hover:text-white transition-colors">
|
| 20 |
+
<FaDiscord size={20} />
|
| 21 |
+
</a>
|
| 22 |
+
</div>
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
{/* Other footer sections */}
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
<div className="max-w-6xl mx-auto pt-8 mt-8 border-t border-gray-800 text-center text-gray-400 text-sm">
|
| 29 |
+
© {new Date().getFullYear()} Next.js Wonderland. All rights reserved.
|
| 30 |
+
</div>
|
| 31 |
+
</footer>
|
| 32 |
+
)
|
| 33 |
+
}
|
| 34 |
+
connectedCallback() {
|
| 35 |
+
this.attachShadow({ mode: 'open' });
|
| 36 |
+
this.shadowRoot.innerHTML = `
|
| 37 |
+
<style>
|
| 38 |
+
footer {
|
| 39 |
+
background: #1f2937;
|
| 40 |
+
color: white;
|
| 41 |
+
padding: 4rem 2rem;
|
| 42 |
+
}
|
| 43 |
+
.footer-content {
|
| 44 |
+
max-width: 1200px;
|
| 45 |
+
margin: 0 auto;
|
| 46 |
+
display: grid;
|
| 47 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 48 |
+
gap: 2rem;
|
| 49 |
+
}
|
| 50 |
+
.footer-section h3 {
|
| 51 |
+
font-size: 1.25rem;
|
| 52 |
+
font-weight: 600;
|
| 53 |
+
margin-bottom: 1.5rem;
|
| 54 |
+
color: #e5e7eb;
|
| 55 |
+
}
|
| 56 |
+
.footer-section ul {
|
| 57 |
+
list-style: none;
|
| 58 |
+
padding: 0;
|
| 59 |
+
margin: 0;
|
| 60 |
+
}
|
| 61 |
+
.footer-section li {
|
| 62 |
+
margin-bottom: 0.75rem;
|
| 63 |
+
}
|
| 64 |
+
.footer-section a {
|
| 65 |
+
color: #9ca3af;
|
| 66 |
+
text-decoration: none;
|
| 67 |
+
transition: color 0.2s;
|
| 68 |
+
}
|
| 69 |
+
.footer-section a:hover {
|
| 70 |
+
color: white;
|
| 71 |
+
}
|
| 72 |
+
.social-links {
|
| 73 |
+
display: flex;
|
| 74 |
+
gap: 1rem;
|
| 75 |
+
margin-top: 1.5rem;
|
| 76 |
+
}
|
| 77 |
+
.social-links a {
|
| 78 |
+
display: inline-flex;
|
| 79 |
+
align-items: center;
|
| 80 |
+
justify-content: center;
|
| 81 |
+
width: 36px;
|
| 82 |
+
height: 36px;
|
| 83 |
+
border-radius: 50%;
|
| 84 |
+
background: rgba(255, 255, 255, 0.1);
|
| 85 |
+
transition: all 0.2s;
|
| 86 |
+
}
|
| 87 |
+
.social-links a:hover {
|
| 88 |
+
background: rgba(255, 255, 255, 0.2);
|
| 89 |
+
transform: translateY(-2px);
|
| 90 |
+
}
|
| 91 |
+
.footer-bottom {
|
| 92 |
+
text-align: center;
|
| 93 |
+
padding-top: 2rem;
|
| 94 |
+
margin-top: 2rem;
|
| 95 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 96 |
+
color: #9ca3af;
|
| 97 |
+
font-size: 0.875rem;
|
| 98 |
+
}
|
| 99 |
+
</style>
|
| 100 |
+
<footer>
|
| 101 |
+
<div class="footer-content">
|
| 102 |
+
<div class="footer-section">
|
| 103 |
+
<h3>Next.js</h3>
|
| 104 |
+
<p>The React Framework for Production</p>
|
| 105 |
+
<div class="social-links">
|
| 106 |
+
<a href="https://twitter.com/vercel" target="_blank" aria-label="Twitter">
|
| 107 |
+
<i data-feather="twitter"></i>
|
| 108 |
+
</a>
|
| 109 |
+
<a href="https://github.com/vercel/next.js" target="_blank" aria-label="GitHub">
|
| 110 |
+
<i data-feather="github"></i>
|
| 111 |
+
</a>
|
| 112 |
+
<a href="https://discord.com/invite/nextjs" target="_blank" aria-label="Discord">
|
| 113 |
+
<i data-feather="message-circle"></i>
|
| 114 |
+
</a>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
<div class="footer-section">
|
| 118 |
+
<h3>Resources</h3>
|
| 119 |
+
<ul>
|
| 120 |
+
<li><a href="https://nextjs.org/docs" target="_blank">Documentation</a></li>
|
| 121 |
+
<li><a href="https://nextjs.org/learn" target="_blank">Learn</a></li>
|
| 122 |
+
<li><a href="https://github.com/vercel/next.js" target="_blank">GitHub</a></li>
|
| 123 |
+
<li><a href="https://nextjs.org/showcase" target="_blank">Showcase</a></li>
|
| 124 |
+
</ul>
|
| 125 |
+
</div>
|
| 126 |
+
<div class="footer-section">
|
| 127 |
+
<h3>Company</h3>
|
| 128 |
+
<ul>
|
| 129 |
+
<li><a href="https://vercel.com" target="_blank">Vercel</a></li>
|
| 130 |
+
<li><a href="https://vercel.com/blog" target="_blank">Blog</a></li>
|
| 131 |
+
<li><a href="https://nextjs.org/contact" target="_blank">Contact</a></li>
|
| 132 |
+
<li><a href="https://vercel.com/oss" target="_blank">Open Source</a></li>
|
| 133 |
+
</ul>
|
| 134 |
+
</div>
|
| 135 |
+
<div class="footer-section">
|
| 136 |
+
<h3>Legal</h3>
|
| 137 |
+
<ul>
|
| 138 |
+
<li><a href="https://vercel.com/legal/privacy-policy" target="_blank">Privacy Policy</a></li>
|
| 139 |
+
<li><a href="https://vercel.com/legal/terms" target="_blank">Terms of Service</a></li>
|
| 140 |
+
</ul>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
<div class="footer-bottom">
|
| 144 |
+
<p>© ${new Date().getFullYear()} Next.js Wonderland. All rights reserved.</p>
|
| 145 |
+
</div>
|
| 146 |
+
</footer>
|
| 147 |
+
`;
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import Link from 'next/link'
|
| 3 |
+
|
| 4 |
+
export default function Navbar() {
|
| 5 |
+
return (
|
| 6 |
+
<nav className="bg-white bg-opacity-90 backdrop-filter backdrop-blur-md py-4 px-6 fixed w-full z-50 shadow-sm">
|
| 7 |
+
<div className="max-w-6xl mx-auto flex justify-between items-center">
|
| 8 |
+
<Link href="/" className="text-2xl font-bold bg-gradient-to-r from-purple-600 to-pink-500 bg-clip-text text-transparent">
|
| 9 |
+
Next.js Wonderland
|
| 10 |
+
</Link>
|
| 11 |
+
|
| 12 |
+
<div className="hidden md:flex items-center space-x-6">
|
| 13 |
+
<Link href="#features" className="text-gray-600 hover:text-purple-600 transition-colors">
|
| 14 |
+
Features
|
| 15 |
+
</Link>
|
| 16 |
+
<Link href="#get-started" className="text-gray-600 hover:text-purple-600 transition-colors">
|
| 17 |
+
Get Started
|
| 18 |
+
</Link>
|
| 19 |
+
<Link href="https://nextjs.org/docs" target="_blank" className="text-gray-600 hover:text-purple-600 transition-colors">
|
| 20 |
+
Docs
|
| 21 |
+
</Link>
|
| 22 |
+
<Link
|
| 23 |
+
href="https://nextjs.org/learn"
|
| 24 |
+
target="_blank"
|
| 25 |
+
className="bg-gradient-to-r from-purple-600 to-pink-500 text-white px-4 py-2 rounded-full hover:shadow-lg transition-all"
|
| 26 |
+
>
|
| 27 |
+
Learn
|
| 28 |
+
</Link>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</nav>
|
| 32 |
+
)
|
| 33 |
+
}
|
| 34 |
+
connectedCallback() {
|
| 35 |
+
this.attachShadow({ mode: 'open' });
|
| 36 |
+
this.shadowRoot.innerHTML = `
|
| 37 |
+
<style>
|
| 38 |
+
nav {
|
| 39 |
+
background: rgba(255, 255, 255, 0.9);
|
| 40 |
+
backdrop-filter: blur(10px);
|
| 41 |
+
padding: 1.5rem;
|
| 42 |
+
display: flex;
|
| 43 |
+
justify-content: space-between;
|
| 44 |
+
align-items: center;
|
| 45 |
+
position: fixed;
|
| 46 |
+
top: 0;
|
| 47 |
+
left: 0;
|
| 48 |
+
right: 0;
|
| 49 |
+
z-index: 50;
|
| 50 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 51 |
+
}
|
| 52 |
+
.logo {
|
| 53 |
+
font-weight: 700;
|
| 54 |
+
font-size: 1.5rem;
|
| 55 |
+
background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
|
| 56 |
+
-webkit-background-clip: text;
|
| 57 |
+
background-clip: text;
|
| 58 |
+
color: transparent;
|
| 59 |
+
}
|
| 60 |
+
ul {
|
| 61 |
+
display: flex;
|
| 62 |
+
gap: 1.5rem;
|
| 63 |
+
list-style: none;
|
| 64 |
+
margin: 0;
|
| 65 |
+
padding: 0;
|
| 66 |
+
align-items: center;
|
| 67 |
+
}
|
| 68 |
+
a {
|
| 69 |
+
text-decoration: none;
|
| 70 |
+
color: #4b5563;
|
| 71 |
+
font-weight: 500;
|
| 72 |
+
transition: color 0.2s;
|
| 73 |
+
}
|
| 74 |
+
a:hover {
|
| 75 |
+
color: #7c3aed;
|
| 76 |
+
}
|
| 77 |
+
.cta-button {
|
| 78 |
+
background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
|
| 79 |
+
color: white;
|
| 80 |
+
padding: 0.5rem 1.25rem;
|
| 81 |
+
border-radius: 9999px;
|
| 82 |
+
transition: all 0.2s;
|
| 83 |
+
}
|
| 84 |
+
.cta-button:hover {
|
| 85 |
+
transform: translateY(-2px);
|
| 86 |
+
box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
|
| 87 |
+
color: white;
|
| 88 |
+
}
|
| 89 |
+
@media (max-width: 768px) {
|
| 90 |
+
ul {
|
| 91 |
+
display: none;
|
| 92 |
+
}
|
| 93 |
+
.mobile-menu-button {
|
| 94 |
+
display: block;
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
</style>
|
| 98 |
+
<nav>
|
| 99 |
+
<a href="/" class="logo">Next.js Wonderland</a>
|
| 100 |
+
<ul>
|
| 101 |
+
<li><a href="#features">Features</a></li>
|
| 102 |
+
<li><a href="#get-started">Get Started</a></li>
|
| 103 |
+
<li><a href="https://nextjs.org/docs" target="_blank">Docs</a></li>
|
| 104 |
+
<li><a href="https://github.com/vercel/next.js" target="_blank">GitHub</a></li>
|
| 105 |
+
<li><a href="https://nextjs.org/learn" target="_blank" class="cta-button">Learn</a></li>
|
| 106 |
+
</ul>
|
| 107 |
+
</nav>
|
| 108 |
+
`;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,92 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Next.js Wonderland</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
|
| 12 |
+
</head>
|
| 13 |
+
<body>
|
| 14 |
+
<custom-navbar></custom-navbar>
|
| 15 |
+
|
| 16 |
+
<main class="container mx-auto px-4 py-12">
|
| 17 |
+
<div id="vanta-background" class="absolute top-0 left-0 w-full h-full z-0"></div>
|
| 18 |
+
<div class="relative z-10">
|
| 19 |
+
<section class="hero min-h-screen flex items-center justify-center">
|
| 20 |
+
<div class="text-center">
|
| 21 |
+
<h1 class="text-6xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-purple-400 via-pink-500 to-red-500">
|
| 22 |
+
Welcome to Next.js Wonderland
|
| 23 |
+
</h1>
|
| 24 |
+
<p class="text-xl mb-8 max-w-2xl mx-auto">
|
| 25 |
+
A magical place where React meets server-side rendering and static site generation.
|
| 26 |
+
</p>
|
| 27 |
+
<div class="flex justify-center gap-4">
|
| 28 |
+
<a href="#features" class="px-6 py-3 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-full font-medium shadow-lg hover:shadow-xl transition-all duration-300">
|
| 29 |
+
Explore Features
|
| 30 |
+
</a>
|
| 31 |
+
<a href="#get-started" class="px-6 py-3 border-2 border-purple-500 text-purple-500 rounded-full font-medium hover:bg-purple-50 transition-all duration-300">
|
| 32 |
+
Get Started
|
| 33 |
+
</a>
|
| 34 |
+
</div>
|
| 35 |
+
</div>
|
| 36 |
+
</section>
|
| 37 |
+
|
| 38 |
+
<section id="features" class="py-20">
|
| 39 |
+
<h2 class="text-4xl font-bold text-center mb-16">Why Choose Next.js?</h2>
|
| 40 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
| 41 |
+
<div class="feature-card p-8 rounded-xl bg-white bg-opacity-90 backdrop-blur-sm border border-gray-200 hover:border-purple-300 transition-all duration-300">
|
| 42 |
+
<div class="w-16 h-16 flex items-center justify-center bg-purple-100 rounded-full mb-6">
|
| 43 |
+
<i data-feather="zap" class="text-purple-600"></i>
|
| 44 |
+
</div>
|
| 45 |
+
<h3 class="text-2xl font-semibold mb-3">Blazing Fast</h3>
|
| 46 |
+
<p class="text-gray-600">Automatic static optimization and server-side rendering for lightning-fast performance.</p>
|
| 47 |
+
</div>
|
| 48 |
+
<div class="feature-card p-8 rounded-xl bg-white bg-opacity-90 backdrop-blur-sm border border-gray-200 hover:border-purple-300 transition-all duration-300">
|
| 49 |
+
<div class="w-16 h-16 flex items-center justify-center bg-purple-100 rounded-full mb-6">
|
| 50 |
+
<i data-feather="code" class="text-purple-600"></i>
|
| 51 |
+
</div>
|
| 52 |
+
<h3 class="text-2xl font-semibold mb-3">Developer Experience</h3>
|
| 53 |
+
<p class="text-gray-600">File-system routing, API routes, and built-in CSS/Sass support make development a breeze.</p>
|
| 54 |
+
</div>
|
| 55 |
+
<div class="feature-card p-8 rounded-xl bg-white bg-opacity-90 backdrop-blur-sm border border-gray-200 hover:border-purple-300 transition-all duration-300">
|
| 56 |
+
<div class="w-16 h-16 flex items-center justify-center bg-purple-100 rounded-full mb-6">
|
| 57 |
+
<i data-feather="globe" class="text-purple-600"></i>
|
| 58 |
+
</div>
|
| 59 |
+
<h3 class="text-2xl font-semibold mb-3">Hybrid Rendering</h3>
|
| 60 |
+
<p class="text-gray-600">Mix static generation, server-side rendering, and client-side rendering in a single app.</p>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
</section>
|
| 64 |
+
|
| 65 |
+
<section id="get-started" class="py-20">
|
| 66 |
+
<div class="bg-gradient-to-r from-purple-500 to-pink-500 rounded-2xl p-10 text-white">
|
| 67 |
+
<div class="max-w-4xl mx-auto">
|
| 68 |
+
<h2 class="text-3xl font-bold mb-6">Ready to Build Something Amazing?</h2>
|
| 69 |
+
<p class="text-xl mb-8">Get started with Next.js in seconds with our interactive tutorial.</p>
|
| 70 |
+
<div class="bg-gray-900 rounded-xl p-6 mb-8 overflow-x-auto">
|
| 71 |
+
<pre class="text-green-400"><code>npx create-next-app@latest</code></pre>
|
| 72 |
+
</div>
|
| 73 |
+
<a href="https://nextjs.org/docs" target="_blank" class="inline-block px-8 py-3 bg-white text-purple-600 rounded-full font-bold hover:bg-gray-100 transition-all duration-300">
|
| 74 |
+
Explore Documentation
|
| 75 |
+
</a>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</section>
|
| 79 |
+
</div>
|
| 80 |
+
</main>
|
| 81 |
+
|
| 82 |
+
<custom-footer></custom-footer>
|
| 83 |
+
|
| 84 |
+
<script src="components/navbar.js"></script>
|
| 85 |
+
<script src="components/footer.js"></script>
|
| 86 |
+
<script src="script.js"></script>
|
| 87 |
+
<script>
|
| 88 |
+
feather.replace();
|
| 89 |
+
</script>
|
| 90 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 91 |
+
</body>
|
| 92 |
+
</html>
|
next.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('next').NextConfig} */
|
| 2 |
+
const nextConfig = {
|
| 3 |
+
reactStrictMode: true,
|
| 4 |
+
compiler: {
|
| 5 |
+
styledComponents: true,
|
| 6 |
+
},
|
| 7 |
+
images: {
|
| 8 |
+
domains: ['static.photos'],
|
| 9 |
+
},
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
module.exports = nextConfig
|
package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```json
|
| 2 |
+
{
|
| 3 |
+
"name": "nextjs-wonderland",
|
| 4 |
+
"version": "0.1.0",
|
| 5 |
+
"private": true,
|
| 6 |
+
"scripts": {
|
| 7 |
+
"dev": "next dev",
|
| 8 |
+
"build": "next build",
|
| 9 |
+
"start": "next start",
|
| 10 |
+
"lint": "next lint"
|
| 11 |
+
},
|
| 12 |
+
"dependencies": {
|
| 13 |
+
"next": "^13.4.7",
|
| 14 |
+
"react": "^18.2.0",
|
| 15 |
+
"react-dom": "^18.2.0",
|
| 16 |
+
"react-icons": "^4.8.0",
|
| 17 |
+
"vanta": "^0.5.24"
|
| 18 |
+
},
|
| 19 |
+
"devDependencies": {
|
| 20 |
+
"autoprefixer": "^10.4.14",
|
| 21 |
+
"postcss": "^8.4.21",
|
| 22 |
+
"tailwindcss": "^3.3.2"
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
```
|
pages/_app.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import '../style.css'
|
| 2 |
+
|
| 3 |
+
export default function MyApp({ Component, pageProps }) {
|
| 4 |
+
return (
|
| 5 |
+
<>
|
| 6 |
+
<custom-navbar></custom-navbar>
|
| 7 |
+
<Component {...pageProps} />
|
| 8 |
+
<custom-footer></custom-footer>
|
| 9 |
+
</>
|
| 10 |
+
)
|
| 11 |
+
}
|
pages/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Head from 'next/head'
|
| 2 |
+
import { useEffect } from 'react'
|
| 3 |
+
|
| 4 |
+
export default function Home() {
|
| 5 |
+
useEffect(() => {
|
| 6 |
+
// Initialize Vanta.js after component mounts
|
| 7 |
+
if (typeof window !== 'undefined') {
|
| 8 |
+
const VANTA = require('vanta/dist/vanta.net.min')
|
| 9 |
+
VANTA.NET({
|
| 10 |
+
el: "#vanta-background",
|
| 11 |
+
mouseControls: true,
|
| 12 |
+
touchControls: true,
|
| 13 |
+
gyroControls: false,
|
| 14 |
+
minHeight: 200.00,
|
| 15 |
+
minWidth: 200.00,
|
| 16 |
+
scale: 1.00,
|
| 17 |
+
scaleMobile: 1.00,
|
| 18 |
+
color: 0x7c3aed,
|
| 19 |
+
backgroundColor: 0xf9fafb,
|
| 20 |
+
points: 12.00,
|
| 21 |
+
maxDistance: 22.00,
|
| 22 |
+
spacing: 18.00
|
| 23 |
+
})
|
| 24 |
+
}
|
| 25 |
+
}, [])
|
| 26 |
+
|
| 27 |
+
return (
|
| 28 |
+
<>
|
| 29 |
+
<Head>
|
| 30 |
+
<title>Next.js Wonderland</title>
|
| 31 |
+
<meta name="description" content="A magical place where React meets server-side rendering" />
|
| 32 |
+
</Head>
|
| 33 |
+
|
| 34 |
+
<div id="vanta-background" className="fixed top-0 left-0 w-full h-full z-0"></div>
|
| 35 |
+
|
| 36 |
+
<main className="container mx-auto px-4 py-12 relative z-10">
|
| 37 |
+
<section className="hero min-h-screen flex items-center justify-center">
|
| 38 |
+
{/* Rest of your home page content */}
|
| 39 |
+
</section>
|
| 40 |
+
</main>
|
| 41 |
+
</>
|
| 42 |
+
)
|
| 43 |
+
}
|
script.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Initialize Vanta.js background
|
| 3 |
+
VANTA.NET({
|
| 4 |
+
el: "#vanta-background",
|
| 5 |
+
mouseControls: true,
|
| 6 |
+
touchControls: true,
|
| 7 |
+
gyroControls: false,
|
| 8 |
+
minHeight: 200.00,
|
| 9 |
+
minWidth: 200.00,
|
| 10 |
+
scale: 1.00,
|
| 11 |
+
scaleMobile: 1.00,
|
| 12 |
+
color: 0x7c3aed,
|
| 13 |
+
backgroundColor: 0xf9fafb,
|
| 14 |
+
points: 12.00,
|
| 15 |
+
maxDistance: 22.00,
|
| 16 |
+
spacing: 18.00
|
| 17 |
+
});
|
| 18 |
+
|
| 19 |
+
// Smooth scrolling for anchor links
|
| 20 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 21 |
+
anchor.addEventListener('click', function (e) {
|
| 22 |
+
e.preventDefault();
|
| 23 |
+
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
| 24 |
+
behavior: 'smooth'
|
| 25 |
+
});
|
| 26 |
+
});
|
| 27 |
+
});
|
| 28 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,37 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
@tailwind base;
|
| 3 |
+
@tailwind components;
|
| 4 |
+
@tailwind utilities;
|
| 5 |
+
|
| 6 |
+
@layer base {
|
| 7 |
+
body {
|
| 8 |
+
@apply font-inter bg-gray-50 text-gray-900 overflow-x-hidden;
|
| 9 |
+
}
|
| 10 |
}
|
| 11 |
|
| 12 |
+
.feature-card {
|
| 13 |
+
@apply transition-all duration-300 hover:-translate-y-1 hover:shadow-lg;
|
| 14 |
+
}
|
| 15 |
+
.feature-card:hover {
|
| 16 |
+
transform: translateY(-5px);
|
| 17 |
+
box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.1);
|
| 18 |
}
|
| 19 |
|
| 20 |
+
#vanta-background {
|
| 21 |
+
position: fixed;
|
| 22 |
+
z-index: 0;
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
+
.hero {
|
| 26 |
+
min-height: calc(100vh - 80px);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
+
code {
|
| 30 |
+
font-family: 'Fira Code', monospace;
|
| 31 |
}
|
| 32 |
+
|
| 33 |
+
@media (max-width: 768px) {
|
| 34 |
+
.hero h1 {
|
| 35 |
+
font-size: 2.5rem;
|
| 36 |
+
}
|
| 37 |
+
}
|