Let's deploy this
Browse files- components/navbar.js +5 -6
- index.html +7 -6
- projects.html +2 -2
- script.js +12 -25
- style.css +7 -14
- vercel.json +25 -0
components/navbar.js
CHANGED
|
@@ -68,15 +68,14 @@ ul {
|
|
| 68 |
<nav>
|
| 69 |
<a href="/" class="logo">
|
| 70 |
<i data-feather="pen-tool" class="logo-icon"></i>
|
| 71 |
-
<span>
|
| 72 |
</a>
|
| 73 |
<ul>
|
| 74 |
<li><a href="/" class="active"><i data-feather="home"></i> Dashboard</a></li>
|
| 75 |
-
<li><a href="/
|
| 76 |
-
<li><a href="/
|
| 77 |
-
<li><a href="/
|
| 78 |
-
|
| 79 |
-
</ul>
|
| 80 |
</nav>
|
| 81 |
`;
|
| 82 |
}
|
|
|
|
| 68 |
<nav>
|
| 69 |
<a href="/" class="logo">
|
| 70 |
<i data-feather="pen-tool" class="logo-icon"></i>
|
| 71 |
+
<span>Simple Canvas</span>
|
| 72 |
</a>
|
| 73 |
<ul>
|
| 74 |
<li><a href="/" class="active"><i data-feather="home"></i> Dashboard</a></li>
|
| 75 |
+
<li><a href="/create.html"><i data-feather="plus-square"></i> Create</a></li>
|
| 76 |
+
<li><a href="/projects.html"><i data-feather="folder"></i> Projects</a></li>
|
| 77 |
+
<li><a href="/help.html"><i data-feather="help-circle"></i> Help</a></li>
|
| 78 |
+
</ul>
|
|
|
|
| 79 |
</nav>
|
| 80 |
`;
|
| 81 |
}
|
index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
-
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
@@ -34,10 +34,8 @@
|
|
| 34 |
|
| 35 |
<script src="components/navbar.js"></script>
|
| 36 |
<script src="components/footer.js"></script>
|
| 37 |
-
<script src="components/auth-modal.js"></script>
|
| 38 |
<script src="script.js"></script>
|
| 39 |
-
<
|
| 40 |
-
<script>
|
| 41 |
feather.replace();
|
| 42 |
VANTA.WAVES({
|
| 43 |
el: "#vanta-bg",
|
|
@@ -51,6 +49,9 @@
|
|
| 51 |
color: 0x0
|
| 52 |
})
|
| 53 |
</script>
|
| 54 |
-
<script src="https://
|
|
|
|
|
|
|
|
|
|
| 55 |
</body>
|
| 56 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Simple Canvas</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
|
|
| 34 |
|
| 35 |
<script src="components/navbar.js"></script>
|
| 36 |
<script src="components/footer.js"></script>
|
|
|
|
| 37 |
<script src="script.js"></script>
|
| 38 |
+
<script>
|
|
|
|
| 39 |
feather.replace();
|
| 40 |
VANTA.WAVES({
|
| 41 |
el: "#vanta-bg",
|
|
|
|
| 49 |
color: 0x0
|
| 50 |
})
|
| 51 |
</script>
|
| 52 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 53 |
+
<script>
|
| 54 |
+
feather.replace();
|
| 55 |
+
</script>
|
| 56 |
</body>
|
| 57 |
</html>
|
projects.html
CHANGED
|
@@ -13,8 +13,8 @@
|
|
| 13 |
<main class="flex-grow p-6">
|
| 14 |
<div class="max-w-3xl mx-auto">
|
| 15 |
<h1 class="text-2xl font-bold mb-6">My Projects</h1>
|
| 16 |
-
<div class="grid grid-cols-1 md:grid-cols-2
|
| 17 |
-
<div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
|
| 18 |
<h3 class="font-medium mb-2">Project 1</h3>
|
| 19 |
<p class="text-sm text-gray-600 mb-2">Last edited: Today</p>
|
| 20 |
<a href="#" class="text-blue-600 text-sm">Open →</a>
|
|
|
|
| 13 |
<main class="flex-grow p-6">
|
| 14 |
<div class="max-w-3xl mx-auto">
|
| 15 |
<h1 class="text-2xl font-bold mb-6">My Projects</h1>
|
| 16 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 17 |
+
<div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
|
| 18 |
<h3 class="font-medium mb-2">Project 1</h3>
|
| 19 |
<p class="text-sm text-gray-600 mb-2">Last edited: Today</p>
|
| 20 |
<a href="#" class="text-blue-600 text-sm">Open →</a>
|
script.js
CHANGED
|
@@ -1,34 +1,21 @@
|
|
| 1 |
|
| 2 |
-
// Initialize tooltips
|
| 3 |
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
-
//
|
| 5 |
-
|
| 6 |
|
| 7 |
-
//
|
| 8 |
document.body.style.opacity = '0';
|
| 9 |
setTimeout(() => {
|
| 10 |
-
document.body.style.transition = 'opacity 0.
|
| 11 |
document.body.style.opacity = '1';
|
| 12 |
}, 100);
|
| 13 |
|
| 14 |
-
//
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
});
|
| 19 |
-
|
| 20 |
-
async function loadProjects() {
|
| 21 |
-
try {
|
| 22 |
-
const response = await axios.get('https://jsonplaceholder.typicode.com/posts?_limit=6');
|
| 23 |
-
const projectsContainer = document.getElementById('projects-container');
|
| 24 |
-
projectsContainer.innerHTML = response.data.map(project => `
|
| 25 |
-
<div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
|
| 26 |
-
<h3 class="font-medium mb-2">${project.title}</h3>
|
| 27 |
-
<p class="text-sm text-gray-600 mb-2">Created: ${new Date().toLocaleDateString()}</p>
|
| 28 |
-
<a href="#" class="text-blue-600 text-sm">Open →</a>
|
| 29 |
-
</div>
|
| 30 |
-
`).join('');
|
| 31 |
-
} catch (error) {
|
| 32 |
-
console.error('Failed to load projects:', error);
|
| 33 |
-
}
|
| 34 |
-
}
|
|
|
|
| 1 |
|
|
|
|
| 2 |
document.addEventListener('DOMContentLoaded', function() {
|
| 3 |
+
// Initialize all pages with common functionality
|
| 4 |
+
feather.replace();
|
| 5 |
|
| 6 |
+
// Smooth transitions
|
| 7 |
document.body.style.opacity = '0';
|
| 8 |
setTimeout(() => {
|
| 9 |
+
document.body.style.transition = 'opacity 0.3s ease-in';
|
| 10 |
document.body.style.opacity = '1';
|
| 11 |
}, 100);
|
| 12 |
|
| 13 |
+
// Handle active nav links
|
| 14 |
+
const currentPath = window.location.pathname;
|
| 15 |
+
const navLinks = document.querySelectorAll('custom-navbar a');
|
| 16 |
+
navLinks.forEach(link => {
|
| 17 |
+
if (link.getAttribute('href') === currentPath) {
|
| 18 |
+
link.classList.add('active');
|
| 19 |
+
}
|
| 20 |
+
});
|
| 21 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
CHANGED
|
@@ -1,26 +1,19 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
| 7 |
-
|
| 8 |
/* Animation for the hero section */
|
| 9 |
@keyframes float {
|
| 10 |
0% { transform: translateY(0px); }
|
| 11 |
50% { transform: translateY(-15px); }
|
| 12 |
100% { transform: translateY(0px); }
|
| 13 |
}
|
|
|
|
| 14 |
.floating {
|
| 15 |
animation: float 6s ease-in-out infinite;
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
/* Responsive adjustments */
|
| 19 |
-
@media (max-width: 640px) {
|
| 20 |
-
#vanta-bg {
|
| 21 |
-
background-size: cover;
|
| 22 |
-
}
|
| 23 |
-
.text-center {
|
| 24 |
-
padding: 1rem;
|
| 25 |
-
}
|
| 26 |
-
}
|
|
|
|
| 1 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
| 2 |
body {
|
| 3 |
font-family: 'Inter', sans-serif;
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
+
min-height: 100vh;
|
| 7 |
+
display: flex;
|
| 8 |
+
flex-direction: column;
|
| 9 |
}
|
|
|
|
| 10 |
/* Animation for the hero section */
|
| 11 |
@keyframes float {
|
| 12 |
0% { transform: translateY(0px); }
|
| 13 |
50% { transform: translateY(-15px); }
|
| 14 |
100% { transform: translateY(0px); }
|
| 15 |
}
|
| 16 |
+
|
| 17 |
.floating {
|
| 18 |
animation: float 6s ease-in-out infinite;
|
| 19 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vercel.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```json
|
| 2 |
+
{
|
| 3 |
+
"version": 2,
|
| 4 |
+
"builds": [
|
| 5 |
+
{
|
| 6 |
+
"src": "*.html",
|
| 7 |
+
"use": "@vercel/static"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"src": "assets/*",
|
| 11 |
+
"use": "@vercel/static"
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"routes": [
|
| 15 |
+
{
|
| 16 |
+
"src": "/assets/(.*)",
|
| 17 |
+
"dest": "/assets/$1"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"src": "/(.*)",
|
| 21 |
+
"dest": "/index.html"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
| 25 |
+
```
|