bạn biết về mã hóa kh
Browse files- README.md +9 -5
- components/code-editor.js +88 -0
- components/footer.js +118 -0
- components/navbar.js +79 -0
- index.html +115 -19
- script.js +44 -0
- style.css +32 -18
README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
title: Code Wizard
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Code Wizard's Wonderland 🧙♂️✨
|
| 3 |
+
colorFrom: green
|
| 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/code-editor.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CodeEditor extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
margin: 2rem 0;
|
| 9 |
+
}
|
| 10 |
+
.editor-container {
|
| 11 |
+
border-radius: 0.5rem;
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 14 |
+
}
|
| 15 |
+
.editor-header {
|
| 16 |
+
background: #2d3748;
|
| 17 |
+
padding: 0.5rem 1rem;
|
| 18 |
+
display: flex;
|
| 19 |
+
align-items: center;
|
| 20 |
+
color: white;
|
| 21 |
+
}
|
| 22 |
+
.editor-header-title {
|
| 23 |
+
font-family: 'Inter', sans-serif;
|
| 24 |
+
font-size: 0.875rem;
|
| 25 |
+
font-weight: 500;
|
| 26 |
+
}
|
| 27 |
+
.editor-body {
|
| 28 |
+
background: #1a202c;
|
| 29 |
+
padding: 1rem;
|
| 30 |
+
font-family: 'Fira Code', monospace;
|
| 31 |
+
color: #e2e8f0;
|
| 32 |
+
min-height: 200px;
|
| 33 |
+
max-height: 400px;
|
| 34 |
+
overflow-y: auto;
|
| 35 |
+
}
|
| 36 |
+
.line-numbers {
|
| 37 |
+
color: #718096;
|
| 38 |
+
user-select: none;
|
| 39 |
+
margin-right: 1rem;
|
| 40 |
+
}
|
| 41 |
+
.code-line {
|
| 42 |
+
display: flex;
|
| 43 |
+
margin-bottom: 0.5rem;
|
| 44 |
+
}
|
| 45 |
+
.keyword {
|
| 46 |
+
color: #f687b3;
|
| 47 |
+
}
|
| 48 |
+
.string {
|
| 49 |
+
color: #68d391;
|
| 50 |
+
}
|
| 51 |
+
.comment {
|
| 52 |
+
color: #718096;
|
| 53 |
+
font-style: italic;
|
| 54 |
+
}
|
| 55 |
+
.number {
|
| 56 |
+
color: #f6ad55;
|
| 57 |
+
}
|
| 58 |
+
.function {
|
| 59 |
+
color: #63b3ed;
|
| 60 |
+
}
|
| 61 |
+
</style>
|
| 62 |
+
<div class="editor-container">
|
| 63 |
+
<div class="editor-header">
|
| 64 |
+
<span class="editor-header-title">code.js</span>
|
| 65 |
+
</div>
|
| 66 |
+
<div class="editor-body">
|
| 67 |
+
<div class="code-line"><span class="line-numbers">1</span> <span class="keyword">const</span> <span class="function">encodeMessage</span> = (<span class="keyword">message</span>) => {</div>
|
| 68 |
+
<div class="code-line"><span class="line-numbers">2</span> <span class="keyword">return</span> <span class="function">btoa</span>(<span class="function">encodeURIComponent</span>(<span class="keyword">message</span>));</div>
|
| 69 |
+
<div class="code-line"><span class="line-numbers">3</span> };</div>
|
| 70 |
+
<div class="code-line"><span class="line-numbers">4</span> </div>
|
| 71 |
+
<div class="code-line"><span class="line-numbers">5</span> <span class="keyword">const</span> <span class="function">decodeMessage</span> = (<span class="keyword">encoded</span>) => {</div>
|
| 72 |
+
<div class="code-line"><span class="line-numbers">6</span> <span class="keyword">try</span> {</div>
|
| 73 |
+
<div class="code-line"><span class="line-numbers">7</span> <span class="keyword">return</span> <span class="function">decodeURIComponent</span>(<span class="function">atob</span>(<span class="keyword">encoded</span>));</div>
|
| 74 |
+
<div class="code-line"><span class="line-numbers">8</span> } <span class="keyword">catch</span> (<span class="keyword">e</span>) {</div>
|
| 75 |
+
<div class="code-line"><span class="line-numbers">9</span> <span class="keyword">return</span> <span class="string">"Invalid encoding"</span>;</div>
|
| 76 |
+
<div class="code-line"><span class="line-numbers">10</span> }</div>
|
| 77 |
+
<div class="code-line"><span class="line-numbers">11</span> };</div>
|
| 78 |
+
<div class="code-line"><span class="line-numbers">12</span> </div>
|
| 79 |
+
<div class="code-line"><span class="line-numbers">13</span> <span class="comment">// Example usage:</span></div>
|
| 80 |
+
<div class="code-line"><span class="line-numbers">14</span> <span class="keyword">const</span> <span class="keyword">secret</span> = <span class="string">"Hello World!"</span>;</div>
|
| 81 |
+
<div class="code-line"><span class="line-numbers">15</span> <span class="keyword">const</span> <span class="keyword">encoded</span> = <span class="function">encodeMessage</span>(<span class="keyword">secret</span>);</div>
|
| 82 |
+
<div class="code-line"><span class="line-numbers">16</span> <span class="keyword">const</span> <span class="keyword">decoded</span> = <span class="function">decodeMessage</span>(<span class="keyword">encoded</span>);</div>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
`;
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
customElements.define('code-editor', CodeEditor);
|
components/footer.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background: #1f2937;
|
| 8 |
+
color: white;
|
| 9 |
+
padding: 4rem 2rem;
|
| 10 |
+
}
|
| 11 |
+
.footer-content {
|
| 12 |
+
max-width: 1200px;
|
| 13 |
+
margin: 0 auto;
|
| 14 |
+
display: grid;
|
| 15 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 16 |
+
gap: 2rem;
|
| 17 |
+
}
|
| 18 |
+
.footer-section h3 {
|
| 19 |
+
font-size: 1.25rem;
|
| 20 |
+
font-weight: 600;
|
| 21 |
+
margin-bottom: 1.5rem;
|
| 22 |
+
color: #e5e7eb;
|
| 23 |
+
}
|
| 24 |
+
.footer-section ul {
|
| 25 |
+
list-style: none;
|
| 26 |
+
padding: 0;
|
| 27 |
+
margin: 0;
|
| 28 |
+
}
|
| 29 |
+
.footer-section li {
|
| 30 |
+
margin-bottom: 0.75rem;
|
| 31 |
+
}
|
| 32 |
+
.footer-section a {
|
| 33 |
+
color: #9ca3af;
|
| 34 |
+
text-decoration: none;
|
| 35 |
+
transition: color 0.2s;
|
| 36 |
+
}
|
| 37 |
+
.footer-section a:hover {
|
| 38 |
+
color: white;
|
| 39 |
+
}
|
| 40 |
+
.social-links {
|
| 41 |
+
display: flex;
|
| 42 |
+
gap: 1rem;
|
| 43 |
+
margin-top: 1.5rem;
|
| 44 |
+
}
|
| 45 |
+
.social-links a {
|
| 46 |
+
display: inline-flex;
|
| 47 |
+
align-items: center;
|
| 48 |
+
justify-content: center;
|
| 49 |
+
width: 36px;
|
| 50 |
+
height: 36px;
|
| 51 |
+
border-radius: 50%;
|
| 52 |
+
background: rgba(255, 255, 255, 0.1);
|
| 53 |
+
transition: all 0.2s;
|
| 54 |
+
}
|
| 55 |
+
.social-links a:hover {
|
| 56 |
+
background: rgba(255, 255, 255, 0.2);
|
| 57 |
+
transform: translateY(-2px);
|
| 58 |
+
}
|
| 59 |
+
.footer-bottom {
|
| 60 |
+
text-align: center;
|
| 61 |
+
padding-top: 2rem;
|
| 62 |
+
margin-top: 2rem;
|
| 63 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 64 |
+
color: #9ca3af;
|
| 65 |
+
font-size: 0.875rem;
|
| 66 |
+
}
|
| 67 |
+
</style>
|
| 68 |
+
<footer>
|
| 69 |
+
<div class="footer-content">
|
| 70 |
+
<div class="footer-section">
|
| 71 |
+
<h3>Next.js</h3>
|
| 72 |
+
<p>The React Framework for Production</p>
|
| 73 |
+
<div class="social-links">
|
| 74 |
+
<a href="https://twitter.com/vercel" target="_blank" aria-label="Twitter">
|
| 75 |
+
<i data-feather="twitter"></i>
|
| 76 |
+
</a>
|
| 77 |
+
<a href="https://github.com/vercel/next.js" target="_blank" aria-label="GitHub">
|
| 78 |
+
<i data-feather="github"></i>
|
| 79 |
+
</a>
|
| 80 |
+
<a href="https://discord.com/invite/nextjs" target="_blank" aria-label="Discord">
|
| 81 |
+
<i data-feather="message-circle"></i>
|
| 82 |
+
</a>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
<div class="footer-section">
|
| 86 |
+
<h3>Resources</h3>
|
| 87 |
+
<ul>
|
| 88 |
+
<li><a href="https://nextjs.org/docs" target="_blank">Documentation</a></li>
|
| 89 |
+
<li><a href="https://nextjs.org/learn" target="_blank">Learn</a></li>
|
| 90 |
+
<li><a href="https://github.com/vercel/next.js" target="_blank">GitHub</a></li>
|
| 91 |
+
<li><a href="https://nextjs.org/showcase" target="_blank">Showcase</a></li>
|
| 92 |
+
</ul>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="footer-section">
|
| 95 |
+
<h3>Company</h3>
|
| 96 |
+
<ul>
|
| 97 |
+
<li><a href="https://vercel.com" target="_blank">Vercel</a></li>
|
| 98 |
+
<li><a href="https://vercel.com/blog" target="_blank">Blog</a></li>
|
| 99 |
+
<li><a href="https://nextjs.org/contact" target="_blank">Contact</a></li>
|
| 100 |
+
<li><a href="https://vercel.com/oss" target="_blank">Open Source</a></li>
|
| 101 |
+
</ul>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="footer-section">
|
| 104 |
+
<h3>Legal</h3>
|
| 105 |
+
<ul>
|
| 106 |
+
<li><a href="https://vercel.com/legal/privacy-policy" target="_blank">Privacy Policy</a></li>
|
| 107 |
+
<li><a href="https://vercel.com/legal/terms" target="_blank">Terms of Service</a></li>
|
| 108 |
+
</ul>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="footer-bottom">
|
| 112 |
+
<p>© ${new Date().getFullYear()} Next.js Wonderland. All rights reserved.</p>
|
| 113 |
+
</div>
|
| 114 |
+
</footer>
|
| 115 |
+
`;
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background: rgba(255, 255, 255, 0.9);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
padding: 1.5rem;
|
| 10 |
+
display: flex;
|
| 11 |
+
justify-content: space-between;
|
| 12 |
+
align-items: center;
|
| 13 |
+
position: fixed;
|
| 14 |
+
top: 0;
|
| 15 |
+
left: 0;
|
| 16 |
+
right: 0;
|
| 17 |
+
z-index: 50;
|
| 18 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 19 |
+
}
|
| 20 |
+
.logo {
|
| 21 |
+
font-weight: 700;
|
| 22 |
+
font-size: 1.5rem;
|
| 23 |
+
background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
|
| 24 |
+
-webkit-background-clip: text;
|
| 25 |
+
background-clip: text;
|
| 26 |
+
color: transparent;
|
| 27 |
+
}
|
| 28 |
+
ul {
|
| 29 |
+
display: flex;
|
| 30 |
+
gap: 1.5rem;
|
| 31 |
+
list-style: none;
|
| 32 |
+
margin: 0;
|
| 33 |
+
padding: 0;
|
| 34 |
+
align-items: center;
|
| 35 |
+
}
|
| 36 |
+
a {
|
| 37 |
+
text-decoration: none;
|
| 38 |
+
color: #4b5563;
|
| 39 |
+
font-weight: 500;
|
| 40 |
+
transition: color 0.2s;
|
| 41 |
+
}
|
| 42 |
+
a:hover {
|
| 43 |
+
color: #7c3aed;
|
| 44 |
+
}
|
| 45 |
+
.cta-button {
|
| 46 |
+
background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
|
| 47 |
+
color: white;
|
| 48 |
+
padding: 0.5rem 1.25rem;
|
| 49 |
+
border-radius: 9999px;
|
| 50 |
+
transition: all 0.2s;
|
| 51 |
+
}
|
| 52 |
+
.cta-button:hover {
|
| 53 |
+
transform: translateY(-2px);
|
| 54 |
+
box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
|
| 55 |
+
color: white;
|
| 56 |
+
}
|
| 57 |
+
@media (max-width: 768px) {
|
| 58 |
+
ul {
|
| 59 |
+
display: none;
|
| 60 |
+
}
|
| 61 |
+
.mobile-menu-button {
|
| 62 |
+
display: block;
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
</style>
|
| 66 |
+
<nav>
|
| 67 |
+
<a href="/" class="logo">Next.js Wonderland</a>
|
| 68 |
+
<ul>
|
| 69 |
+
<li><a href="#features">Features</a></li>
|
| 70 |
+
<li><a href="#get-started">Get Started</a></li>
|
| 71 |
+
<li><a href="https://nextjs.org/docs" target="_blank">Docs</a></li>
|
| 72 |
+
<li><a href="https://github.com/vercel/next.js" target="_blank">GitHub</a></li>
|
| 73 |
+
<li><a href="https://nextjs.org/learn" target="_blank" class="cta-button">Learn</a></li>
|
| 74 |
+
</ul>
|
| 75 |
+
</nav>
|
| 76 |
+
`;
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,115 @@
|
|
| 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 |
+
<section id="code-examples" class="py-20">
|
| 65 |
+
<h2 class="text-4xl font-bold text-center mb-16">Encoding Examples</h2>
|
| 66 |
+
<div class="max-w-4xl mx-auto">
|
| 67 |
+
<code-editor></code-editor>
|
| 68 |
+
<div class="mt-8 bg-white bg-opacity-90 backdrop-blur-sm rounded-xl p-6">
|
| 69 |
+
<h3 class="text-2xl font-semibold mb-4">Try it yourself:</h3>
|
| 70 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 71 |
+
<div>
|
| 72 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Encode a message:</label>
|
| 73 |
+
<input type="text" id="encode-input" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500" placeholder="Type a message...">
|
| 74 |
+
<button onclick="encodeMessage()" class="mt-2 px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition">Encode</button>
|
| 75 |
+
<div id="encode-output" class="mt-2 p-3 bg-gray-100 rounded-lg font-mono text-sm"></div>
|
| 76 |
+
</div>
|
| 77 |
+
<div>
|
| 78 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Decode a message:</label>
|
| 79 |
+
<input type="text" id="decode-input" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500" placeholder="Paste encoded message...">
|
| 80 |
+
<button onclick="decodeMessage()" class="mt-2 px-4 py-2 bg-pink-600 text-white rounded-lg hover:bg-pink-700 transition">Decode</button>
|
| 81 |
+
<div id="decode-output" class="mt-2 p-3 bg-gray-100 rounded-lg font-mono text-sm"></div>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
</section>
|
| 87 |
+
|
| 88 |
+
<section id="get-started" class="py-20">
|
| 89 |
+
<div class="bg-gradient-to-r from-purple-500 to-pink-500 rounded-2xl p-10 text-white">
|
| 90 |
+
<div class="max-w-4xl mx-auto">
|
| 91 |
+
<h2 class="text-3xl font-bold mb-6">Ready to Build Something Amazing?</h2>
|
| 92 |
+
<p class="text-xl mb-8">Get started with Next.js in seconds with our interactive tutorial.</p>
|
| 93 |
+
<div class="bg-gray-900 rounded-xl p-6 mb-8 overflow-x-auto">
|
| 94 |
+
<pre class="text-green-400"><code>npx create-next-app@latest</code></pre>
|
| 95 |
+
</div>
|
| 96 |
+
<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">
|
| 97 |
+
Explore Documentation
|
| 98 |
+
</a>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
</section>
|
| 102 |
+
</div>
|
| 103 |
+
</main>
|
| 104 |
+
|
| 105 |
+
<custom-footer></custom-footer>
|
| 106 |
+
<script src="components/navbar.js"></script>
|
| 107 |
+
<script src="components/footer.js"></script>
|
| 108 |
+
<script src="components/code-editor.js"></script>
|
| 109 |
+
<script src="script.js"></script>
|
| 110 |
+
<script>
|
| 111 |
+
feather.replace();
|
| 112 |
+
</script>
|
| 113 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 114 |
+
</body>
|
| 115 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
// Encoding/Decoding functions
|
| 19 |
+
window.encodeMessage = function() {
|
| 20 |
+
const input = document.getElementById('encode-input').value;
|
| 21 |
+
const encoded = btoa(encodeURIComponent(input));
|
| 22 |
+
document.getElementById('encode-output').textContent = encoded;
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
window.decodeMessage = function() {
|
| 26 |
+
const input = document.getElementById('decode-input').value;
|
| 27 |
+
try {
|
| 28 |
+
const decoded = decodeURIComponent(atob(input));
|
| 29 |
+
document.getElementById('decode-output').textContent = decoded;
|
| 30 |
+
} catch (e) {
|
| 31 |
+
document.getElementById('decode-output').textContent = "Invalid encoded message";
|
| 32 |
+
}
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
// Smooth scrolling for anchor links
|
| 36 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 37 |
+
anchor.addEventListener('click', function (e) {
|
| 38 |
+
e.preventDefault();
|
| 39 |
+
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
| 40 |
+
behavior: 'smooth'
|
| 41 |
+
});
|
| 42 |
+
});
|
| 43 |
+
});
|
| 44 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-size: 15px;
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
}
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', sans-serif;
|
| 5 |
+
background-color: #f9fafb;
|
| 6 |
+
color: #1f2937;
|
| 7 |
+
overflow-x: hidden;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
.feature-card:hover {
|
| 11 |
+
transform: translateY(-5px);
|
| 12 |
+
box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.1);
|
| 13 |
}
|
| 14 |
|
| 15 |
+
#vanta-background {
|
| 16 |
+
position: fixed;
|
| 17 |
+
z-index: 0;
|
| 18 |
}
|
| 19 |
|
| 20 |
+
.hero {
|
| 21 |
+
min-height: calc(100vh - 80px);
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
+
code {
|
| 25 |
+
font-family: 'Fira Code', monospace;
|
| 26 |
+
}
|
| 27 |
+
@media (max-width: 768px) {
|
| 28 |
+
.hero h1 {
|
| 29 |
+
font-size: 2.5rem;
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');
|
| 34 |
+
|
| 35 |
+
code, pre {
|
| 36 |
+
font-family: 'Fira Code', monospace;
|
| 37 |
}
|
| 38 |
|
| 39 |
+
#encode-output, #decode-output {
|
| 40 |
+
min-height: 50px;
|
| 41 |
+
word-break: break-all;
|
| 42 |
}
|