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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>Generative AI Project Ideas</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.card-hover {
|
| 11 |
+
transition: all 0.3s ease;
|
| 12 |
+
}
|
| 13 |
+
.card-hover:hover {
|
| 14 |
+
transform: translateY(-5px);
|
| 15 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 16 |
+
}
|
| 17 |
+
.category-chip {
|
| 18 |
+
transition: all 0.2s ease;
|
| 19 |
+
}
|
| 20 |
+
.category-chip:hover {
|
| 21 |
+
transform: scale(1.05);
|
| 22 |
+
}
|
| 23 |
+
#ideas-container::-webkit-scrollbar {
|
| 24 |
+
width: 6px;
|
| 25 |
+
}
|
| 26 |
+
#ideas-container::-webkit-scrollbar-track {
|
| 27 |
+
background: #f1f1f1;
|
| 28 |
+
}
|
| 29 |
+
#ideas-container::-webkit-scrollbar-thumb {
|
| 30 |
+
background: #888;
|
| 31 |
+
border-radius: 3px;
|
| 32 |
+
}
|
| 33 |
+
#ideas-container::-webkit-scrollbar-thumb:hover {
|
| 34 |
+
background: #555;
|
| 35 |
+
}
|
| 36 |
+
</style>
|
| 37 |
+
</head>
|
| 38 |
+
<body class="bg-gradient-to-br from-indigo-50 to-purple-50 min-h-screen">
|
| 39 |
+
<div class="container mx-auto px-4 py-12">
|
| 40 |
+
<!-- Header Section -->
|
| 41 |
+
<header class="text-center mb-16">
|
| 42 |
+
<h1 class="text-4xl md:text-5xl font-bold text-indigo-900 mb-4">Generative AI Project Showcase</h1>
|
| 43 |
+
<p class="text-xl text-gray-600 max-w-3xl mx-auto">Explore innovative project ideas harnessing the power of generative AI with descriptions, tech stacks, and difficulty levels</p>
|
| 44 |
+
</header>
|
| 45 |
+
|
| 46 |
+
<!-- Filter Controls -->
|
| 47 |
+
<div class="flex flex-wrap justify-center gap-4 mb-12">
|
| 48 |
+
<div class="relative w-full md:w-auto">
|
| 49 |
+
<select id="difficulty-filter" class="appearance-none bg-white border border-indigo-200 rounded-full py-3 px-6 pr-10 text-indigo-800 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
| 50 |
+
<option value="all">All Difficulties</option>
|
| 51 |
+
<option value="beginner">Beginner</option>
|
| 52 |
+
<option value="intermediate">Intermediate</option>
|
| 53 |
+
<option value="advanced">Advanced</option>
|
| 54 |
+
</select>
|
| 55 |
+
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
|
| 56 |
+
<i class="fas fa-chevron-down"></i>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<div class="relative w-full md:w-auto">
|
| 61 |
+
<select id="category-filter" class="appearance-none bg-white border border-indigo-200 rounded-full py-3 px-6 pr-10 text-indigo-800 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
| 62 |
+
<option value="all">All Categories</option>
|
| 63 |
+
<option value="text">Text Generation</option>
|
| 64 |
+
<option value="image">Image Generation</option>
|
| 65 |
+
<option value="audio">Audio Generation</option>
|
| 66 |
+
<option value="video">Video Generation</option>
|
| 67 |
+
<option value="creative">Creative</option>
|
| 68 |
+
<option value="productivity">Productivity</option>
|
| 69 |
+
</select>
|
| 70 |
+
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
|
| 71 |
+
<i class="fas fa-chevron-down"></i>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<button id="random-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-8 rounded-full flex items-center gap-2 transition duration-200">
|
| 76 |
+
<i class="fas fa-random"></i> Random Idea
|
| 77 |
+
</button>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
<!-- Project Cards Container -->
|
| 81 |
+
<div id="ideas-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 max-h-[70vh] overflow-y-auto p-2">
|
| 82 |
+
<!-- Projects will be loaded here dynamically -->
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<!-- Idea Submission Form -->
|
| 86 |
+
<div class="mt-20 bg-white rounded-2xl shadow-lg p-8 max-w-4xl mx-auto">
|
| 87 |
+
<h2 class="text-2xl font-bold text-indigo-900 mb-6">Submit Your Own AI Project Idea</h2>
|
| 88 |
+
<form id="idea-form" class="space-y-6">
|
| 89 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 90 |
+
<div>
|
| 91 |
+
<label for="project-name" class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
|
| 92 |
+
<input type="text" id="project-name" class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="e.g. AI Recipe Generator">
|
| 93 |
+
</div>
|
| 94 |
+
<div>
|
| 95 |
+
<label for="project-category" class="block text-sm font-medium text-gray-700 mb-1">Category</label>
|
| 96 |
+
<select id="project-category" class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
| 97 |
+
<option value="text">Text Generation</option>
|
| 98 |
+
<option value="image">Image Generation</option>
|
| 99 |
+
<option value="audio">Audio Generation</option>
|
| 100 |
+
<option value="video">Video Generation</option>
|
| 101 |
+
<option value="creative">Creative</option>
|
| 102 |
+
<option value="productivity">Productivity</option>
|
| 103 |
+
<option value="other">Other</option>
|
| 104 |
+
</select>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
<div>
|
| 108 |
+
<label for="project-description" class="block text-sm font-medium text-gray-700 mb-1">Description</label>
|
| 109 |
+
<textarea id="project-description" rows="3" class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Describe your project in detail..."></textarea>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 112 |
+
<div>
|
| 113 |
+
<label for="project-difficulty" class="block text-sm font-medium text-gray-700 mb-1">Difficulty Level</label>
|
| 114 |
+
<select id="project-difficulty" class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
| 115 |
+
<option value="beginner">Beginner</option>
|
| 116 |
+
<option value="intermediate">Intermediate</option>
|
| 117 |
+
<option value="advanced">Advanced</option>
|
| 118 |
+
</select>
|
| 119 |
+
</div>
|
| 120 |
+
<div>
|
| 121 |
+
<label for="project-tech" class="block text-sm font-medium text-gray-700 mb-1">Tech Stack (comma separated)</label>
|
| 122 |
+
<input type="text" id="project-tech" class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="e.g. Python, TensorFlow, GPT-3">
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
<button type="submit" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-6 rounded-lg flex items-center gap-2 transition duration-200 w-full justify-center">
|
| 126 |
+
<i class="fas fa-lightbulb"></i> Submit Idea
|
| 127 |
+
</button>
|
| 128 |
+
</form>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<script>
|
| 133 |
+
// Sample Data for AI Project Ideas
|
| 134 |
+
const projects = [
|
| 135 |
+
{
|
| 136 |
+
id: 1,
|
| 137 |
+
name: "AI Poetry Generator",
|
| 138 |
+
description: "Create a system that generates original poetry based on user-input themes or emotions. Use GPT or similar models trained specifically on poetic structures.",
|
| 139 |
+
category: "text",
|
| 140 |
+
difficulty: "intermediate",
|
| 141 |
+
techStack: ["Python", "Transformers", "GPT-3", "Flask"],
|
| 142 |
+
icon: "fa-feather-alt"
|
| 143 |
+
},
|
| 144 |
+
{
|
| 145 |
+
id: 2,
|
| 146 |
+
name: "Portrait Style Transfer",
|
| 147 |
+
description: "Develop an application that applies artistic styles (Van Gogh, Picasso, etc.) to user-uploaded portraits in real-time using neural style transfer techniques.",
|
| 148 |
+
category: "image",
|
| 149 |
+
difficulty: "advanced",
|
| 150 |
+
techStack: ["PyTorch", "OpenCV", "FastAPI", "React"],
|
| 151 |
+
icon: "fa-portrait"
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
id: 3,
|
| 155 |
+
name: "AI Music Composer",
|
| 156 |
+
description: "Build a tool that generates original music compositions in different genres based on mood selections or simple humming inputs.",
|
| 157 |
+
category: "audio",
|
| 158 |
+
difficulty: "advanced",
|
| 159 |
+
techStack: ["TensorFlow", "Magenta", "MIDI.js", "Node.js"],
|
| 160 |
+
icon: "fa-music"
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
id: 4,
|
| 164 |
+
name: "Dream Interpretation Bot",
|
| 165 |
+
description: "Create a chatbot that interprets dreams by analyzing user descriptions and providing symbolic explanations using NLP techniques.",
|
| 166 |
+
category: "text",
|
| 167 |
+
difficulty: "intermediate",
|
| 168 |
+
techStack: ["GPT-3", "Dialogflow", "Firebase", "JavaScript"],
|
| 169 |
+
icon: "fa-cloud-moon"
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
id: 5,
|
| 173 |
+
name: "Virtual Interior Designer",
|
| 174 |
+
description: "Develop an app that generates room designs based on user preferences (colors, styles) and allows virtual furniture placement using GANs.",
|
| 175 |
+
category: "image",
|
| 176 |
+
difficulty: "advanced",
|
| 177 |
+
techStack: ["GANs", "Three.js", "Django", "React"],
|
| 178 |
+
icon: "fa-couch"
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
id: 6,
|
| 182 |
+
name: "AI Dungeon Master",
|
| 183 |
+
description: "Create an AI-powered Dungeons & Dragons game master that dynamically generates storylines, NPCs, and challenges based on player actions.",
|
| 184 |
+
category: "text",
|
| 185 |
+
difficulty: "intermediate",
|
| 186 |
+
techStack: ["GPT-3", "Python", "WebSockets", "Vue.js"],
|
| 187 |
+
icon: "fa-dice-d20"
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
id: 7,
|
| 191 |
+
name: "Historical Figure Chatbot",
|
| 192 |
+
description: "Build interactive chatbots that emulate historical figures using their writings and speeches as training data.",
|
| 193 |
+
category: "text",
|
| 194 |
+
difficulty: "beginner",
|
| 195 |
+
techStack: ["ChatGPT API", "Python", "Flask"],
|
| 196 |
+
icon: "fa-landmark"
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
id: 8,
|
| 200 |
+
name: "Automated Meme Generator",
|
| 201 |
+
description: "Develop a system that automatically generates memes based on trending topics or user-provided images/captions.",
|
| 202 |
+
category: "image",
|
| 203 |
+
difficulty: "beginner",
|
| 204 |
+
techStack: ["Python", "Pillow", "Meme API", "Flask"],
|
| 205 |
+
icon: "fa-laugh-squint"
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
id: 9,
|
| 209 |
+
name: "AI Fashion Consultant",
|
| 210 |
+
description: "Create an app that suggests complete outfits based on user preferences, weather data, and clothing items in their wardrobe (photos).",
|
| 211 |
+
category: "image",
|
| 212 |
+
difficulty: "advanced",
|
| 213 |
+
techStack: ["Computer Vision", "GANs", "React Native", "Node.js"],
|
| 214 |
+
icon: "fa-tshirt"
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
id: 10,
|
| 218 |
+
name: "AI Storybook Creator",
|
| 219 |
+
description: "Build a tool that generates illustrated children's stories with coherent plotlines matching user-selected themes and character preferences.",
|
| 220 |
+
category: "creative",
|
| 221 |
+
difficulty: "intermediate",
|
| 222 |
+
techStack: ["GPT-3", "Stable Diffusion", "DALL-E", "Flask"],
|
| 223 |
+
icon: "fa-book-open"
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
id: 11,
|
| 227 |
+
name: "Personalized Cooking Assistant",
|
| 228 |
+
description: "Develop an AI that generates recipes based on available ingredients, dietary restrictions, and personal taste preferences.",
|
| 229 |
+
category: "text",
|
| 230 |
+
difficulty: "intermediate",
|
| 231 |
+
techStack: ["GPT-3", "Python", "Nutrition API", "React"],
|
| 232 |
+
icon: "fa-utensils"
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
id: 12,
|
| 236 |
+
name: "AI-Generated Podcasts",
|
| 237 |
+
description: "Create a system that produces audio podcasts on trending topics with human-like narration by combining text generation with voice synthesis.",
|
| 238 |
+
category: "audio",
|
| 239 |
+
difficulty: "advanced",
|
| 240 |
+
techStack: ["TTS Models", "GPT-3", "FFmpeg", "Node.js"],
|
| 241 |
+
icon: "fa-podcast"
|
| 242 |
+
}
|
| 243 |
+
];
|
| 244 |
+
|
| 245 |
+
// DOM Elements
|
| 246 |
+
const ideasContainer = document.getElementById('ideas-container');
|
| 247 |
+
const difficultyFilter = document.getElementById('difficulty-filter');
|
| 248 |
+
const categoryFilter = document.getElementById('category-filter');
|
| 249 |
+
const randomBtn = document.getElementById('random-btn');
|
| 250 |
+
const ideaForm = document.getElementById('idea-form');
|
| 251 |
+
|
| 252 |
+
// Render Projects Function
|
| 253 |
+
function renderProjects(filteredProjects = projects) {
|
| 254 |
+
ideasContainer.innerHTML = '';
|
| 255 |
+
|
| 256 |
+
if (filteredProjects.length === 0) {
|
| 257 |
+
ideasContainer.innerHTML = `
|
| 258 |
+
<div class="col-span-full text-center py-10">
|
| 259 |
+
<i class="fas fa-search fa-3x text-indigo-300 mb-4"></i>
|
| 260 |
+
<h3 class="text-xl font-medium text-gray-700">No projects found matching your filters</h3>
|
| 261 |
+
<p class="text-gray-500">Try adjusting your search criteria</p>
|
| 262 |
+
</div>
|
| 263 |
+
`;
|
| 264 |
+
return;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
filteredProjects.forEach(project => {
|
| 268 |
+
const difficultyColors = {
|
| 269 |
+
beginner: 'bg-green-100 text-green-800',
|
| 270 |
+
intermediate: 'bg-yellow-100 text-yellow-800',
|
| 271 |
+
advanced: 'bg-red-100 text-red-800'
|
| 272 |
+
};
|
| 273 |
+
|
| 274 |
+
const categoryIcons = {
|
| 275 |
+
text: 'fa-font',
|
| 276 |
+
image: 'fa-image',
|
| 277 |
+
audio: 'fa-volume-up',
|
| 278 |
+
video: 'fa-video',
|
| 279 |
+
creative: 'fa-palette',
|
| 280 |
+
productivity: 'fa-bolt'
|
| 281 |
+
};
|
| 282 |
+
|
| 283 |
+
const card = document.createElement('div');
|
| 284 |
+
card.className = 'bg-white rounded-xl shadow-md overflow-hidden card-hover';
|
| 285 |
+
card.innerHTML = `
|
| 286 |
+
<div class="p-6">
|
| 287 |
+
<div class="flex justify-between items-start mb-4">
|
| 288 |
+
<div class="flex items-center">
|
| 289 |
+
<div class="bg-indigo-100 p-3 rounded-lg text-indigo-600 mr-4">
|
| 290 |
+
<i class="fas ${project.icon || categoryIcons[project.category]} fa-lg"></i>
|
| 291 |
+
</div>
|
| 292 |
+
<h3 class="text-xl font-bold text-gray-800">${project.name}</h3>
|
| 293 |
+
</div>
|
| 294 |
+
<span class="px-3 py-1 rounded-full text-xs font-semibold ${difficultyColors[project.difficulty]}">
|
| 295 |
+
${project.difficulty.charAt(0).toUpperCase() + project.difficulty.slice(1)}
|
| 296 |
+
</span>
|
| 297 |
+
</div>
|
| 298 |
+
<p class="text-gray-600 mb-6">${project.description}</p>
|
| 299 |
+
<div class="flex flex-wrap gap-2 mb-6">
|
| 300 |
+
${project.techStack.map(tech => `
|
| 301 |
+
<span class="px-3 py-1 bg-indigo-50 text-indigo-700 text-xs font-medium rounded-full category-chip">${tech}</span>
|
| 302 |
+
`).join('')}
|
| 303 |
+
</div>
|
| 304 |
+
<div class="flex justify-between items-center">
|
| 305 |
+
<span class="px-3 py-1 bg-gray-100 text-gray-700 text-xs font-medium rounded-full flex items-center">
|
| 306 |
+
<i class="fas ${categoryIcons[project.category]} mr-1"></i>
|
| 307 |
+
${project.category.charAt(0).toUpperCase() + project.category.slice(1)}
|
| 308 |
+
</span>
|
| 309 |
+
<button class="text-indigo-600 hover:text-indigo-800 font-medium text-sm flex items-center">
|
| 310 |
+
View Details <i class="fas fa-arrow-right ml-2"></i>
|
| 311 |
+
</button>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
`;
|
| 315 |
+
ideasContainer.appendChild(card);
|
| 316 |
+
});
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
// Filter Projects Function
|
| 320 |
+
function filterProjects() {
|
| 321 |
+
const difficultyValue = difficultyFilter.value;
|
| 322 |
+
const categoryValue = categoryFilter.value;
|
| 323 |
+
|
| 324 |
+
let filtered = projects;
|
| 325 |
+
|
| 326 |
+
if (difficultyValue !== 'all') {
|
| 327 |
+
filtered = filtered.filter(project => project.difficulty === difficultyValue);
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
if (categoryValue !== 'all') {
|
| 331 |
+
filtered = filtered.filter(project => project.category === categoryValue);
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
renderProjects(filtered);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
// Random Project Function
|
| 338 |
+
function showRandomProject() {
|
| 339 |
+
const randomIndex = Math.floor(Math.random() * projects.length);
|
| 340 |
+
const randomProject = [projects[randomIndex]];
|
| 341 |
+
renderProjects(randomProject);
|
| 342 |
+
|
| 343 |
+
// Scroll to the top
|
| 344 |
+
ideasContainer.scrollTo(0, 0);
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
// Form Submission Handler
|
| 348 |
+
function handleFormSubmit(e) {
|
| 349 |
+
e.preventDefault();
|
| 350 |
+
|
| 351 |
+
const name = document.getElementById('project-name').value;
|
| 352 |
+
const description = document.getElementById('project-description').value;
|
| 353 |
+
const category = document.getElementById('project-category').value;
|
| 354 |
+
const difficulty = document.getElementById('project-difficulty').value;
|
| 355 |
+
const techStack = document.getElementById('project-tech').value.split(',').map(item => item.trim());
|
| 356 |
+
|
| 357 |
+
if (!name || !description) {
|
| 358 |
+
alert('Please fill in all required fields');
|
| 359 |
+
return;
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
const newProject = {
|
| 363 |
+
id: projects.length + 1,
|
| 364 |
+
name,
|
| 365 |
+
description,
|
| 366 |
+
category,
|
| 367 |
+
difficulty,
|
| 368 |
+
techStack,
|
| 369 |
+
icon: getIconForCategory(category)
|
| 370 |
+
};
|
| 371 |
+
|
| 372 |
+
projects.unshift(newProject);
|
| 373 |
+
renderProjects();
|
| 374 |
+
|
| 375 |
+
// Reset form
|
| 376 |
+
ideaForm.reset();
|
| 377 |
+
|
| 378 |
+
// Show success message
|
| 379 |
+
alert('Your project idea has been submitted successfully!');
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
// Helper function to get icon based on category
|
| 383 |
+
function getIconForCategory(category) {
|
| 384 |
+
const icons = {
|
| 385 |
+
text: 'fa-font',
|
| 386 |
+
image: 'fa-image',
|
| 387 |
+
audio: 'fa-volume-up',
|
| 388 |
+
video: 'fa-video',
|
| 389 |
+
creative: 'fa-palette',
|
| 390 |
+
productivity: 'fa-bolt',
|
| 391 |
+
other: 'fa-lightbulb'
|
| 392 |
+
};
|
| 393 |
+
return icons[category] || 'fa-lightbulb';
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
// Event Listeners
|
| 397 |
+
difficultyFilter.addEventListener('change', filterProjects);
|
| 398 |
+
categoryFilter.addEventListener('change', filterProjects);
|
| 399 |
+
randomBtn.addEventListener('click', showRandomProject);
|
| 400 |
+
ideaForm.addEventListener('submit', handleFormSubmit);
|
| 401 |
+
|
| 402 |
+
// Initial Render
|
| 403 |
+
renderProjects();
|
| 404 |
+
</script>
|
| 405 |
+
</body>
|
| 406 |
+
</html>
|