Create a full stack website like this https://www.joshwcomeau.com/
Browse files- README.md +8 -5
- components/footer.js +109 -0
- components/navbar.js +145 -0
- index.html +171 -19
- script.js +50 -0
- style.css +56 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CodeCanvas Chronicles ✍️
|
| 3 |
+
colorFrom: purple
|
| 4 |
+
colorTo: red
|
| 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).
|
components/footer.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
width: 100%;
|
| 9 |
+
background-color: #f8fafc;
|
| 10 |
+
border-top: 1px solid #e2e8f0;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
footer {
|
| 14 |
+
max-width: 1200px;
|
| 15 |
+
margin: 0 auto;
|
| 16 |
+
padding: 3rem 2rem;
|
| 17 |
+
display: flex;
|
| 18 |
+
flex-direction: column;
|
| 19 |
+
align-items: center;
|
| 20 |
+
text-align: center;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.footer-logo {
|
| 24 |
+
font-size: 1.5rem;
|
| 25 |
+
font-weight: 700;
|
| 26 |
+
color: #0ea5e9;
|
| 27 |
+
margin-bottom: 1.5rem;
|
| 28 |
+
text-decoration: none;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.footer-links {
|
| 32 |
+
display: flex;
|
| 33 |
+
gap: 1.5rem;
|
| 34 |
+
margin-bottom: 2rem;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.footer-link {
|
| 38 |
+
color: #475569;
|
| 39 |
+
text-decoration: none;
|
| 40 |
+
transition: color 0.2s;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.footer-link:hover {
|
| 44 |
+
color: #0ea5e9;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.social-links {
|
| 48 |
+
display: flex;
|
| 49 |
+
gap: 1.5rem;
|
| 50 |
+
margin-bottom: 2rem;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.social-link {
|
| 54 |
+
color: #64748b;
|
| 55 |
+
transition: color 0.2s;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.social-link:hover {
|
| 59 |
+
color: #0ea5e9;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.copyright {
|
| 63 |
+
color: #94a3b8;
|
| 64 |
+
font-size: 0.875rem;
|
| 65 |
+
}
|
| 66 |
+
</style>
|
| 67 |
+
|
| 68 |
+
<footer>
|
| 69 |
+
<a href="/" class="footer-logo">CodeCanvas</a>
|
| 70 |
+
|
| 71 |
+
<div class="footer-links">
|
| 72 |
+
<a href="#projects" class="footer-link">Projects</a>
|
| 73 |
+
<a href="#writing" class="footer-link">Writing</a>
|
| 74 |
+
<a href="#contact" class="footer-link">Contact</a>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<div class="social-links">
|
| 78 |
+
<a href="#" class="social-link">
|
| 79 |
+
<i data-feather="github"></i>
|
| 80 |
+
</a>
|
| 81 |
+
<a href="#" class="social-link">
|
| 82 |
+
<i data-feather="twitter"></i>
|
| 83 |
+
</a>
|
| 84 |
+
<a href="#" class="social-link">
|
| 85 |
+
<i data-feather="linkedin"></i>
|
| 86 |
+
</a>
|
| 87 |
+
<a href="#" class="social-link">
|
| 88 |
+
<i data-feather="mail"></i>
|
| 89 |
+
</a>
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
<p class="copyright">© ${new Date().getFullYear()} CodeCanvas Chronicles. All rights reserved.</p>
|
| 93 |
+
</footer>
|
| 94 |
+
`;
|
| 95 |
+
|
| 96 |
+
// Initialize Feather icons
|
| 97 |
+
const featherScript = document.createElement('script');
|
| 98 |
+
featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
|
| 99 |
+
this.shadowRoot.appendChild(featherScript);
|
| 100 |
+
|
| 101 |
+
featherScript.onload = () => {
|
| 102 |
+
if (window.feather) {
|
| 103 |
+
window.feather.replace();
|
| 104 |
+
}
|
| 105 |
+
};
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
width: 100%;
|
| 9 |
+
position: sticky;
|
| 10 |
+
top: 0;
|
| 11 |
+
z-index: 50;
|
| 12 |
+
background-color: rgba(255, 255, 255, 0.95);
|
| 13 |
+
backdrop-filter: blur(8px);
|
| 14 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
nav {
|
| 18 |
+
max-width: 1200px;
|
| 19 |
+
margin: 0 auto;
|
| 20 |
+
padding: 1rem 2rem;
|
| 21 |
+
display: flex;
|
| 22 |
+
justify-content: space-between;
|
| 23 |
+
align-items: center;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.logo {
|
| 27 |
+
font-size: 1.25rem;
|
| 28 |
+
font-weight: 700;
|
| 29 |
+
color: #0ea5e9;
|
| 30 |
+
text-decoration: none;
|
| 31 |
+
display: flex;
|
| 32 |
+
align-items: center;
|
| 33 |
+
gap: 0.5rem;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.nav-links {
|
| 37 |
+
display: flex;
|
| 38 |
+
gap: 1.5rem;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.nav-link {
|
| 42 |
+
color: #334155;
|
| 43 |
+
text-decoration: none;
|
| 44 |
+
font-weight: 500;
|
| 45 |
+
transition: color 0.2s;
|
| 46 |
+
position: relative;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.nav-link:hover {
|
| 50 |
+
color: #0ea5e9;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.nav-link:after {
|
| 54 |
+
content: '';
|
| 55 |
+
position: absolute;
|
| 56 |
+
bottom: -2px;
|
| 57 |
+
left: 0;
|
| 58 |
+
width: 0;
|
| 59 |
+
height: 2px;
|
| 60 |
+
background-color: #0ea5e9;
|
| 61 |
+
transition: width 0.2s;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.nav-link:hover:after {
|
| 65 |
+
width: 100%;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.mobile-menu-btn {
|
| 69 |
+
display: none;
|
| 70 |
+
background: none;
|
| 71 |
+
border: none;
|
| 72 |
+
cursor: pointer;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
@media (max-width: 768px) {
|
| 76 |
+
.mobile-menu-btn {
|
| 77 |
+
display: block;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.nav-links {
|
| 81 |
+
display: none;
|
| 82 |
+
position: absolute;
|
| 83 |
+
top: 100%;
|
| 84 |
+
left: 0;
|
| 85 |
+
right: 0;
|
| 86 |
+
background-color: white;
|
| 87 |
+
flex-direction: column;
|
| 88 |
+
padding: 1rem;
|
| 89 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.nav-links.active {
|
| 93 |
+
display: flex;
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
</style>
|
| 97 |
+
|
| 98 |
+
<nav>
|
| 99 |
+
<a href="/" class="logo">
|
| 100 |
+
<span>CodeCanvas</span>
|
| 101 |
+
</a>
|
| 102 |
+
|
| 103 |
+
<button class="mobile-menu-btn">
|
| 104 |
+
<i data-feather="menu"></i>
|
| 105 |
+
</button>
|
| 106 |
+
|
| 107 |
+
<div class="nav-links">
|
| 108 |
+
<a href="#projects" class="nav-link">Projects</a>
|
| 109 |
+
<a href="#writing" class="nav-link">Writing</a>
|
| 110 |
+
<a href="#contact" class="nav-link">Contact</a>
|
| 111 |
+
</div>
|
| 112 |
+
</nav>
|
| 113 |
+
`;
|
| 114 |
+
|
| 115 |
+
// Initialize Feather icons
|
| 116 |
+
const featherScript = document.createElement('script');
|
| 117 |
+
featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
|
| 118 |
+
this.shadowRoot.appendChild(featherScript);
|
| 119 |
+
|
| 120 |
+
featherScript.onload = () => {
|
| 121 |
+
if (window.feather) {
|
| 122 |
+
window.feather.replace();
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
// Mobile menu toggle
|
| 126 |
+
const mobileMenuBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
|
| 127 |
+
const navLinks = this.shadowRoot.querySelector('.nav-links');
|
| 128 |
+
|
| 129 |
+
if (mobileMenuBtn && navLinks) {
|
| 130 |
+
mobileMenuBtn.addEventListener('click', () => {
|
| 131 |
+
navLinks.classList.toggle('active');
|
| 132 |
+
const icon = mobileMenuBtn.querySelector('i');
|
| 133 |
+
if (navLinks.classList.contains('active')) {
|
| 134 |
+
icon.setAttribute('data-feather', 'x');
|
| 135 |
+
} else {
|
| 136 |
+
icon.setAttribute('data-feather', 'menu');
|
| 137 |
+
}
|
| 138 |
+
window.feather.replace();
|
| 139 |
+
});
|
| 140 |
+
}
|
| 141 |
+
};
|
| 142 |
+
}
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,171 @@
|
|
| 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" class="scroll-smooth">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>CodeCanvas Chronicles | Developer Portfolio</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>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: {
|
| 17 |
+
50: '#f0f9ff',
|
| 18 |
+
100: '#e0f2fe',
|
| 19 |
+
200: '#bae6fd',
|
| 20 |
+
300: '#7dd3fc',
|
| 21 |
+
400: '#38bdf8',
|
| 22 |
+
500: '#0ea5e9',
|
| 23 |
+
600: '#0284c7',
|
| 24 |
+
700: '#0369a1',
|
| 25 |
+
800: '#075985',
|
| 26 |
+
900: '#0c4a6e',
|
| 27 |
+
},
|
| 28 |
+
secondary: {
|
| 29 |
+
50: '#f8fafc',
|
| 30 |
+
100: '#f1f5f9',
|
| 31 |
+
200: '#e2e8f0',
|
| 32 |
+
300: '#cbd5e1',
|
| 33 |
+
400: '#94a3b8',
|
| 34 |
+
500: '#64748b',
|
| 35 |
+
600: '#475569',
|
| 36 |
+
700: '#334155',
|
| 37 |
+
800: '#1e293b',
|
| 38 |
+
900: '#0f172a',
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
</script>
|
| 45 |
+
</head>
|
| 46 |
+
<body class="bg-white text-secondary-900 font-sans antialiased">
|
| 47 |
+
<custom-navbar></custom-navbar>
|
| 48 |
+
|
| 49 |
+
<main class="max-w-4xl mx-auto px-6 py-12">
|
| 50 |
+
<section class="mb-20">
|
| 51 |
+
<div class="flex flex-col md:flex-row items-center gap-8">
|
| 52 |
+
<div class="flex-1">
|
| 53 |
+
<h1 class="text-4xl md:text-5xl font-bold mb-4 text-primary-700">Hi, I'm Alex</h1>
|
| 54 |
+
<h2 class="text-2xl md:text-3xl font-semibold mb-6 text-secondary-600">Full Stack Developer & UI Enthusiast</h2>
|
| 55 |
+
<p class="text-lg text-secondary-700 mb-8 leading-relaxed">
|
| 56 |
+
I build delightful digital experiences with React, Node.js, and thoughtful design. Currently crafting magic at PixelForge.
|
| 57 |
+
</p>
|
| 58 |
+
<div class="flex gap-4">
|
| 59 |
+
<a href="#projects" class="px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-medium">
|
| 60 |
+
View Projects
|
| 61 |
+
</a>
|
| 62 |
+
<a href="#contact" class="px-6 py-3 border border-secondary-300 rounded-lg hover:bg-secondary-50 transition-colors font-medium">
|
| 63 |
+
Get in Touch
|
| 64 |
+
</a>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="flex-1">
|
| 68 |
+
<img src="http://static.photos/technology/640x360/42" alt="Developer workspace" class="rounded-xl shadow-lg w-full">
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
</section>
|
| 72 |
+
|
| 73 |
+
<section id="projects" class="mb-20">
|
| 74 |
+
<h2 class="text-3xl font-bold mb-8 text-primary-700 border-b pb-2">Featured Projects</h2>
|
| 75 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 76 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
|
| 77 |
+
<img src="http://static.photos/technology/640x360/1" alt="Project 1" class="w-full h-48 object-cover">
|
| 78 |
+
<div class="p-6">
|
| 79 |
+
<h3 class="text-xl font-bold mb-2 text-primary-700">React Dashboard</h3>
|
| 80 |
+
<p class="text-secondary-600 mb-4">Interactive analytics dashboard with real-time data visualization</p>
|
| 81 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 82 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">React</span>
|
| 83 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">D3.js</span>
|
| 84 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">Node.js</span>
|
| 85 |
+
</div>
|
| 86 |
+
<a href="#" class="text-primary-600 hover:text-primary-800 font-medium inline-flex items-center">
|
| 87 |
+
View Project <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 88 |
+
</a>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
|
| 92 |
+
<img src="http://static.photos/technology/640x360/2" alt="Project 2" class="w-full h-48 object-cover">
|
| 93 |
+
<div class="p-6">
|
| 94 |
+
<h3 class="text-xl font-bold mb-2 text-primary-700">E-commerce Platform</h3>
|
| 95 |
+
<p class="text-secondary-600 mb-4">Full-featured online store with payment integration</p>
|
| 96 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 97 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">Next.js</span>
|
| 98 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">Stripe</span>
|
| 99 |
+
<span class="px-3 py-1 bg-secondary-100 text-secondary-800 rounded-full text-sm">MongoDB</span>
|
| 100 |
+
</div>
|
| 101 |
+
<a href="#" class="text-primary-600 hover:text-primary-800 font-medium inline-flex items-center">
|
| 102 |
+
View Project <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 103 |
+
</a>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
</section>
|
| 108 |
+
|
| 109 |
+
<section id="writing" class="mb-20">
|
| 110 |
+
<h2 class="text-3xl font-bold mb-8 text-primary-700 border-b pb-2">Latest Articles</h2>
|
| 111 |
+
<div class="space-y-6">
|
| 112 |
+
<article class="border-b border-secondary-200 pb-6">
|
| 113 |
+
<h3 class="text-xl font-bold mb-2 text-primary-700 hover:text-primary-800">
|
| 114 |
+
<a href="#">The Art of React Component Composition</a>
|
| 115 |
+
</h3>
|
| 116 |
+
<p class="text-secondary-600 mb-2">Exploring patterns for building flexible and maintainable React components</p>
|
| 117 |
+
<div class="flex items-center text-sm text-secondary-500">
|
| 118 |
+
<span>May 15, 2023</span>
|
| 119 |
+
<span class="mx-2">•</span>
|
| 120 |
+
<span>8 min read</span>
|
| 121 |
+
</div>
|
| 122 |
+
</article>
|
| 123 |
+
<article class="border-b border-secondary-200 pb-6">
|
| 124 |
+
<h3 class="text-xl font-bold mb-2 text-primary-700 hover:text-primary-800">
|
| 125 |
+
<a href="#">CSS Grid vs Flexbox: When to Use Each</a>
|
| 126 |
+
</h3>
|
| 127 |
+
<p class="text-secondary-600 mb-2">Practical guidelines for choosing the right layout tool for your project</p>
|
| 128 |
+
<div class="flex items-center text-sm text-secondary-500">
|
| 129 |
+
<span>April 28, 2023</span>
|
| 130 |
+
<span class="mx-2">•</span>
|
| 131 |
+
<span>6 min read</span>
|
| 132 |
+
</div>
|
| 133 |
+
</article>
|
| 134 |
+
</div>
|
| 135 |
+
</section>
|
| 136 |
+
|
| 137 |
+
<section id="contact" class="mb-20">
|
| 138 |
+
<h2 class="text-3xl font-bold mb-8 text-primary-700 border-b pb-2">Get in Touch</h2>
|
| 139 |
+
<div class="bg-secondary-50 rounded-xl p-8">
|
| 140 |
+
<form class="space-y-6">
|
| 141 |
+
<div>
|
| 142 |
+
<label for="name" class="block text-sm font-medium text-secondary-700 mb-1">Name</label>
|
| 143 |
+
<input type="text" id="name" class="w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-primary-500 focus:border-primary-500">
|
| 144 |
+
</div>
|
| 145 |
+
<div>
|
| 146 |
+
<label for="email" class="block text-sm font-medium text-secondary-700 mb-1">Email</label>
|
| 147 |
+
<input type="email" id="email" class="w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-primary-500 focus:border-primary-500">
|
| 148 |
+
</div>
|
| 149 |
+
<div>
|
| 150 |
+
<label for="message" class="block text-sm font-medium text-secondary-700 mb-1">Message</label>
|
| 151 |
+
<textarea id="message" rows="4" class="w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-primary-500 focus:border-primary-500"></textarea>
|
| 152 |
+
</div>
|
| 153 |
+
<button type="submit" class="px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-medium">
|
| 154 |
+
Send Message
|
| 155 |
+
</button>
|
| 156 |
+
</form>
|
| 157 |
+
</div>
|
| 158 |
+
</section>
|
| 159 |
+
</main>
|
| 160 |
+
|
| 161 |
+
<custom-footer></custom-footer>
|
| 162 |
+
|
| 163 |
+
<script src="components/navbar.js"></script>
|
| 164 |
+
<script src="components/footer.js"></script>
|
| 165 |
+
<script src="script.js"></script>
|
| 166 |
+
<script>
|
| 167 |
+
feather.replace();
|
| 168 |
+
</script>
|
| 169 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 170 |
+
</body>
|
| 171 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Smooth scrolling for anchor links
|
| 3 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 4 |
+
anchor.addEventListener('click', function (e) {
|
| 5 |
+
e.preventDefault();
|
| 6 |
+
|
| 7 |
+
const targetId = this.getAttribute('href');
|
| 8 |
+
if (targetId === '#') return;
|
| 9 |
+
|
| 10 |
+
const targetElement = document.querySelector(targetId);
|
| 11 |
+
if (targetElement) {
|
| 12 |
+
targetElement.scrollIntoView({
|
| 13 |
+
behavior: 'smooth',
|
| 14 |
+
block: 'start'
|
| 15 |
+
});
|
| 16 |
+
}
|
| 17 |
+
});
|
| 18 |
+
});
|
| 19 |
+
|
| 20 |
+
// Add fade-in animation to sections as they come into view
|
| 21 |
+
const sections = document.querySelectorAll('section');
|
| 22 |
+
const observerOptions = {
|
| 23 |
+
threshold: 0.1,
|
| 24 |
+
rootMargin: '0px 0px -50px 0px'
|
| 25 |
+
};
|
| 26 |
+
|
| 27 |
+
const observer = new IntersectionObserver((entries, observer) => {
|
| 28 |
+
entries.forEach(entry => {
|
| 29 |
+
if (entry.isIntersecting) {
|
| 30 |
+
entry.target.classList.add('fade-in');
|
| 31 |
+
observer.unobserve(entry.target);
|
| 32 |
+
}
|
| 33 |
+
});
|
| 34 |
+
}, observerOptions);
|
| 35 |
+
|
| 36 |
+
sections.forEach(section => {
|
| 37 |
+
observer.observe(section);
|
| 38 |
+
});
|
| 39 |
+
|
| 40 |
+
// Form submission handler
|
| 41 |
+
const contactForm = document.querySelector('#contact form');
|
| 42 |
+
if (contactForm) {
|
| 43 |
+
contactForm.addEventListener('submit', (e) => {
|
| 44 |
+
e.preventDefault();
|
| 45 |
+
// Here you would typically send the form data to a server
|
| 46 |
+
alert('Thank you for your message! I will get back to you soon.');
|
| 47 |
+
contactForm.reset();
|
| 48 |
+
});
|
| 49 |
+
}
|
| 50 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,66 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 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 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 5 |
+
line-height: 1.6;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* Custom scrollbar */
|
| 9 |
+
::-webkit-scrollbar {
|
| 10 |
+
width: 8px;
|
| 11 |
+
height: 8px;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
::-webkit-scrollbar-track {
|
| 15 |
+
background: #f1f1f1;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
::-webkit-scrollbar-thumb {
|
| 19 |
+
background: #94a3b8;
|
| 20 |
+
border-radius: 4px;
|
| 21 |
}
|
| 22 |
|
| 23 |
+
::-webkit-scrollbar-thumb:hover {
|
| 24 |
+
background: #64748b;
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
+
/* Animation classes */
|
| 28 |
+
.fade-in {
|
| 29 |
+
animation: fadeIn 0.5s ease-in-out;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
@keyframes fadeIn {
|
| 33 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 34 |
+
to { opacity: 1; transform: translateY(0); }
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
+
/* Custom button hover effect */
|
| 38 |
+
.btn-hover-effect {
|
| 39 |
+
transition: all 0.3s ease;
|
| 40 |
+
position: relative;
|
| 41 |
+
overflow: hidden;
|
| 42 |
}
|
| 43 |
+
|
| 44 |
+
.btn-hover-effect:after {
|
| 45 |
+
content: '';
|
| 46 |
+
position: absolute;
|
| 47 |
+
top: 0;
|
| 48 |
+
left: -100%;
|
| 49 |
+
width: 100%;
|
| 50 |
+
height: 100%;
|
| 51 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
| 52 |
+
transition: all 0.5s ease;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.btn-hover-effect:hover:after {
|
| 56 |
+
left: 100%;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Project card hover effect */
|
| 60 |
+
.project-card {
|
| 61 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.project-card:hover {
|
| 65 |
+
transform: translateY(-5px);
|
| 66 |
+
}
|