Create a full-stack developer portfolio website. like a hacker. use modern components or ui library for this
Browse files- README.md +9 -5
- index.html +823 -18
- portfolio.html +590 -0
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: undefined
|
| 3 |
+
colorFrom: pink
|
| 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://deepsite.hf.co).
|
| 14 |
+
|
index.html
CHANGED
|
@@ -1,19 +1,824 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
|
|
|
|
|
| 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>YearEndQuest Tracker</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
darkMode: ["class"],
|
| 12 |
+
theme: {
|
| 13 |
+
extend: {
|
| 14 |
+
colors: {
|
| 15 |
+
primary: {
|
| 16 |
+
50: '#f0f9ff',
|
| 17 |
+
100: '#e0f2fe',
|
| 18 |
+
200: '#bae6fd',
|
| 19 |
+
300: '#7dd3fc',
|
| 20 |
+
400: '#38bdf8',
|
| 21 |
+
500: '#0ea5e9',
|
| 22 |
+
600: '#0284c7',
|
| 23 |
+
700: '#0369a1',
|
| 24 |
+
800: '#075985',
|
| 25 |
+
900: '#0c4a6e',
|
| 26 |
+
},
|
| 27 |
+
secondary: {
|
| 28 |
+
50: '#faf7ff',
|
| 29 |
+
100: '#f2e9ff',
|
| 30 |
+
200: '#e4d4ff',
|
| 31 |
+
300: '#d0b4ff',
|
| 32 |
+
400: '#b990ff',
|
| 33 |
+
500: '#a855f7',
|
| 34 |
+
600: '#9333ea',
|
| 35 |
+
700: '#7c3aed',
|
| 36 |
+
800: '#6b21a8',
|
| 37 |
+
900: '#581c87',
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
</script>
|
| 44 |
+
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
| 45 |
+
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
| 46 |
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
| 47 |
+
<script src="https://unpkg.com/framer-motion@10.16.4/dist/framer-motion.js"></script>
|
| 48 |
+
<script src="https://unpkg.com/recharts/umd/Recharts.js"></script>
|
| 49 |
+
<script src="https://unpkg.com/lucide-react@0.263.1/dist/umd/lucide-react.js"></script>
|
| 50 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 51 |
+
<style>
|
| 52 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 53 |
+
|
| 54 |
+
* {
|
| 55 |
+
font-family: 'Inter', sans-serif;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.shadcn-button {
|
| 59 |
+
display: inline-flex;
|
| 60 |
+
align-items: center;
|
| 61 |
+
justify-content: center;
|
| 62 |
+
border-radius: 0.375rem;
|
| 63 |
+
font-weight: 500;
|
| 64 |
+
transition: all 0.2s;
|
| 65 |
+
outline: none;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.shadcn-button:focus-visible {
|
| 69 |
+
outline: 2px solid rgb(14 165 233);
|
| 70 |
+
outline-offset: 2px;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.shadcn-button-primary {
|
| 74 |
+
background-color: rgb(14 165 233);
|
| 75 |
+
color: white;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.shadcn-button-primary:hover {
|
| 79 |
+
background-color: rgb(3 105 161);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.shadcn-button-secondary {
|
| 83 |
+
background-color: rgb(168 85 247);
|
| 84 |
+
color: white;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.shadcn-button-secondary:hover {
|
| 88 |
+
background-color: rgb(126 58 237);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.shadcn-input {
|
| 92 |
+
display: flex;
|
| 93 |
+
height: 2.5rem;
|
| 94 |
+
width: 100%;
|
| 95 |
+
border-radius: 0.375rem;
|
| 96 |
+
border: 1px solid rgb(229 231 235);
|
| 97 |
+
padding: 0.5rem 0.75rem;
|
| 98 |
+
font-size: 0.875rem;
|
| 99 |
+
transition: border-color 0.2s;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.shadcn-input:focus {
|
| 103 |
+
outline: none;
|
| 104 |
+
border-color: rgb(14 165 233);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.shadcn-card {
|
| 108 |
+
border-radius: 0.5rem;
|
| 109 |
+
border: 1px solid rgb(229 231 235);
|
| 110 |
+
background-color: white;
|
| 111 |
+
padding: 1.5rem;
|
| 112 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.dark .shadcn-card {
|
| 116 |
+
background-color: rgb(31 41 55);
|
| 117 |
+
border-color: rgb(55 65 81);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.dark .shadcn-input {
|
| 121 |
+
background-color: rgb(31 41 55);
|
| 122 |
+
border-color: rgb(55 65 81);
|
| 123 |
+
color: white;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.grid-square {
|
| 127 |
+
width: 1.25rem;
|
| 128 |
+
height: 1.25rem;
|
| 129 |
+
border-radius: 0.25rem;
|
| 130 |
+
margin: 0.125rem;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.fade-in {
|
| 134 |
+
animation: fadeIn 0.5s ease-in-out;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
@keyframes fadeIn {
|
| 138 |
+
from { opacity: 0; }
|
| 139 |
+
to { opacity: 1; }
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.scale-up {
|
| 143 |
+
animation: scaleUp 0.3s ease-out;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
@keyframes scaleUp {
|
| 147 |
+
from { transform: scale(0.8); }
|
| 148 |
+
to { transform: scale(1); }
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.progress-bar {
|
| 152 |
+
transition: width 0.5s ease-in-out;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.streak-badge {
|
| 156 |
+
animation: pulse 2s infinite;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
@keyframes pulse {
|
| 160 |
+
0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
|
| 161 |
+
70% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
|
| 162 |
+
100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.completed-task {
|
| 166 |
+
text-decoration: line-through;
|
| 167 |
+
opacity: 0.7;
|
| 168 |
+
transition: all 0.3s ease;
|
| 169 |
+
}
|
| 170 |
+
</style>
|
| 171 |
+
</head>
|
| 172 |
+
<body class="bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100 transition-colors duration-200">
|
| 173 |
+
<div id="root"></div>
|
| 174 |
+
|
| 175 |
+
<script type="text/babel">
|
| 176 |
+
const { useState, useEffect, useRef } = React;
|
| 177 |
+
const { motion, AnimatePresence } = FramerMotion;
|
| 178 |
+
const { LineChart, Line, BarChart, Bar, PieChart, Pie, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, Cell } = Recharts;
|
| 179 |
+
const { Check, Plus, X, Calendar, Target, BarChart3, Sun, Moon, Trophy, Flame } = LucideReact;
|
| 180 |
+
|
| 181 |
+
// Custom hook for localStorage
|
| 182 |
+
function useLocalStorage(key, initialValue) {
|
| 183 |
+
const [storedValue, setStoredValue] = useState(() => {
|
| 184 |
+
try {
|
| 185 |
+
const item = window.localStorage.getItem(key);
|
| 186 |
+
return item ? JSON.parse(item) : initialValue;
|
| 187 |
+
} catch (error) {
|
| 188 |
+
console.error(error);
|
| 189 |
+
return initialValue;
|
| 190 |
+
}
|
| 191 |
+
});
|
| 192 |
+
|
| 193 |
+
const setValue = (value) => {
|
| 194 |
+
try {
|
| 195 |
+
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
| 196 |
+
setStoredValue(valueToStore);
|
| 197 |
+
window.localStorage.setItem(key, JSON.stringify(valueToStore));
|
| 198 |
+
} catch (error) {
|
| 199 |
+
console.error(error);
|
| 200 |
+
}
|
| 201 |
+
};
|
| 202 |
+
|
| 203 |
+
return [storedValue, setValue];
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
// Utility functions
|
| 207 |
+
const utils = {
|
| 208 |
+
getDaysRemaining: () => {
|
| 209 |
+
const now = new Date();
|
| 210 |
+
const endOfYear = new Date(now.getFullYear(), 11, 31, 23, 59, 59);
|
| 211 |
+
const diff = endOfYear - now;
|
| 212 |
+
|
| 213 |
+
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
| 214 |
+
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
| 215 |
+
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
|
| 216 |
+
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
|
| 217 |
+
|
| 218 |
+
return { days, hours, minutes, seconds, totalSeconds: diff / 1000 };
|
| 219 |
+
},
|
| 220 |
+
|
| 221 |
+
getYearProgress: () => {
|
| 222 |
+
const now = new Date();
|
| 223 |
+
const startOfYear = new Date(now.getFullYear(), 0, 1);
|
| 224 |
+
const endOfYear = new Date(now.getFullYear(), 11, 31, 23, 59, 59);
|
| 225 |
+
const total = endOfYear - startOfYear;
|
| 226 |
+
const elapsed = now - startOfYear;
|
| 227 |
+
|
| 228 |
+
return (elapsed / total) * 100;
|
| 229 |
+
},
|
| 230 |
+
|
| 231 |
+
getDaysInYear: () => {
|
| 232 |
+
const now = new Date();
|
| 233 |
+
const startOfYear = new Date(now.getFullYear(), 0, 1);
|
| 234 |
+
const endOfYear = new Date(now.getFullYear(), 11, 31, 23, 59, 59);
|
| 235 |
+
return Math.ceil((endOfYear - startOfYear) / (1000 * 60 * 60 * 24));
|
| 236 |
+
},
|
| 237 |
+
|
| 238 |
+
getDayOfYear: () => {
|
| 239 |
+
const now = new Date();
|
| 240 |
+
const start = new Date(now.getFullYear(), 0, 0);
|
| 241 |
+
const diff = now - start;
|
| 242 |
+
const oneDay = 1000 * 60 * 60 * 24;
|
| 243 |
+
return Math.floor(diff / oneDay);
|
| 244 |
+
},
|
| 245 |
+
|
| 246 |
+
formatDate: (date) => {
|
| 247 |
+
return date.toLocaleDateString('en-US', {
|
| 248 |
+
weekday: 'short',
|
| 249 |
+
year: 'numeric',
|
| 250 |
+
month: 'short',
|
| 251 |
+
day: 'numeric'
|
| 252 |
+
});
|
| 253 |
+
}
|
| 254 |
+
};
|
| 255 |
+
|
| 256 |
+
// Countdown component
|
| 257 |
+
function Countdown() {
|
| 258 |
+
const [timeLeft, setTimeLeft] = useState(utils.getDaysRemaining());
|
| 259 |
+
|
| 260 |
+
useEffect(() => {
|
| 261 |
+
const timer = setInterval(() => {
|
| 262 |
+
setTimeLeft(utils.getDaysRemaining());
|
| 263 |
+
}, 1000);
|
| 264 |
+
|
| 265 |
+
return () => clearInterval(timer);
|
| 266 |
+
}, []);
|
| 267 |
+
|
| 268 |
+
return (
|
| 269 |
+
<div className="text-center mb-8">
|
| 270 |
+
<h2 className="text-2xl font-bold mb-4">Time Until New Year</h2>
|
| 271 |
+
<div className="flex justify-center space-x-4">
|
| 272 |
+
<div className="bg-primary-100 dark:bg-primary-900 rounded-lg p-4 min-w-[80px]">
|
| 273 |
+
<div className="text-3xl font-bold">{timeLeft.days}</div>
|
| 274 |
+
<div className="text-sm">Days</div>
|
| 275 |
+
</div>
|
| 276 |
+
<div className="bg-primary-100 dark:bg-primary-900 rounded-lg p-4 min-w-[80px]">
|
| 277 |
+
<div className="text-3xl font-bold">{timeLeft.hours}</div>
|
| 278 |
+
<div className="text-sm">Hours</div>
|
| 279 |
+
</div>
|
| 280 |
+
<div className="bg-primary-100 dark:bg-primary-900 rounded-lg p-4 min-w-[80px]">
|
| 281 |
+
<div className="text-3xl font-bold">{timeLeft.minutes}</div>
|
| 282 |
+
<div className="text-sm">Minutes</div>
|
| 283 |
+
</div>
|
| 284 |
+
<div className="bg-primary-100 dark:bg-primary-900 rounded-lg p-4 min-w-[80px]">
|
| 285 |
+
<div className="text-3xl font-bold">{timeLeft.seconds}</div>
|
| 286 |
+
<div className="text-sm">Seconds</div>
|
| 287 |
+
</div>
|
| 288 |
+
</div>
|
| 289 |
+
</div>
|
| 290 |
+
);
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// GitHub-style grid visualization
|
| 294 |
+
function YearGrid({ dailyTasks }) {
|
| 295 |
+
const daysInYear = utils.getDaysInYear();
|
| 296 |
+
const dayOfYear = utils.getDayOfYear();
|
| 297 |
+
const daysRemaining = daysInYear - dayOfYear;
|
| 298 |
+
|
| 299 |
+
const grid = [];
|
| 300 |
+
for (let i = 1; i <= daysInYear; i++) {
|
| 301 |
+
const isFuture = i > dayOfYear;
|
| 302 |
+
const isCompleted = dailyTasks.some(task =>
|
| 303 |
+
task.completed && new Date(task.date).getDate() === new Date().getDate() &&
|
| 304 |
+
new Date(task.date).getMonth() === new Date().getMonth() &&
|
| 305 |
+
new Date(task.date).getFullYear() === new Date().getFullYear()
|
| 306 |
+
);
|
| 307 |
+
|
| 308 |
+
grid.push(
|
| 309 |
+
<motion.div
|
| 310 |
+
key={i}
|
| 311 |
+
className={`grid-square ${isFuture ? 'bg-primary-300' : isCompleted ? 'bg-primary-600' : 'bg-gray-300 dark:bg-gray-600'}`}
|
| 312 |
+
initial={{ opacity: 0, scale: 0.8 }}
|
| 313 |
+
animate={{ opacity: 1, scale: 1 }}
|
| 314 |
+
transition={{ delay: i * 0.002 }}
|
| 315 |
+
title={`Day ${i}`}
|
| 316 |
+
/>
|
| 317 |
+
);
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
return (
|
| 321 |
+
<div className="mb-8">
|
| 322 |
+
<h2 className="text-2xl font-bold mb-4">Year Progress</h2>
|
| 323 |
+
<div className="flex flex-wrap justify-center max-w-3xl mx-auto">
|
| 324 |
+
{grid}
|
| 325 |
+
</div>
|
| 326 |
+
</div>
|
| 327 |
+
);
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
// Progress bar component
|
| 331 |
+
function ProgressBar() {
|
| 332 |
+
const [progress, setProgress] = useState(0);
|
| 333 |
+
|
| 334 |
+
useEffect(() => {
|
| 335 |
+
setProgress(utils.getYearProgress());
|
| 336 |
+
}, []);
|
| 337 |
+
|
| 338 |
+
return (
|
| 339 |
+
<div className="w-full bg-gray-200 rounded-full h-4 mb-8 dark:bg-gray-700">
|
| 340 |
+
<motion.div
|
| 341 |
+
className="progress-bar h-4 rounded-full bg-primary-500"
|
| 342 |
+
initial={{ width: 0 }}
|
| 343 |
+
animate={{ width: `${progress}%` }}
|
| 344 |
+
transition={{ duration: 1, ease: "easeOut" }}
|
| 345 |
+
/>
|
| 346 |
+
<div className="text-xs mt-1 text-right">{progress.toFixed(1)}% of year completed</div>
|
| 347 |
+
</div>
|
| 348 |
+
);
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
// Task management components
|
| 352 |
+
function TaskManager() {
|
| 353 |
+
const [dailyTasks, setDailyTasks] = useLocalStorage('dailyTasks', []);
|
| 354 |
+
const [yearlyGoals, setYearlyGoals] = useLocalStorage('yearlyGoals', []);
|
| 355 |
+
const [showAddDaily, setShowAddDaily] = useState(false);
|
| 356 |
+
const [showAddYearly, setShowAddYearly] = useState(false);
|
| 357 |
+
const [newDailyTask, setNewDailyTask] = useState('');
|
| 358 |
+
const [newYearlyGoal, setNewYearlyGoal] = useState('');
|
| 359 |
+
|
| 360 |
+
const addDailyTask = () => {
|
| 361 |
+
if (newDailyTask.trim()) {
|
| 362 |
+
setDailyTasks([...dailyTasks, {
|
| 363 |
+
id: Date.now(),
|
| 364 |
+
text: newDailyTask,
|
| 365 |
+
completed: false,
|
| 366 |
+
date: new Date().toISOString(),
|
| 367 |
+
streak: 0
|
| 368 |
+
}]);
|
| 369 |
+
setNewDailyTask('');
|
| 370 |
+
setShowAddDaily(false);
|
| 371 |
+
}
|
| 372 |
+
};
|
| 373 |
+
|
| 374 |
+
const addYearlyGoal = () => {
|
| 375 |
+
if (newYearlyGoal.trim()) {
|
| 376 |
+
setYearlyGoals([...yearlyGoals, {
|
| 377 |
+
id: Date.now(),
|
| 378 |
+
text: newYearlyGoal,
|
| 379 |
+
completed: false
|
| 380 |
+
}]);
|
| 381 |
+
setNewYearlyGoal('');
|
| 382 |
+
setShowAddYearly(false);
|
| 383 |
+
}
|
| 384 |
+
};
|
| 385 |
+
|
| 386 |
+
const toggleDailyTask = (id) => {
|
| 387 |
+
setDailyTasks(dailyTasks.map(task =>
|
| 388 |
+
task.id === id ? { ...task, completed: !task.completed } : task
|
| 389 |
+
));
|
| 390 |
+
};
|
| 391 |
+
|
| 392 |
+
const toggleYearlyGoal = (id) => {
|
| 393 |
+
setYearlyGoals(yearlyGoals.map(goal =>
|
| 394 |
+
goal.id === id ? { ...goal, completed: !goal.completed } : goal
|
| 395 |
+
));
|
| 396 |
+
};
|
| 397 |
+
|
| 398 |
+
const deleteDailyTask = (id) => {
|
| 399 |
+
setDailyTasks(dailyTasks.filter(task => task.id !== id));
|
| 400 |
+
};
|
| 401 |
+
|
| 402 |
+
const deleteYearlyGoal = (id) => {
|
| 403 |
+
setYearlyGoals(yearlyGoals.filter(goal => goal.id !== id));
|
| 404 |
+
};
|
| 405 |
+
|
| 406 |
+
// Calculate streak
|
| 407 |
+
const streak = dailyTasks.filter(task => {
|
| 408 |
+
const taskDate = new Date(task.date);
|
| 409 |
+
const today = new Date();
|
| 410 |
+
return task.completed && taskDate.toDateString() === today.toDateString();
|
| 411 |
+
}).length > 0 ? (parseInt(localStorage.getItem('streak') || 0)) : 0;
|
| 412 |
+
|
| 413 |
+
useEffect(() => {
|
| 414 |
+
// Check if we need to reset tasks for a new day
|
| 415 |
+
const lastReset = localStorage.getItem('lastReset');
|
| 416 |
+
const today = new Date().toDateString();
|
| 417 |
+
|
| 418 |
+
if (lastReset !== today) {
|
| 419 |
+
// Reset daily tasks completion status
|
| 420 |
+
setDailyTasks(prev => prev.map(task => ({ ...task, completed: false })));
|
| 421 |
+
localStorage.setItem('lastReset', today);
|
| 422 |
+
|
| 423 |
+
// Update streak
|
| 424 |
+
const completedYesterday = dailyTasks.some(task => {
|
| 425 |
+
const taskDate = new Date(task.date);
|
| 426 |
+
const yesterday = new Date();
|
| 427 |
+
yesterday.setDate(yesterday.getDate() - 1);
|
| 428 |
+
return task.completed && taskDate.toDateString() === yesterday.toDateString();
|
| 429 |
+
});
|
| 430 |
+
|
| 431 |
+
if (completedYesterday) {
|
| 432 |
+
const newStreak = streak + 1;
|
| 433 |
+
localStorage.setItem('streak', newStreak);
|
| 434 |
+
} else {
|
| 435 |
+
localStorage.setItem('streak', 0);
|
| 436 |
+
}
|
| 437 |
+
}
|
| 438 |
+
}, [dailyTasks, setDailyTasks, streak]);
|
| 439 |
+
|
| 440 |
+
return (
|
| 441 |
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 mb-8">
|
| 442 |
+
{/* Daily Tasks */}
|
| 443 |
+
<div className="shadcn-card">
|
| 444 |
+
<div className="flex justify-between items-center mb-4">
|
| 445 |
+
<h2 className="text-xl font-bold flex items-center">
|
| 446 |
+
<Calendar className="mr-2" size={20} />
|
| 447 |
+
Daily Goals
|
| 448 |
+
{streak > 0 && (
|
| 449 |
+
<span className="streak-badge ml-2 bg-primary-100 text-primary-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-primary-900 dark:text-primary-300 flex items-center">
|
| 450 |
+
<Flame size={12} className="mr-1" /> {streak} day streak
|
| 451 |
+
</span>
|
| 452 |
+
)}
|
| 453 |
+
</h2>
|
| 454 |
+
<button
|
| 455 |
+
className="shadcn-button shadcn-button-primary p-2"
|
| 456 |
+
onClick={() => setShowAddDaily(true)}
|
| 457 |
+
>
|
| 458 |
+
<Plus size={16} />
|
| 459 |
+
</button>
|
| 460 |
+
</div>
|
| 461 |
+
|
| 462 |
+
{showAddDaily && (
|
| 463 |
+
<motion.div
|
| 464 |
+
className="mb-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"
|
| 465 |
+
initial={{ opacity: 0, height: 0 }}
|
| 466 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 467 |
+
exit={{ opacity: 0, height: 0 }}
|
| 468 |
+
>
|
| 469 |
+
<input
|
| 470 |
+
type="text"
|
| 471 |
+
className="shadcn-input mb-2"
|
| 472 |
+
placeholder="Enter daily task"
|
| 473 |
+
value={newDailyTask}
|
| 474 |
+
onChange={(e) => setNewDailyTask(e.target.value)}
|
| 475 |
+
onKeyPress={(e) => e.key === 'Enter' && addDailyTask()}
|
| 476 |
+
/>
|
| 477 |
+
<div className="flex space-x-2">
|
| 478 |
+
<button
|
| 479 |
+
className="shadcn-button shadcn-button-primary flex-1"
|
| 480 |
+
onClick={addDailyTask}
|
| 481 |
+
>
|
| 482 |
+
Add Task
|
| 483 |
+
</button>
|
| 484 |
+
<button
|
| 485 |
+
className="shadcn-button bg-gray-300 dark:bg-gray-600 flex-1"
|
| 486 |
+
onClick={() => setShowAddDaily(false)}
|
| 487 |
+
>
|
| 488 |
+
Cancel
|
| 489 |
+
</button>
|
| 490 |
+
</div>
|
| 491 |
+
</motion.div>
|
| 492 |
+
)}
|
| 493 |
+
|
| 494 |
+
<AnimatePresence>
|
| 495 |
+
{dailyTasks.filter(task => !task.completed).map((task) => (
|
| 496 |
+
<motion.div
|
| 497 |
+
key={task.id}
|
| 498 |
+
className="flex items-center justify-between p-3 mb-2 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"
|
| 499 |
+
initial={{ opacity: 0, y: -10 }}
|
| 500 |
+
animate={{ opacity: 1, y: 0 }}
|
| 501 |
+
exit={{ opacity: 0, y: -10 }}
|
| 502 |
+
transition={{ duration: 0.2 }}
|
| 503 |
+
>
|
| 504 |
+
<div className="flex items-center">
|
| 505 |
+
<button
|
| 506 |
+
className="w-5 h-5 rounded border border-gray-300 dark:border-gray-600 mr-3 flex items-center justify-center hover:bg-primary-50 dark:hover:bg-primary-900"
|
| 507 |
+
onClick={() => toggleDailyTask(task.id)}
|
| 508 |
+
>
|
| 509 |
+
{task.completed && <Check size={14} className="text-primary-600" />}
|
| 510 |
+
</button>
|
| 511 |
+
<span>{task.text}</span>
|
| 512 |
+
</div>
|
| 513 |
+
<button
|
| 514 |
+
className="text-gray-400 hover:text-red-500"
|
| 515 |
+
onClick={() => deleteDailyTask(task.id)}
|
| 516 |
+
>
|
| 517 |
+
<X size={16} />
|
| 518 |
+
</button>
|
| 519 |
+
</motion.div>
|
| 520 |
+
))}
|
| 521 |
+
</AnimatePresence>
|
| 522 |
+
|
| 523 |
+
{dailyTasks.filter(task => task.completed).length > 0 && (
|
| 524 |
+
<div className="mt-4">
|
| 525 |
+
<h3 className="text-sm font-medium mb-2 text-gray-500 dark:text-gray-400">Completed Today</h3>
|
| 526 |
+
<AnimatePresence>
|
| 527 |
+
{dailyTasks.filter(task => task.completed).map((task) => (
|
| 528 |
+
<motion.div
|
| 529 |
+
key={task.id}
|
| 530 |
+
className="flex items-center justify-between p-3 mb-2 bg-green-50 dark:bg-green-900/20 rounded-lg border border-green-200 dark:border-green-800"
|
| 531 |
+
initial={{ opacity: 0, height: 0 }}
|
| 532 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 533 |
+
exit={{ opacity: 0, height: 0 }}
|
| 534 |
+
transition={{ duration: 0.3 }}
|
| 535 |
+
>
|
| 536 |
+
<div className="flex items-center">
|
| 537 |
+
<Check size={16} className="text-green-600 mr-3" />
|
| 538 |
+
<span className="completed-task">{task.text}</span>
|
| 539 |
+
</div>
|
| 540 |
+
<button
|
| 541 |
+
className="text-gray-400 hover:text-red-500"
|
| 542 |
+
onClick={() => deleteDailyTask(task.id)}
|
| 543 |
+
>
|
| 544 |
+
<X size={16} />
|
| 545 |
+
</button>
|
| 546 |
+
</motion.div>
|
| 547 |
+
))}
|
| 548 |
+
</AnimatePresence>
|
| 549 |
+
</div>
|
| 550 |
+
)}
|
| 551 |
+
</div>
|
| 552 |
+
|
| 553 |
+
{/* Yearly Goals */}
|
| 554 |
+
<div className="shadcn-card">
|
| 555 |
+
<div className="flex justify-between items-center mb-4">
|
| 556 |
+
<h2 className="text-xl font-bold flex items-center">
|
| 557 |
+
<Target className="mr-2" size={20} />
|
| 558 |
+
End-of-Year Goals
|
| 559 |
+
</h2>
|
| 560 |
+
<button
|
| 561 |
+
className="shadcn-button shadcn-button-secondary p-2"
|
| 562 |
+
onClick={() => setShowAddYearly(true)}
|
| 563 |
+
>
|
| 564 |
+
<Plus size={16} />
|
| 565 |
+
</button>
|
| 566 |
+
</div>
|
| 567 |
+
|
| 568 |
+
{showAddYearly && (
|
| 569 |
+
<motion.div
|
| 570 |
+
className="mb-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg"
|
| 571 |
+
initial={{ opacity: 0, height: 0 }}
|
| 572 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 573 |
+
exit={{ opacity: 0, height: 0 }}
|
| 574 |
+
>
|
| 575 |
+
<input
|
| 576 |
+
type="text"
|
| 577 |
+
className="shadcn-input mb-2"
|
| 578 |
+
placeholder="Enter yearly goal"
|
| 579 |
+
value={newYearlyGoal}
|
| 580 |
+
onChange={(e) => setNewYearlyGoal(e.target.value)}
|
| 581 |
+
onKeyPress={(e) => e.key === 'Enter' && addYearlyGoal()}
|
| 582 |
+
/>
|
| 583 |
+
<div className="flex space-x-2">
|
| 584 |
+
<button
|
| 585 |
+
className="shadcn-button shadcn-button-secondary flex-1"
|
| 586 |
+
onClick={addYearlyGoal}
|
| 587 |
+
>
|
| 588 |
+
Add Goal
|
| 589 |
+
</button>
|
| 590 |
+
<button
|
| 591 |
+
className="shadcn-button bg-gray-300 dark:bg-gray-600 flex-1"
|
| 592 |
+
onClick={() => setShowAddYearly(false)}
|
| 593 |
+
>
|
| 594 |
+
Cancel
|
| 595 |
+
</button>
|
| 596 |
+
</div>
|
| 597 |
+
</motion.div>
|
| 598 |
+
)}
|
| 599 |
+
|
| 600 |
+
<AnimatePresence>
|
| 601 |
+
{yearlyGoals.filter(goal => !goal.completed).map((goal) => (
|
| 602 |
+
<motion.div
|
| 603 |
+
key={goal.id}
|
| 604 |
+
className="flex items-center justify-between p-3 mb-2 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"
|
| 605 |
+
initial={{ opacity: 0, y: -10 }}
|
| 606 |
+
animate={{ opacity: 1, y: 0 }}
|
| 607 |
+
exit={{ opacity: 0, y: -10 }}
|
| 608 |
+
transition={{ duration: 0.2 }}
|
| 609 |
+
>
|
| 610 |
+
<div className="flex items-center">
|
| 611 |
+
<button
|
| 612 |
+
className="w-5 h-5 rounded border border-gray-300 dark:border-gray-600 mr-3 flex items-center justify-center hover:bg-primary-50 dark:hover:bg-primary-900"
|
| 613 |
+
onClick={() => toggleYearlyGoal(goal.id)}
|
| 614 |
+
>
|
| 615 |
+
{goal.completed && <Check size={14} className="text-primary-600" />}
|
| 616 |
+
</button>
|
| 617 |
+
<span>{goal.text}</span>
|
| 618 |
+
</div>
|
| 619 |
+
<button
|
| 620 |
+
className="text-gray-400 hover:text-red-500"
|
| 621 |
+
onClick={() => deleteYearlyGoal(goal.id)}
|
| 622 |
+
>
|
| 623 |
+
<X size={16} />
|
| 624 |
+
</button>
|
| 625 |
+
</motion.div>
|
| 626 |
+
))}
|
| 627 |
+
</AnimatePresence>
|
| 628 |
+
|
| 629 |
+
{yearlyGoals.filter(goal => goal.completed).length > 0 && (
|
| 630 |
+
<div className="mt-4">
|
| 631 |
+
<h3 className="text-sm font-medium mb-2 text-gray-500 dark:text-gray-400 flex items-center">
|
| 632 |
+
<Trophy className="mr-1" size={16} /> Completed Goals
|
| 633 |
+
</h3>
|
| 634 |
+
<AnimatePresence>
|
| 635 |
+
{yearlyGoals.filter(goal => goal.completed).map((goal) => (
|
| 636 |
+
<motion.div
|
| 637 |
+
key={goal.id}
|
| 638 |
+
className="flex items-center justify-between p-3 mb-2 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg border border-yellow-200 dark:border-yellow-800"
|
| 639 |
+
initial={{ opacity: 0, height: 0 }}
|
| 640 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 641 |
+
exit={{ opacity: 0, height: 0 }}
|
| 642 |
+
transition={{ duration: 0.3 }}
|
| 643 |
+
>
|
| 644 |
+
<div className="flex items-center">
|
| 645 |
+
<Check size={16} className="text-yellow-600 mr-3" />
|
| 646 |
+
<span className="completed-task">{goal.text}</span>
|
| 647 |
+
</div>
|
| 648 |
+
<button
|
| 649 |
+
className="text-gray-400 hover:text-red-500"
|
| 650 |
+
onClick={() => deleteYearlyGoal(goal.id)}
|
| 651 |
+
>
|
| 652 |
+
<X size={16} />
|
| 653 |
+
</button>
|
| 654 |
+
</motion.div>
|
| 655 |
+
))}
|
| 656 |
+
</AnimatePresence>
|
| 657 |
+
</div>
|
| 658 |
+
)}
|
| 659 |
+
</div>
|
| 660 |
+
</div>
|
| 661 |
+
);
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
// Analytics component
|
| 665 |
+
function Analytics({ dailyTasks, yearlyGoals }) {
|
| 666 |
+
const completedYearly = yearlyGoals.filter(g => g.completed).length;
|
| 667 |
+
const totalYearly = yearlyGoals.length;
|
| 668 |
+
const yearlyPercentage = totalYearly > 0 ? (completedYearly / totalYearly) * 100 : 0;
|
| 669 |
+
|
| 670 |
+
// Last 7 days completion rate
|
| 671 |
+
const last7Days = Array.from({ length: 7 }, (_, i) => {
|
| 672 |
+
const date = new Date();
|
| 673 |
+
date.setDate(date.getDate() - i);
|
| 674 |
+
return date.toDateString();
|
| 675 |
+
});
|
| 676 |
+
|
| 677 |
+
const weeklyData = last7Days.map(date => {
|
| 678 |
+
const completed = dailyTasks.filter(task =>
|
| 679 |
+
new Date(task.date).toDateString() === date && task.completed
|
| 680 |
+
).length;
|
| 681 |
+
const total = dailyTasks.filter(task =>
|
| 682 |
+
new Date(task.date).toDateString() === date
|
| 683 |
+
).length;
|
| 684 |
+
|
| 685 |
+
return {
|
| 686 |
+
date: date.slice(0, 3),
|
| 687 |
+
completionRate: total > 0 ? (completed / total) * 100 : 0,
|
| 688 |
+
completed,
|
| 689 |
+
total
|
| 690 |
+
};
|
| 691 |
+
}).reverse();
|
| 692 |
+
|
| 693 |
+
const motivationalMessages = [
|
| 694 |
+
"You're on a roll! Keep it up!",
|
| 695 |
+
"Consistency is key - great job!",
|
| 696 |
+
"Every task completed brings you closer to your goals!",
|
| 697 |
+
"You're making amazing progress!",
|
| 698 |
+
"Just a few more tasks to complete your day!",
|
| 699 |
+
"Your dedication is inspiring!",
|
| 700 |
+
"Small steps lead to big achievements!"
|
| 701 |
+
];
|
| 702 |
+
|
| 703 |
+
const randomMessage = motivationalMessages[Math.floor(Math.random() * motivationalMessages.length)];
|
| 704 |
+
|
| 705 |
+
return (
|
| 706 |
+
<div className="shadcn-card mb-8">
|
| 707 |
+
<h2 className="text-xl font-bold mb-4 flex items-center">
|
| 708 |
+
<BarChart3 className="mr-2" size={20} />
|
| 709 |
+
Progress Analytics
|
| 710 |
+
</h2>
|
| 711 |
+
|
| 712 |
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
| 713 |
+
{/* Yearly Goals Progress */}
|
| 714 |
+
<div>
|
| 715 |
+
<h3 className="text-lg font-semibold mb-2">Yearly Goals</h3>
|
| 716 |
+
<div className="w-full bg-gray-200 rounded-full h-4 dark:bg-gray-700 mb-2">
|
| 717 |
+
<div
|
| 718 |
+
className="h-4 rounded-full bg-primary-500 transition-all duration-500"
|
| 719 |
+
style={{ width: `${yearlyPercentage}%` }}
|
| 720 |
+
/>
|
| 721 |
+
</div>
|
| 722 |
+
<p className="text-sm text-gray-600 dark:text-gray-400">
|
| 723 |
+
{completedYearly} of {totalYearly} goals completed ({yearlyPercentage.toFixed(1)}%)
|
| 724 |
+
</p>
|
| 725 |
+
</div>
|
| 726 |
+
|
| 727 |
+
{/* Weekly Completion */}
|
| 728 |
+
<div>
|
| 729 |
+
<h3 className="text-lg font-semibold mb-2">Weekly Performance</h3>
|
| 730 |
+
<ResponsiveContainer width="100%" height={100}>
|
| 731 |
+
<BarChart data={weeklyData}>
|
| 732 |
+
<Bar dataKey="completionRate" fill="#0ea5e9" radius={[4, 4, 0, 0]} />
|
| 733 |
+
<XAxis dataKey="date" />
|
| 734 |
+
<YAxis domain={[0, 100]} />
|
| 735 |
+
</BarChart>
|
| 736 |
+
</ResponsiveContainer>
|
| 737 |
+
</div>
|
| 738 |
+
</div>
|
| 739 |
+
|
| 740 |
+
{/* Motivational Message */}
|
| 741 |
+
<div className="bg-primary-50 dark:bg-primary-900/30 p-4 rounded-lg border border-primary-200 dark:border-primary-800">
|
| 742 |
+
<p className="text-primary-800 dark:text-primary-200 text-center italic">
|
| 743 |
+
{randomMessage}
|
| 744 |
+
</p>
|
| 745 |
+
</div>
|
| 746 |
+
</div>
|
| 747 |
+
);
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
// Theme Toggle
|
| 751 |
+
function ThemeToggle() {
|
| 752 |
+
const [isDark, setIsDark] = useState(() => {
|
| 753 |
+
return localStorage.getItem('theme') === 'dark' ||
|
| 754 |
+
(window.matchMedia('(prefers-color-scheme: dark)').matches && !localStorage.getItem('theme'));
|
| 755 |
+
});
|
| 756 |
+
|
| 757 |
+
useEffect(() => {
|
| 758 |
+
if (isDark) {
|
| 759 |
+
document.documentElement.classList.add('dark');
|
| 760 |
+
localStorage.setItem('theme', 'dark');
|
| 761 |
+
} else {
|
| 762 |
+
document.documentElement.classList.remove('dark');
|
| 763 |
+
localStorage.setItem('theme', 'light');
|
| 764 |
+
}
|
| 765 |
+
}, [isDark]);
|
| 766 |
+
|
| 767 |
+
return (
|
| 768 |
+
<button
|
| 769 |
+
className="fixed top-4 right-4 p-2 rounded-lg bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-lg"
|
| 770 |
+
onClick={() => setIsDark(!isDark)}
|
| 771 |
+
>
|
| 772 |
+
{isDark ? <Sun size={20} /> : <Moon size={20} />}
|
| 773 |
+
</button>
|
| 774 |
+
);
|
| 775 |
+
}
|
| 776 |
+
|
| 777 |
+
// Main App Component
|
| 778 |
+
function App() {
|
| 779 |
+
const [dailyTasks] = useLocalStorage('dailyTasks', []);
|
| 780 |
+
const [yearlyGoals] = useLocalStorage('yearlyGoals', []);
|
| 781 |
+
|
| 782 |
+
return (
|
| 783 |
+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 transition-colors duration-200">
|
| 784 |
+
<div className="container mx-auto px-4 py-8 max-w-6xl">
|
| 785 |
+
<motion.header
|
| 786 |
+
className="text-center mb-8"
|
| 787 |
+
initial={{ opacity: 0, y: -20 }}
|
| 788 |
+
animate={{ opacity: 1, y: 0 }}
|
| 789 |
+
transition={{ duration: 0.5 }}
|
| 790 |
+
>
|
| 791 |
+
<h1 className="text-4xl font-bold mb-2 bg-gradient-to-r from-primary-600 to-secondary-600 bg-clip-text text-transparent">
|
| 792 |
+
YearEndQuest Tracker
|
| 793 |
+
</h1>
|
| 794 |
+
<p className="text-gray-600 dark:text-gray-400 mb-4">
|
| 795 |
+
Make the most of the remaining days this year
|
| 796 |
+
</p>
|
| 797 |
+
<div className="flex justify-center space-x-4">
|
| 798 |
+
<a href="portfolio.html" className="shadcn-button shadcn-button-primary px-6 py-3">
|
| 799 |
+
View Portfolio
|
| 800 |
+
</a>
|
| 801 |
+
</motion.header>
|
| 802 |
+
|
| 803 |
+
<Countdown />
|
| 804 |
+
<ProgressBar />
|
| 805 |
+
<YearGrid dailyTasks={dailyTasks} />
|
| 806 |
+
<TaskManager />
|
| 807 |
+
<Analytics dailyTasks={dailyTasks} yearlyGoals={yearlyGoals} />
|
| 808 |
+
<ThemeToggle />
|
| 809 |
+
</div>
|
| 810 |
+
</div>
|
| 811 |
+
);
|
| 812 |
+
}
|
| 813 |
+
|
| 814 |
+
// Render the app
|
| 815 |
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
| 816 |
+
root.render(<App />);
|
| 817 |
+
|
| 818 |
+
// Initialize feather icons
|
| 819 |
+
feather.replace();
|
| 820 |
+
</script>
|
| 821 |
+
</body>
|
| 822 |
</html>
|
| 823 |
+
</body>
|
| 824 |
+
</html>
|
portfolio.html
ADDED
|
@@ -0,0 +1,590 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
| 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>ByteWizard - Full Stack Developer</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 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://cdn.jsdelivr.net/npm/animejs/lib/anime.iife.min.js"></script>
|
| 11 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 12 |
+
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
| 13 |
+
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
| 14 |
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
| 15 |
+
<script src="https://unpkg.com/framer-motion@10.16.4/dist/framer-motion.js"></script>
|
| 16 |
+
<script src="https://unpkg.com/lucide-react@0.263.1/dist/umd/lucide-react.js"></script>
|
| 17 |
+
<style>
|
| 18 |
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');
|
| 19 |
+
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
|
| 20 |
+
|
| 21 |
+
* {
|
| 22 |
+
font-family: 'JetBrains Mono', monospace;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
body {
|
| 26 |
+
background: #0a0a0a;
|
| 27 |
+
color: #00ff41;
|
| 28 |
+
overflow-x: hidden;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.matrix-bg {
|
| 32 |
+
position: fixed;
|
| 33 |
+
top: 0;
|
| 34 |
+
left: 0;
|
| 35 |
+
width: 100%;
|
| 36 |
+
height: 100%;
|
| 37 |
+
pointer-events: none;
|
| 38 |
+
z-index: -1;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.glitch-text {
|
| 42 |
+
position: relative;
|
| 43 |
+
display: inline-block;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.glitch-text::before,
|
| 47 |
+
.glitch-text::after {
|
| 48 |
+
content: attr(data-text);
|
| 49 |
+
position: absolute;
|
| 50 |
+
top: 0;
|
| 51 |
+
left: 0;
|
| 52 |
+
width: 100%;
|
| 53 |
+
height: 100%;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.glitch-text::before {
|
| 57 |
+
left: 2px;
|
| 58 |
+
text-shadow: -1px 0 #ff0080;
|
| 59 |
+
clip: rect(44px, 450px, 56px, 0);
|
| 60 |
+
animation: glitch-anim 5s infinite linear alternate-reverse;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.glitch-text::after {
|
| 64 |
+
left: -2px;
|
| 65 |
+
text-shadow: -1px 0 #00ffff;
|
| 66 |
+
clip: rect(44px, 450px, 56px, 0);
|
| 67 |
+
animation: glitch-anim2 5s infinite linear alternate-reverse;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
@keyframes glitch-anim {
|
| 71 |
+
0% { clip: rect(42px, 9999px, 44px, 0); }
|
| 72 |
+
5% { clip: rect(12px, 9999px, 59px, 0); }
|
| 73 |
+
10% { clip: rect(48px, 9999px, 29px, 0); }
|
| 74 |
+
15% { clip: rect(42px, 9999px, 38px, 0); }
|
| 75 |
+
20% { clip: rect(15px, 9999px, 36px, 0); }
|
| 76 |
+
25% { clip: rect(14px, 9999px, 40px, 0); }
|
| 77 |
+
30% { clip: rect(50px, 9999px, 5px, 0); }
|
| 78 |
+
35% { clip: rect(53px, 9999px, 27px, 0); }
|
| 79 |
+
40% { clip: rect(31px, 9999px, 28px, 0); }
|
| 80 |
+
45% { clip: rect(14px, 9999px, 53px, 0); }
|
| 81 |
+
50% { clip: rect(35px, 9999px, 9px, 0); }
|
| 82 |
+
55% { clip: rect(55px, 9999px, 40px, 0); }
|
| 83 |
+
60% { clip: rect(46px, 9999px, 16px, 0); }
|
| 84 |
+
65% { clip: rect(10px, 9999px, 2px, 0); }
|
| 85 |
+
70% { clip: rect(5px, 9999px, 46px, 0); }
|
| 86 |
+
75% { clip: rect(14px, 9999px, 39px, 0); }
|
| 87 |
+
80% { clip: rect(14px, 9999px, 33px, 0); }
|
| 88 |
+
85% { clip: rect(27px, 9999px, 29px, 0); }
|
| 89 |
+
90% { clip: rect(48px, 9999px, 2px, 0); }
|
| 90 |
+
95% { clip: rect(33px, 9999px, 17px, 0); }
|
| 91 |
+
100% { clip: rect(36px, 9999px, 54px, 0); }
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
@keyframes glitch-anim2 {
|
| 95 |
+
0% { clip: rect(65px, 9999px, 34px, 0); }
|
| 96 |
+
5% { clip: rect(26px, 9999px, 50px, 0); }
|
| 97 |
+
10% { clip: rect(85px, 9999px, 15px, 0); }
|
| 98 |
+
15% { clip: rect(91px, 9999px, 58px, 0); }
|
| 99 |
+
20% { clip: rect(85px, 9999px, 53px, 0); }
|
| 100 |
+
25% { clip: rect(6px, 9999px, 85px, 0); }
|
| 101 |
+
30% { clip: rect(16px, 9999px, 14px, 0); }
|
| 102 |
+
35% { clip: rect(87px, 9999px, 94px, 0); }
|
| 103 |
+
40% { clip: rect(23px, 9999px, 49px, 0); }
|
| 104 |
+
45% { clip: rect(50px, 9999px, 6px, 0); }
|
| 105 |
+
50% { clip: rect(64px, 9999px, 1px, 0); }
|
| 106 |
+
55% { clip: rect(48px, 9999px, 77px, 0); }
|
| 107 |
+
60% { clip: rect(14px, 9999px, 79px, 0); }
|
| 108 |
+
65% { clip: rect(63px, 9999px, 81px, 0); }
|
| 109 |
+
70% { clip: rect(23px, 9999px, 91px, 0); }
|
| 110 |
+
75% { clip: rect(32px, 9999px, 48px, 0); }
|
| 111 |
+
80% { clip: rect(66px, 9999px, 68px, 0); }
|
| 112 |
+
85% { clip: rect(66px, 9999px, 88px, 0); }
|
| 113 |
+
90% { clip: rect(83px, 9999px, 13px, 0); }
|
| 114 |
+
95% { clip: rect(85px, 9999px, 97px, 0); }
|
| 115 |
+
100% { clip: rect(72px, 9999px, 42px, 0); }
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.terminal {
|
| 119 |
+
background: rgba(0, 0, 0, 0.9);
|
| 120 |
+
border: 1px solid #00ff41;
|
| 121 |
+
border-radius: 8px;
|
| 122 |
+
padding: 20px;
|
| 123 |
+
font-family: 'Share Tech Mono', monospace;
|
| 124 |
+
position: relative;
|
| 125 |
+
overflow: hidden;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.terminal::before {
|
| 129 |
+
content: '';
|
| 130 |
+
position: absolute;
|
| 131 |
+
top: 0;
|
| 132 |
+
left: 0;
|
| 133 |
+
right: 0;
|
| 134 |
+
bottom: 0;
|
| 135 |
+
background: linear-gradient(transparent 50%, rgba(0, 255, 65, 0.1) 50%);
|
| 136 |
+
background-size: 100% 4px;
|
| 137 |
+
z-index: 1;
|
| 138 |
+
pointer-events: none;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.command-line {
|
| 142 |
+
color: #00ff41;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.cursor {
|
| 146 |
+
display: inline-block;
|
| 147 |
+
width: 8px;
|
| 148 |
+
height: 16px;
|
| 149 |
+
background: #00ff41;
|
| 150 |
+
animation: blink 1s infinite;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
@keyframes blink {
|
| 154 |
+
0%, 100% { opacity: 1; }
|
| 155 |
+
50% { opacity: 0; }
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.hacker-card {
|
| 159 |
+
background: rgba(0, 20, 0, 0.8);
|
| 160 |
+
border: 1px solid #00ff41;
|
| 161 |
+
border-radius: 8px;
|
| 162 |
+
padding: 20px;
|
| 163 |
+
position: relative;
|
| 164 |
+
overflow: hidden;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.hacker-card::before {
|
| 168 |
+
content: '';
|
| 169 |
+
position: absolute;
|
| 170 |
+
top: 0;
|
| 171 |
+
left: 0;
|
| 172 |
+
right: 0;
|
| 173 |
+
bottom: 0;
|
| 174 |
+
background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 65, 0.1));
|
| 175 |
+
z-index: 0;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.skill-bar {
|
| 179 |
+
height: 8px;
|
| 180 |
+
background: #003300;
|
| 181 |
+
border-radius: 4px;
|
| 182 |
+
overflow: hidden;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.skill-progress {
|
| 186 |
+
height: 100%;
|
| 187 |
+
background: linear-gradient(90deg, #00ff41, #00cc33);
|
| 188 |
+
transition: width 2s ease-in-out;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
.matrix-char {
|
| 192 |
+
position: absolute;
|
| 193 |
+
color: #00ff41;
|
| 194 |
+
font-family: 'Share Tech Mono', monospace;
|
| 195 |
+
opacity: 0.8;
|
| 196 |
+
animation: matrix-fall linear infinite;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
@keyframes matrix-fall {
|
| 200 |
+
0% { transform: translateY(-100px); opacity: 0; }
|
| 201 |
+
10% { opacity: 1; }
|
| 202 |
+
90% { opacity: 1; }
|
| 203 |
+
100% { transform: translateY(100vh); opacity: 0; }
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
.typewriter {
|
| 207 |
+
overflow: hidden;
|
| 208 |
+
border-right: 2px solid #00ff41;
|
| 209 |
+
white-space: nowrap;
|
| 210 |
+
animation: typing 3.5s steps(40, end);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
@keyframes typing {
|
| 214 |
+
from { width: 0 }
|
| 215 |
+
to { width: 100% }
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
.hacker-nav {
|
| 219 |
+
background: rgba(0, 20, 0, 0.9);
|
| 220 |
+
backdrop-filter: blur(10px);
|
| 221 |
+
border-bottom: 1px solid #00ff41;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
.project-grid {
|
| 225 |
+
display: grid;
|
| 226 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 227 |
+
gap: 20px;
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
.project-card {
|
| 231 |
+
background: rgba(0, 30, 0, 0.6);
|
| 232 |
+
border: 1px solid #00ff41;
|
| 233 |
+
border-radius: 8px;
|
| 234 |
+
padding: 20px;
|
| 235 |
+
transition: all 0.3s ease;
|
| 236 |
+
position: relative;
|
| 237 |
+
overflow: hidden;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.project-card:hover {
|
| 241 |
+
transform: translateY(-5px);
|
| 242 |
+
box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
.project-card::before {
|
| 246 |
+
content: '';
|
| 247 |
+
position: absolute;
|
| 248 |
+
top: 0;
|
| 249 |
+
left: -100%;
|
| 250 |
+
width: 100%;
|
| 251 |
+
height: 100%;
|
| 252 |
+
background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
|
| 253 |
+
animation: scan 3s linear infinite;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
@keyframes scan {
|
| 257 |
+
0% { left: -100%; }
|
| 258 |
+
100% { left: 100%; }
|
| 259 |
+
}
|
| 260 |
+
</style>
|
| 261 |
+
</head>
|
| 262 |
+
<body class="bg-black text-green-400">
|
| 263 |
+
<!-- Matrix Background -->
|
| 264 |
+
<div id="matrix-bg" class="matrix-bg"></div>
|
| 265 |
+
|
| 266 |
+
<!-- Navigation -->
|
| 267 |
+
<nav class="hacker-nav fixed w-full z-50">
|
| 268 |
+
<div class="container mx-auto px-4 py-4">
|
| 269 |
+
<div class="flex justify-between items-center">
|
| 270 |
+
<div class="glitch-text text-xl font-bold" data-text="BYTEWIZARD">BYTEWIZARD</div>
|
| 271 |
+
<div class="flex space-x-6">
|
| 272 |
+
<a href="#about" class="hover:text-green-200 transition-colors">[ABOUT]</a>
|
| 273 |
+
<a href="#skills" class="hover:text-green-200 transition-colors">[SKILLS]</a>
|
| 274 |
+
<a href="#projects" class="hover:text-green-200 transition-colors">[PROJECTS]</a>
|
| 275 |
+
<a href="#contact" class="hover:text-green-200 transition-colors">[CONTACT]</a>
|
| 276 |
+
</div>
|
| 277 |
+
</div>
|
| 278 |
+
</div>
|
| 279 |
+
</nav>
|
| 280 |
+
|
| 281 |
+
<!-- Hero Section -->
|
| 282 |
+
<section class="min-h-screen flex items-center justify-center relative pt-16">
|
| 283 |
+
<div class="container mx-auto px-4 text-center">
|
| 284 |
+
<motion.div
|
| 285 |
+
initial={{ opacity: 0, y: 50 }}
|
| 286 |
+
animate={{ opacity: 1, y: 0 }}
|
| 287 |
+
transition={{ duration: 1 }}
|
| 288 |
+
class="terminal max-w-4xl mx-auto"
|
| 289 |
+
>
|
| 290 |
+
<div class="text-left">
|
| 291 |
+
<div class="command-line mb-4">
|
| 292 |
+
<span class="text-green-300">root@bytewizard:~$</span> whoami
|
| 293 |
+
</div>
|
| 294 |
+
<div class="text-4xl md:text-6xl font-bold mb-4 typewriter">
|
| 295 |
+
<span class="glitch-text" data-text="BYTEWIZARD">BYTEWIZARD</div>
|
| 296 |
+
<div class="command-line mb-4">
|
| 297 |
+
<span class="text-green-300">root@bytewizard:~$</span> cat bio.txt
|
| 298 |
+
</div>
|
| 299 |
+
<div class="text-lg md:text-xl mb-6">
|
| 300 |
+
<span class="text-green-200">></span> FULL STACK DEVELOPER & CYBER SECURITY ENTHUSIAST
|
| 301 |
+
</div>
|
| 302 |
+
<div class="command-line">
|
| 303 |
+
<span class="text-green-300">root@bytewizard:~$</span> _
|
| 304 |
+
<span class="cursor"></span>
|
| 305 |
+
</div>
|
| 306 |
+
</div>
|
| 307 |
+
</motion.div>
|
| 308 |
+
</div>
|
| 309 |
+
</section>
|
| 310 |
+
|
| 311 |
+
<!-- About Section -->
|
| 312 |
+
<section id="about" class="py-20">
|
| 313 |
+
<div class="container mx-auto px-4">
|
| 314 |
+
<h2 class="text-3xl font-bold mb-8 text-center">[ABOUT_ME]</h2>
|
| 315 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 316 |
+
<div class="hacker-card">
|
| 317 |
+
<h3 class="text-xl font-bold mb-4 text-green-300">SYSTEM_INFO</h3>
|
| 318 |
+
<div class="space-y-2">
|
| 319 |
+
<div><span class="text-green-200">NAME:</span> ByteWizard</div>
|
| 320 |
+
<div><span class="text-green-200">ROLE:</span> Full Stack Developer</div>
|
| 321 |
+
<div><span class="text-green-200">LOCATION:</span> Digital Realm</div>
|
| 322 |
+
<div><span class="text-green-200">SPECIALTY:</span> Breaking & Building Systems</div>
|
| 323 |
+
<div><span class="text-green-200">STATUS:</span> <span class="text-green-400">ACTIVE</span></div>
|
| 324 |
+
</div>
|
| 325 |
+
</div>
|
| 326 |
+
<div class="hacker-card">
|
| 327 |
+
<h3 class="text-xl font-bold mb-4 text-green-300">MISSION</h3>
|
| 328 |
+
<p class="text-green-200 leading-relaxed">
|
| 329 |
+
I specialize in creating robust, scalable applications while maintaining
|
| 330 |
+
security-first principles. My code doesn't just work鈥攊t withstands.
|
| 331 |
+
</p>
|
| 332 |
+
</div>
|
| 333 |
+
</div>
|
| 334 |
+
</section>
|
| 335 |
+
|
| 336 |
+
<!-- Skills Section -->
|
| 337 |
+
<section id="skills" class="py-20 bg-gray-900">
|
| 338 |
+
<div class="container mx-auto px-4">
|
| 339 |
+
<h2 class="text-3xl font-bold mb-8 text-center">[TECH_STACK]</h2>
|
| 340 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 341 |
+
<div class="hacker-card">
|
| 342 |
+
<h3 class="text-xl font-bold mb-4 text-green-300">FRONTEND_WEAPONS</h3>
|
| 343 |
+
<div class="space-y-4">
|
| 344 |
+
<div>
|
| 345 |
+
<div class="flex justify-between mb-1">
|
| 346 |
+
<span>React.js</span>
|
| 347 |
+
<span>95%</span>
|
| 348 |
+
</div>
|
| 349 |
+
<div class="skill-bar">
|
| 350 |
+
<div class="skill-progress" style="width: 95%"></div>
|
| 351 |
+
</div>
|
| 352 |
+
<div>
|
| 353 |
+
<div class="flex justify-between mb-1">
|
| 354 |
+
<span>TypeScript</span>
|
| 355 |
+
<span>90%</span>
|
| 356 |
+
</div>
|
| 357 |
+
<div class="skill-bar">
|
| 358 |
+
<div class="skill-progress" style="width: 90%"></div>
|
| 359 |
+
</div>
|
| 360 |
+
<div>
|
| 361 |
+
<div class="flex justify-between mb-1">
|
| 362 |
+
<span>Next.js</span>
|
| 363 |
+
<span>88%</span>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
<div class="hacker-card">
|
| 368 |
+
<h3 class="text-xl font-bold mb-4 text-green-300">BACKEND_ARTILLERY</h3>
|
| 369 |
+
<div class="space-y-4">
|
| 370 |
+
<div>
|
| 371 |
+
<div class="flex justify-between mb-1">
|
| 372 |
+
<span>Node.js</span>
|
| 373 |
+
<span>92%</span>
|
| 374 |
+
</div>
|
| 375 |
+
<div class="skill-bar">
|
| 376 |
+
<div class="skill-progress" style="width: 92%"></div>
|
| 377 |
+
</div>
|
| 378 |
+
<div>
|
| 379 |
+
<div class="flex justify-between mb-1">
|
| 380 |
+
<span>Python</span>
|
| 381 |
+
<span>85%</span>
|
| 382 |
+
</div>
|
| 383 |
+
<div class="skill-bar">
|
| 384 |
+
<div class="skill-progress" style="width: 85%"></div>
|
| 385 |
+
</div>
|
| 386 |
+
<div>
|
| 387 |
+
<div class="flex justify-between mb-1">
|
| 388 |
+
<span>PostgreSQL</span>
|
| 389 |
+
<span>88%</span>
|
| 390 |
+
</div>
|
| 391 |
+
</div>
|
| 392 |
+
</div>
|
| 393 |
+
</div>
|
| 394 |
+
</div>
|
| 395 |
+
</section>
|
| 396 |
+
|
| 397 |
+
<!-- Projects Section -->
|
| 398 |
+
<section id="projects" class="py-20">
|
| 399 |
+
<div class="container mx-auto px-4">
|
| 400 |
+
<h2 class="text-3xl font-bold mb-8 text-center">[OPERATIONS]</h2>
|
| 401 |
+
<div class="project-grid">
|
| 402 |
+
<div class="project-card">
|
| 403 |
+
<h3 class="text-xl font-bold mb-2 text-green-300">CRYPTO_VAULT</h3>
|
| 404 |
+
<p class="text-green-200 mb-4">
|
| 405 |
+
Secure cryptocurrency wallet with multi-signature authentication
|
| 406 |
+
and zero-knowledge proofs for enhanced privacy.
|
| 407 |
+
</p>
|
| 408 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 409 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 410 |
+
React
|
| 411 |
+
</span>
|
| 412 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 413 |
+
Node.js
|
| 414 |
+
</span>
|
| 415 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 416 |
+
Blockchain
|
| 417 |
+
</span>
|
| 418 |
+
</div>
|
| 419 |
+
<button class="px-4 py-2 bg-green-900 border border-green-700 rounded hover:bg-green-800 transition-colors">
|
| 420 |
+
ACCESS_PROJECT
|
| 421 |
+
</button>
|
| 422 |
+
</div>
|
| 423 |
+
|
| 424 |
+
<div class="project-card">
|
| 425 |
+
<h3 class="text-xl font-bold mb-2 text-green-300">CYBER_DASH</h3>
|
| 426 |
+
<p class="text-green-200 mb-4">
|
| 427 |
+
Real-time cybersecurity dashboard monitoring network traffic,
|
| 428 |
+
threat detection, and system vulnerabilities.
|
| 429 |
+
</p>
|
| 430 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 431 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 432 |
+
Next.js
|
| 433 |
+
</span>
|
| 434 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 435 |
+
TypeScript
|
| 436 |
+
</span>
|
| 437 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 438 |
+
WebSocket
|
| 439 |
+
</span>
|
| 440 |
+
</div>
|
| 441 |
+
<button class="px-4 py-2 bg-green-900 border border-green-700 rounded hover:bg-green-800 transition-colors">
|
| 442 |
+
ACCESS_PROJECT
|
| 443 |
+
</button>
|
| 444 |
+
</div>
|
| 445 |
+
|
| 446 |
+
<div class="project-card">
|
| 447 |
+
<h3 class="text-xl font-bold mb-2 text-green-300">AI_CODER</h3>
|
| 448 |
+
<p class="text-green-200 mb-4">
|
| 449 |
+
Intelligent code assistant leveraging machine learning
|
| 450 |
+
to suggest optimizations and detect security vulnerabilities.
|
| 451 |
+
</p>
|
| 452 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 453 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 454 |
+
Python
|
| 455 |
+
</span>
|
| 456 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 457 |
+
TensorFlow
|
| 458 |
+
</span>
|
| 459 |
+
<span class="px-2 py-1 bg-green-900/30 border border-green-700 rounded text-sm">
|
| 460 |
+
FastAPI
|
| 461 |
+
</span>
|
| 462 |
+
</div>
|
| 463 |
+
<button class="px-4 py-2 bg-green-900 border border-green-700 rounded hover:bg-green-800 transition-colors">
|
| 464 |
+
ACCESS_PROJECT
|
| 465 |
+
</button>
|
| 466 |
+
</div>
|
| 467 |
+
</div>
|
| 468 |
+
</section>
|
| 469 |
+
|
| 470 |
+
<!-- Contact Section -->
|
| 471 |
+
<section id="contact" class="py-20 bg-gray-900">
|
| 472 |
+
<div class="container mx-auto px-4">
|
| 473 |
+
<h2 class="text-3xl font-bold mb-8 text-center">[ESTABLISH_CONNECTION]</h2>
|
| 474 |
+
<div class="max-w-2xl mx-auto">
|
| 475 |
+
<div class="hacker-card">
|
| 476 |
+
<h3 class="text-xl font-bold mb-4 text-green-300">CONTACT_PROTOCOL</h3>
|
| 477 |
+
<form class="space-y-4">
|
| 478 |
+
<div>
|
| 479 |
+
<label class="block text-green-200 mb-2">EMAIL:</label>
|
| 480 |
+
<input type="email" class="w-full px-3 py-2 bg-black border border-green-700 rounded focus:outline-none focus:ring-2 focus:ring-green-500" placeholder="user@domain.com">
|
| 481 |
+
</div>
|
| 482 |
+
<div>
|
| 483 |
+
<label class="block text-green-200 mb-2">MESSAGE:</label>
|
| 484 |
+
<textarea rows="4" class="w-full px-3 py-2 bg-black border border-green-700 rounded focus:outline-none focus:ring-2 focus:ring-green-500" placeholder="BEGIN_TRANSMISSION..."></textarea>
|
| 485 |
+
</div>
|
| 486 |
+
<button type="submit" class="px-6 py-3 bg-green-900 border border-green-700 rounded hover:bg-green-800 transition-colors">
|
| 487 |
+
SEND_PACKET
|
| 488 |
+
</button>
|
| 489 |
+
</form>
|
| 490 |
+
</div>
|
| 491 |
+
</div>
|
| 492 |
+
</section>
|
| 493 |
+
|
| 494 |
+
<!-- Footer -->
|
| 495 |
+
<footer class="py-8 border-t border-green-800">
|
| 496 |
+
<div class="container mx-auto px-4 text-center">
|
| 497 |
+
<div class="flex justify-center space-x-6 mb-4">
|
| 498 |
+
<a href="#" class="hover:text-green-200 transition-colors">GITHUB</a>
|
| 499 |
+
<a href="#" class="hover:text-green-200 transition-colors">LINKEDIN</a>
|
| 500 |
+
<a href="#" class="hover:text-green-200 transition-colors">TWITTER</a>
|
| 501 |
+
</div>
|
| 502 |
+
<p class="text-green-600 text-sm">
|
| 503 |
+
© 2024 BYTEWIZARD. ALL SYSTEMS OPERATIONAL.
|
| 504 |
+
</p>
|
| 505 |
+
</div>
|
| 506 |
+
</footer>
|
| 507 |
+
|
| 508 |
+
<script type="text/babel">
|
| 509 |
+
const { useState, useEffect, useRef } = React;
|
| 510 |
+
const { motion, AnimatePresence } = FramerMotion;
|
| 511 |
+
const { Code, Cpu, Shield, Zap, Terminal, Mail, Github, Linkedin, Twitter } = LucideReact;
|
| 512 |
+
|
| 513 |
+
// Matrix Background Effect
|
| 514 |
+
function MatrixBackground() {
|
| 515 |
+
const canvasRef = useRef(null);
|
| 516 |
+
|
| 517 |
+
useEffect(() => {
|
| 518 |
+
const canvas = canvasRef.current;
|
| 519 |
+
const ctx = canvas.getContext('2d');
|
| 520 |
+
|
| 521 |
+
// Set canvas size
|
| 522 |
+
canvas.width = window.innerWidth;
|
| 523 |
+
canvas.height = window.innerHeight;
|
| 524 |
+
|
| 525 |
+
const chars = "01銈€偆銈︺偍銈偒銈偗銈便偝銈点偡銈广偦銈姐偪銉併儎銉嗐儓銉娿儖銉屻儘銉庛儚銉掋儠銉樸儧銉炪儫銉犮儭銉€儰銉︺儴銉┿儶銉儸銉儻銉层兂";
|
| 526 |
+
const charArray = chars.split('');
|
| 527 |
+
const fontSize = 14;
|
| 528 |
+
const columns = canvas.width / fontSize;
|
| 529 |
+
const drops = Array(Math.floor(columns)).fill(1);
|
| 530 |
+
|
| 531 |
+
function draw() {
|
| 532 |
+
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)";
|
| 533 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 534 |
+
|
| 535 |
+
ctx.fillStyle = '#00ff41';
|
| 536 |
+
ctx.font = `${fontSize}px 'Share Tech Mono'`;
|
| 537 |
+
|
| 538 |
+
drops.forEach((drop, i) => {
|
| 539 |
+
const char = charArray[Math.floor(Math.random() * charArray.length)];
|
| 540 |
+
ctx.fillText(char, i * fontSize, drops[i] * fontSize);
|
| 541 |
+
|
| 542 |
+
if (drops[i] * fontSize > canvas.height && Math.random() > 0.975) {
|
| 543 |
+
drops[i] = 0;
|
| 544 |
+
}
|
| 545 |
+
drops[i]++;
|
| 546 |
+
});
|
| 547 |
+
}
|
| 548 |
+
|
| 549 |
+
const interval = setInterval(draw, 33);
|
| 550 |
+
|
| 551 |
+
return () => clearInterval(interval);
|
| 552 |
+
}, []);
|
| 553 |
+
|
| 554 |
+
return <canvas ref={canvasRef} className="matrix-bg" />;
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
// Typewriter Effect Component
|
| 558 |
+
function Typewriter({ text, speed = 50 }) {
|
| 559 |
+
const [displayText, setDisplayText] = useState('');
|
| 560 |
+
|
| 561 |
+
useEffect(() => {
|
| 562 |
+
let i = 0;
|
| 563 |
+
const timer = setInterval(() => {
|
| 564 |
+
if (i < text.length) {
|
| 565 |
+
setDisplayText(text.slice(0, i + 1));
|
| 566 |
+
i++;
|
| 567 |
+
}, speed);
|
| 568 |
+
|
| 569 |
+
return () => clearInterval(timer);
|
| 570 |
+
}, [text, speed]);
|
| 571 |
+
|
| 572 |
+
return <span>{displayText}</span>;
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
// Main App
|
| 576 |
+
function App() {
|
| 577 |
+
return (
|
| 578 |
+
<div className="relative">
|
| 579 |
+
<MatrixBackground />
|
| 580 |
+
{/* Content is already in the HTML above */}
|
| 581 |
+
</div>
|
| 582 |
+
);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
// Render the app
|
| 586 |
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
| 587 |
+
root.render(<App />);
|
| 588 |
+
</script>
|
| 589 |
+
</body>
|
| 590 |
+
</html>
|