icon-overlay-wizard / index.html
phohale's picture
Write an in-browser web app that allows the user to upload a base icon such as a filesystem folder icon and then generate versions of the icon with standard overlay elements, such as banners of various colors, etc.
5523155 verified
Raw
History Blame Contribute Delete
9.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Icon Overlay Wizard 🎨✨</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50 min-h-screen">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-8">
<div class="max-w-4xl mx-auto">
<div class="text-center mb-12">
<h1 class="text-4xl font-bold text-gray-800 mb-4">Icon Overlay Wizard</h1>
<p class="text-xl text-gray-600">Upload your base icon and customize it with beautiful overlays</p>
</div>
<div class="bg-white rounded-xl shadow-lg p-6 mb-8">
<div class="grid md:grid-cols-2 gap-8">
<!-- Upload Section -->
<div>
<h2 class="text-2xl font-semibold text-gray-800 mb-4">1. Upload Base Icon</h2>
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center cursor-pointer hover:bg-gray-50 transition" id="dropZone">
<div class="flex flex-col items-center justify-center">
<i data-feather="upload" class="w-12 h-12 text-gray-400 mb-4"></i>
<p class="text-gray-600 mb-2">Drag & drop your icon here</p>
<p class="text-sm text-gray-500 mb-4">or</p>
<label for="fileInput" class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition cursor-pointer">
Select File
</label>
<input type="file" id="fileInput" accept="image/*" class="hidden">
</div>
</div>
<div class="mt-4 text-sm text-gray-500">
<p>Supported formats: PNG, JPG, SVG (max 2MB)</p>
</div>
</div>
<!-- Preview Section -->
<div>
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Preview</h2>
<div class="flex justify-center">
<div class="w-48 h-48 bg-gray-100 rounded-lg flex items-center justify-center overflow-hidden relative" id="previewContainer">
<img id="previewImage" class="max-w-full max-h-full hidden">
<div id="overlayContainer" class="absolute inset-0"></div>
<p id="placeholderText" class="text-gray-400">Your icon will appear here</p>
</div>
</div>
</div>
</div>
</div>
<!-- Overlay Options -->
<div class="bg-white rounded-xl shadow-lg p-6 mb-8">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">2. Customize Overlays</h2>
<!-- Banner Options -->
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-700 mb-4">Banner Overlays</h3>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<button class="overlay-option" data-type="banner" data-color="red">
<div class="w-full h-4 bg-red-500 rounded mb-2"></div>
<span>Red Banner</span>
</button>
<button class="overlay-option" data-type="banner" data-color="blue">
<div class="w-full h-4 bg-blue-500 rounded mb-2"></div>
<span>Blue Banner</span>
</button>
<button class="overlay-option" data-type="banner" data-color="green">
<div class="w-full h-4 bg-green-500 rounded mb-2"></div>
<span>Green Banner</span>
</button>
<button class="overlay-option" data-type="banner" data-color="yellow">
<div class="w-full h-4 bg-yellow-500 rounded mb-2"></div>
<span>Yellow Banner</span>
</button>
</div>
</div>
<!-- Corner Badges -->
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-700 mb-4">Corner Badges</h3>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<button class="overlay-option" data-type="badge" data-color="red">
<div class="w-6 h-6 bg-red-500 rounded-full mb-2"></div>
<span>Red Badge</span>
</button>
<button class="overlay-option" data-type="badge" data-color="blue">
<div class="w-6 h-6 bg-blue-500 rounded-full mb-2"></div>
<span>Blue Badge</span>
</button>
<button class="overlay-option" data-type="badge" data-color="green">
<div class="w-6 h-6 bg-green-500 rounded-full mb-2"></div>
<span>Green Badge</span>
</button>
<button class="overlay-option" data-type="badge" data-color="yellow">
<div class="w-6 h-6 bg-yellow-500 rounded-full mb-2"></div>
<span>Yellow Badge</span>
</button>
</div>
</div>
<!-- Customization Options -->
<div>
<h3 class="text-xl font-medium text-gray-700 mb-4">Advanced Options</h3>
<div class="grid md:grid-cols-2 gap-6">
<div>
<label class="block text-gray-600 mb-2">Overlay Position</label>
<select id="positionSelect" class="w-full p-2 border border-gray-300 rounded">
<option value="top">Top</option>
<option value="bottom">Bottom</option>
<option value="left">Left</option>
<option value="right">Right</option>
<option value="top-right">Top Right</option>
<option value="top-left">Top Left</option>
<option value="bottom-right">Bottom Right</option>
<option value="bottom-left">Bottom Left</option>
</select>
</div>
<div>
<label class="block text-gray-600 mb-2">Overlay Size</label>
<select id="sizeSelect" class="w-full p-2 border border-gray-300 rounded">
<option value="small">Small</option>
<option value="medium" selected>Medium</option>
<option value="large">Large</option>
</select>
</div>
</div>
</div>
</div>
<!-- Download Section -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">3. Download Your Icon</h2>
<div class="flex flex-wrap gap-4">
<button id="downloadPng" class="px-6 py-3 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition flex items-center gap-2">
<i data-feather="download"></i>
Download PNG
</button>
<button id="downloadJpg" class="px-6 py-3 bg-green-500 text-white rounded-md hover:bg-green-600 transition flex items-center gap-2">
<i data-feather="download"></i>
Download JPG
</button>
<button id="downloadSvg" class="px-6 py-3 bg-purple-500 text-white rounded-md hover:bg-purple-600 transition flex items-center gap-2">
<i data-feather="download"></i>
Download SVG
</button>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<!-- Web Components -->
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>