Spaces:
Configuration error
Configuration error
Update index.html
Browse files- index.html +127 -274
index.html
CHANGED
|
@@ -1,299 +1,152 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="en"
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
theme: {
|
| 27 |
-
extend: {
|
| 28 |
-
fontFamily: {
|
| 29 |
-
inter: ['Inter', 'sans-serif'],
|
| 30 |
-
mono: ['JetBrains Mono', 'monospace']
|
| 31 |
-
}
|
| 32 |
}
|
| 33 |
-
}
|
| 34 |
-
}
|
| 35 |
-
</script>
|
| 36 |
-
</head>
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
</div>
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
<h2 class="text-5xl font-black leading-tight max-w-3xl">
|
| 68 |
-
Documenting My
|
| 69 |
-
<span class="gradient-text">
|
| 70 |
-
DSA Journey
|
| 71 |
-
</span>
|
| 72 |
-
</h2>
|
| 73 |
-
|
| 74 |
-
<p class="text-slate-400 mt-6 text-lg max-w-2xl">
|
| 75 |
-
Every problem includes intuition, explanation, dry run,
|
| 76 |
-
complexity analysis, and optimized solutions.
|
| 77 |
-
</p>
|
| 78 |
-
|
| 79 |
-
<!-- Progress -->
|
| 80 |
-
<div class="mt-10 max-w-xl">
|
| 81 |
-
|
| 82 |
-
<div class="flex justify-between mb-2">
|
| 83 |
-
<span>Programs Solved</span>
|
| 84 |
-
<span id="progressText">0/30</span>
|
| 85 |
-
</div>
|
| 86 |
-
|
| 87 |
-
<div class="w-full bg-white/10 rounded-full h-3 overflow-hidden">
|
| 88 |
-
<div id="progressBar"
|
| 89 |
-
class="bg-gradient-to-r from-cyan-400 to-violet-500 h-full rounded-full"
|
| 90 |
-
style="width:0%">
|
| 91 |
</div>
|
| 92 |
-
</div>
|
| 93 |
-
|
| 94 |
-
</div>
|
| 95 |
-
|
| 96 |
-
</section>
|
| 97 |
-
|
| 98 |
-
<!-- Controls -->
|
| 99 |
-
<section class="max-w-7xl mx-auto px-6 mb-10">
|
| 100 |
-
|
| 101 |
-
<input type="text"
|
| 102 |
-
id="searchInput"
|
| 103 |
-
placeholder="Search problems..."
|
| 104 |
-
class="w-full px-5 py-4 rounded-2xl bg-white/10 border border-white/10 outline-none focus:ring-2 focus:ring-cyan-400">
|
| 105 |
-
|
| 106 |
-
<div id="filterContainer"
|
| 107 |
-
class="flex flex-wrap gap-3 mt-5">
|
| 108 |
</div>
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
const grid = document.getElementById("problemGrid");
|
| 134 |
-
const searchInput = document.getElementById("searchInput");
|
| 135 |
-
const filterContainer = document.getElementById("filterContainer");
|
| 136 |
-
|
| 137 |
-
async function fetchProblems() {
|
| 138 |
-
|
| 139 |
-
const response = await fetch("./data.json");
|
| 140 |
-
problems = await response.json();
|
| 141 |
-
|
| 142 |
-
renderStats();
|
| 143 |
-
renderFilters();
|
| 144 |
-
renderProblems(problems);
|
| 145 |
-
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
function renderStats() {
|
| 149 |
-
|
| 150 |
-
const solved = problems.length;
|
| 151 |
-
const target = 30;
|
| 152 |
-
|
| 153 |
-
document.getElementById("progressText").textContent =
|
| 154 |
-
`${solved}/${target}`;
|
| 155 |
-
|
| 156 |
-
document.getElementById("progressBar").style.width =
|
| 157 |
-
`${(solved / target) * 100}%`;
|
| 158 |
-
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
function renderFilters() {
|
| 162 |
-
|
| 163 |
-
const topics =
|
| 164 |
-
[...new Set(problems.map(p => p.topic))];
|
| 165 |
-
|
| 166 |
-
const filters =
|
| 167 |
-
["All", "Easy", "Medium", "Hard", ...topics];
|
| 168 |
-
|
| 169 |
-
filters.forEach(filter => {
|
| 170 |
-
|
| 171 |
-
const btn = document.createElement("button");
|
| 172 |
-
|
| 173 |
-
btn.textContent = filter;
|
| 174 |
-
|
| 175 |
-
btn.className =
|
| 176 |
-
"px-4 py-2 rounded-full bg-white/10 hover:bg-cyan-500 transition";
|
| 177 |
-
|
| 178 |
-
btn.onclick = () => {
|
| 179 |
-
|
| 180 |
-
activeFilter = filter;
|
| 181 |
-
|
| 182 |
-
filterProblems();
|
| 183 |
-
|
| 184 |
}
|
| 185 |
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
}
|
| 191 |
-
|
| 192 |
-
function filterProblems() {
|
| 193 |
-
|
| 194 |
-
const search =
|
| 195 |
-
searchInput.value.toLowerCase();
|
| 196 |
-
|
| 197 |
-
const filtered = problems.filter(problem => {
|
| 198 |
-
|
| 199 |
-
const matchesSearch =
|
| 200 |
-
problem.title.toLowerCase().includes(search);
|
| 201 |
-
|
| 202 |
-
const matchesFilter =
|
| 203 |
-
activeFilter === "All" ||
|
| 204 |
-
problem.difficulty === activeFilter ||
|
| 205 |
-
problem.topic === activeFilter;
|
| 206 |
-
|
| 207 |
-
return matchesSearch && matchesFilter;
|
| 208 |
-
|
| 209 |
-
});
|
| 210 |
-
|
| 211 |
-
renderProblems(filtered);
|
| 212 |
-
|
| 213 |
-
}
|
| 214 |
-
|
| 215 |
-
searchInput.addEventListener("input", filterProblems);
|
| 216 |
-
|
| 217 |
-
function difficultyColor(level) {
|
| 218 |
-
|
| 219 |
-
if (level === "Easy")
|
| 220 |
-
return "text-green-400 bg-green-500/10";
|
| 221 |
-
|
| 222 |
-
if (level === "Medium")
|
| 223 |
-
return "text-yellow-400 bg-yellow-500/10";
|
| 224 |
-
|
| 225 |
-
return "text-red-400 bg-red-500/10";
|
| 226 |
-
|
| 227 |
-
}
|
| 228 |
-
|
| 229 |
-
function renderProblems(data) {
|
| 230 |
-
|
| 231 |
-
grid.innerHTML = "";
|
| 232 |
-
|
| 233 |
-
data.forEach(problem => {
|
| 234 |
-
|
| 235 |
-
const card = document.createElement("article");
|
| 236 |
-
|
| 237 |
-
card.className =
|
| 238 |
-
"p-6 rounded-3xl border border-white/10 bg-white/5 hover:-translate-y-2 transition";
|
| 239 |
-
|
| 240 |
-
card.innerHTML = `
|
| 241 |
-
|
| 242 |
-
<div class="flex items-start justify-between gap-3">
|
| 243 |
-
|
| 244 |
-
<div>
|
| 245 |
-
|
| 246 |
-
<p class="text-cyan-400 text-sm font-mono">
|
| 247 |
-
${problem.topic}
|
| 248 |
-
</p>
|
| 249 |
-
|
| 250 |
-
<h2 class="text-2xl font-bold mt-3">
|
| 251 |
-
${problem.title}
|
| 252 |
-
</h2>
|
| 253 |
-
|
| 254 |
-
</div>
|
| 255 |
-
|
| 256 |
-
<span class="px-3 py-1 rounded-full text-xs ${difficultyColor(problem.difficulty)}">
|
| 257 |
-
${problem.difficulty}
|
| 258 |
-
</span>
|
| 259 |
-
|
| 260 |
-
</div>
|
| 261 |
-
|
| 262 |
-
<div class="mt-5 flex flex-wrap gap-2">
|
| 263 |
-
|
| 264 |
-
${problem.tags.map(tag => `
|
| 265 |
-
<span class="text-xs px-3 py-1 rounded-full bg-white/10">
|
| 266 |
-
${tag}
|
| 267 |
-
</span>
|
| 268 |
-
`).join("")}
|
| 269 |
-
|
| 270 |
-
</div>
|
| 271 |
-
|
| 272 |
-
<div class="mt-8 flex items-center justify-between">
|
| 273 |
-
|
| 274 |
-
<span class="text-slate-400 text-sm">
|
| 275 |
-
${problem.dateSolved}
|
| 276 |
-
</span>
|
| 277 |
-
|
| 278 |
-
<a href="${problem.url}"
|
| 279 |
-
class="px-5 py-3 rounded-xl bg-gradient-to-r from-cyan-500 to-violet-500 font-semibold">
|
| 280 |
-
View →
|
| 281 |
-
</a>
|
| 282 |
-
|
| 283 |
-
</div>
|
| 284 |
-
|
| 285 |
-
`;
|
| 286 |
-
|
| 287 |
-
grid.appendChild(card);
|
| 288 |
-
|
| 289 |
-
});
|
| 290 |
-
|
| 291 |
-
}
|
| 292 |
-
|
| 293 |
-
fetchProblems();
|
| 294 |
-
|
| 295 |
-
</script>
|
| 296 |
|
| 297 |
</body>
|
| 298 |
-
|
| 299 |
</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>Surprise for Mummy</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* --- CSS STYLES --- */
|
| 9 |
+
body {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 13 |
+
background: linear-gradient(180deg, #fff5f7 0%, #fce4ec 100%);
|
| 14 |
+
display: flex;
|
| 15 |
+
flex-direction: column;
|
| 16 |
+
align-items: center;
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
color: #4a4a4a;
|
| 19 |
+
}
|
| 20 |
|
| 21 |
+
header {
|
| 22 |
+
margin-top: 40px;
|
| 23 |
+
text-align: center;
|
| 24 |
+
}
|
| 25 |
|
| 26 |
+
h1 { color: #d81b60; font-weight: 300; }
|
| 27 |
|
| 28 |
+
/* Balloon Area */
|
| 29 |
+
.balloon-container {
|
| 30 |
+
display: flex;
|
| 31 |
+
gap: 20px;
|
| 32 |
+
margin: 50px 0;
|
| 33 |
+
flex-wrap: wrap;
|
| 34 |
+
justify-content: center;
|
| 35 |
+
}
|
| 36 |
|
| 37 |
+
.balloon {
|
| 38 |
+
width: 70px;
|
| 39 |
+
height: 90px;
|
| 40 |
+
border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
|
| 41 |
+
cursor: pointer;
|
| 42 |
+
transition: transform 0.2s ease-in-out;
|
| 43 |
+
box-shadow: inset -5px -5px 10px rgba(0,0,0,0.1);
|
| 44 |
+
animation: float 3s ease-in-out infinite;
|
| 45 |
+
}
|
| 46 |
|
| 47 |
+
@keyframes float {
|
| 48 |
+
0%, 100% { transform: translateY(0); }
|
| 49 |
+
50% { transform: translateY(-15px); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
.balloon:hover { transform: scale(1.2); }
|
| 53 |
+
|
| 54 |
+
/* Polaroid Popup Overlay */
|
| 55 |
+
.overlay {
|
| 56 |
+
display: none; /* Hidden by default */
|
| 57 |
+
position: fixed;
|
| 58 |
+
top: 0; left: 0;
|
| 59 |
+
width: 100%; height: 100%;
|
| 60 |
+
background: rgba(0, 0, 0, 0.7);
|
| 61 |
+
justify-content: center;
|
| 62 |
+
align-items: center;
|
| 63 |
+
z-index: 1000;
|
| 64 |
+
}
|
| 65 |
|
| 66 |
+
.polaroid {
|
| 67 |
+
background: white;
|
| 68 |
+
padding: 15px 15px 50px 15px;
|
| 69 |
+
box-shadow: 0 15px 30px rgba(0,0,0,0.3);
|
| 70 |
+
text-align: center;
|
| 71 |
+
max-width: 300px;
|
| 72 |
+
border-radius: 2px;
|
| 73 |
+
}
|
| 74 |
|
| 75 |
+
.polaroid img {
|
| 76 |
+
width: 100%;
|
| 77 |
+
height: 350px;
|
| 78 |
+
object-fit: cover; /* Keeps photo from stretching */
|
| 79 |
+
border: 1px solid #eee;
|
| 80 |
+
}
|
| 81 |
|
| 82 |
+
.caption {
|
| 83 |
+
margin-top: 20px;
|
| 84 |
+
font-size: 1.2rem;
|
| 85 |
+
font-family: 'Cursive', sans-serif;
|
| 86 |
+
color: #d81b60;
|
| 87 |
+
}
|
| 88 |
|
| 89 |
+
.close-btn {
|
| 90 |
+
margin-top: 20px;
|
| 91 |
+
padding: 8px 20px;
|
| 92 |
+
background: #d81b60;
|
| 93 |
+
color: white;
|
| 94 |
+
border: none;
|
| 95 |
+
border-radius: 20px;
|
| 96 |
+
cursor: pointer;
|
| 97 |
+
}
|
| 98 |
+
</style>
|
| 99 |
+
</head>
|
| 100 |
+
<body>
|
| 101 |
|
| 102 |
+
<header>
|
| 103 |
+
<h1>Pop a Balloon, Mummy! 🎈</h1>
|
| 104 |
+
<p>Each one has a special memory inside.</p>
|
| 105 |
+
</header>
|
| 106 |
|
| 107 |
+
<div class="balloon-container">
|
| 108 |
+
<div class="balloon" style="background-color: #ff80ab;" onclick="openSurprise(0)"></div>
|
| 109 |
+
<div class="balloon" style="background-color: #ba68c8;" onclick="openSurprise(1)"></div>
|
| 110 |
+
<div class="balloon" style="background-color: #4fc3f7;" onclick="openSurprise(2)"></div>
|
| 111 |
</div>
|
| 112 |
|
| 113 |
+
<div class="overlay" id="overlay">
|
| 114 |
+
<div class="polaroid">
|
| 115 |
+
<img id="display-image" src="" alt="Memory">
|
| 116 |
+
<div class="caption" id="display-caption"></div>
|
| 117 |
+
<button class="close-btn" onclick="closeSurprise()">Close</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
</div>
|
| 120 |
|
| 121 |
+
<script>
|
| 122 |
+
/* --- CONFIGURATION --- */
|
| 123 |
+
// Change the links below to your own photos!
|
| 124 |
+
const myMemories = [
|
| 125 |
+
{
|
| 126 |
+
image: "YOUR_IMAGE_URL_HERE_1.jpg",
|
| 127 |
+
text: "The prettiest woman I know! ✨"
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
image: "YOUR_IMAGE_URL_HERE_2.jpg",
|
| 131 |
+
text: "Always by my side. ❤️"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
image: "YOUR_IMAGE_URL_HERE_3.jpg",
|
| 135 |
+
text: "Growing up to be just like you. 🌸"
|
| 136 |
+
}
|
| 137 |
+
];
|
| 138 |
+
|
| 139 |
+
function openSurprise(index) {
|
| 140 |
+
const data = myMemories[index];
|
| 141 |
+
document.getElementById('display-image').src = data.image;
|
| 142 |
+
document.getElementById('display-caption').innerText = data.text;
|
| 143 |
+
document.getElementById('overlay').style.display = 'flex';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
}
|
| 145 |
|
| 146 |
+
function closeSurprise() {
|
| 147 |
+
document.getElementById('overlay').style.display = 'none';
|
| 148 |
+
}
|
| 149 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
</body>
|
|
|
|
| 152 |
</html>
|