Spaces:
Running
Running
File size: 18,228 Bytes
821f8de | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | <!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lububu Personalizado - Crie Seu Próprio</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.lububu-container {
position: relative;
width: 300px;
height: 300px;
margin: 0 auto;
}
.lububu-base {
position: absolute;
width: 100%;
height: 100%;
background-image: url('https://i.imgur.com/JQ9wWJn.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.lububu-face {
position: absolute;
width: 80px;
height: 80px;
border-radius: 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
overflow: hidden;
background-size: cover;
background-position: center;
}
.color-preview {
width: 30px;
height: 30px;
border-radius: 50%;
display: inline-block;
margin-right: 10px;
border: 1px solid #ccc;
cursor: pointer;
}
#faceUpload {
display: none;
}
.custom-file-upload {
border: 1px solid #ccc;
display: inline-block;
padding: 6px 12px;
cursor: pointer;
border-radius: 4px;
background-color: #f8f9fa;
}
</style>
</head>
<body class="bg-gradient-to-b from-purple-100 to-pink-100 min-h-screen">
<header class="bg-purple-600 text-white py-6 shadow-lg">
<div class="container mx-auto px-4">
<div class="flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-paw text-3xl mr-3"></i>
<h1 class="text-2xl md:text-3xl font-bold">Lububu Personalizado</h1>
</div>
<nav class="hidden md:block">
<ul class="flex space-x-6">
<li><a href="#" class="hover:text-purple-200">Início</a></li>
<li><a href="#" class="hover:text-purple-200">Galeria</a></li>
<li><a href="#" class="hover:text-purple-200">Sobre</a></li>
<li><a href="#" class="hover:text-purple-200">Contato</a></li>
</ul>
</nav>
<button class="md:hidden text-2xl">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-12">
<div class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold text-purple-800 mb-4">Crie Seu Próprio Lububu</h2>
<p class="text-lg text-gray-700 max-w-2xl mx-auto">Personalize seu lububu com a cara de quem você quiser e escolha entre diversas cores de pelo!</p>
</div>
<div class="flex flex-col lg:flex-row gap-12">
<div class="lg:w-1/2">
<div class="bg-white rounded-xl shadow-xl p-6">
<div class="lububu-container mb-8">
<div class="lububu-base" id="lububuBase"></div>
<div class="lububu-face" id="lububuFace"></div>
</div>
<div class="text-center">
<button id="downloadBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-6 rounded-full transition duration-300 transform hover:scale-105">
<i class="fas fa-download mr-2"></i> Baixar Lububu
</button>
</div>
</div>
</div>
<div class="lg:w-1/2">
<div class="bg-white rounded-xl shadow-xl p-6">
<h3 class="text-xl font-bold text-purple-800 mb-6 border-b pb-2">Personalize Seu Lububu</h3>
<div class="mb-8">
<h4 class="font-semibold text-gray-800 mb-4">1. Coloque Seu Rosto no Lububu</h4>
<div class="mb-4 p-4 bg-gray-100 rounded-lg">
<p class="text-sm text-gray-600 mb-2">Pré-visualização:</p>
<div class="lububu-preview-container" style="width: 150px; height: 150px; position: relative; margin: 0 auto;">
<div class="lububu-base-preview" style="position: absolute; width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center;"></div>
<div class="lububu-face-preview" style="position: absolute; width: 40px; height: 40px; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); overflow: hidden; background-size: cover; background-position: center;"></div>
</div>
</div>
<label for="faceUpload" class="custom-file-upload bg-purple-100 text-purple-800 hover:bg-purple-200">
<i class="fas fa-upload mr-2"></i> Carregar Foto
</label>
<input id="faceUpload" type="file" accept="image/*">
<button id="removeFaceBtn" class="ml-4 text-gray-600 hover:text-purple-800">
<i class="fas fa-times mr-1"></i> Remover Rosto
</button>
<div class="mt-4">
<label class="text-sm text-gray-600">Ajuste de Tamanho:</label>
<input type="range" id="faceSize" min="50" max="120" value="80" class="w-full mt-2">
</div>
</div>
<div class="mb-8">
<h4 class="font-semibold text-gray-800 mb-4">2. Escolha a Cor do Pelo</h4>
<div class="flex flex-wrap gap-3">
<div class="color-preview bg-amber-200" data-color="#fbbf24" onclick="changeFurColor('#fbbf24')"></div>
<div class="color-preview bg-gray-300" data-color="#d1d5db" onclick="changeFurColor('#d1d5db')"></div>
<div class="color-preview bg-white" data-color="#ffffff" onclick="changeFurColor('#ffffff')"></div>
<div class="color-preview bg-pink-200" data-color="#fbcfe8" onclick="changeFurColor('#fbcfe8')"></div>
<div class="color-preview bg-blue-200" data-color="#bfdbfe" onclick="changeFurColor('#bfdbfe')"></div>
<div class="color-preview bg-green-200" data-color="#a7f3d0" onclick="changeFurColor('#a7f3d0')"></div>
<div class="color-preview bg-red-200" data-color="#fecaca" onclick="changeFurColor('#fecaca')"></div>
<div class="color-preview bg-purple-200" data-color="#e9d5ff" onclick="changeFurColor('#e9d5ff')"></div>
</div>
<div class="mt-4">
<label class="text-sm text-gray-600">Ou selecione uma cor personalizada:</label>
<input type="color" id="customColor" value="#fbbf24" class="w-full h-10 mt-2 cursor-pointer">
</div>
</div>
<div class="mb-8">
<h4 class="font-semibold text-gray-800 mb-4">3. Acessórios (Em Breve!)</h4>
<div class="grid grid-cols-3 gap-4 opacity-50">
<div class="text-center">
<div class="bg-gray-200 rounded-full p-4 mb-2">
<i class="fas fa-hat-cowboy text-2xl"></i>
</div>
<span class="text-sm">Chapéu</span>
</div>
<div class="text-center">
<div class="bg-gray-200 rounded-full p-4 mb-2">
<i class="fas fa-glasses text-2xl"></i>
</div>
<span class="text-sm">Óculos</span>
</div>
<div class="text-center">
<div class="bg-gray-200 rounded-full p-4 mb-2">
<i class="fas fa-scarf text-2xl"></i>
</div>
<span class="text-sm">Cachecol</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="mt-16 text-center">
<h3 class="text-2xl font-bold text-purple-800 mb-6">Como Funciona?</h3>
<div class="grid md:grid-cols-3 gap-8">
<div class="bg-white p-6 rounded-xl shadow-lg">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-upload"></i>
</div>
<h4 class="font-bold text-lg mb-2">1. Carregue Sua Foto</h4>
<p class="text-gray-600">Escolha uma foto de rosto para colocar no seu lububu.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-lg">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-palette"></i>
</div>
<h4 class="font-bold text-lg mb-2">2. Personalize</h4>
<p class="text-gray-600">Escolha a cor do pelo e ajuste o tamanho do rosto.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-lg">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-download"></i>
</div>
<h4 class="font-bold text-lg mb-2">3. Baixe e Compartilhe</h4>
<p class="text-gray-600">Baixe seu lububu personalizado e compartilhe com amigos!</p>
</div>
</div>
</div>
</main>
<footer class="bg-purple-800 text-white py-12 mt-16">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-4 gap-8">
<div>
<h4 class="text-xl font-bold mb-4">Lububu Personalizado</h4>
<p class="text-purple-200">Crie seu próprio lububu com sua cara e estilo único!</p>
</div>
<div>
<h4 class="text-xl font-bold mb-4">Links</h4>
<ul class="space-y-2">
<li><a href="#" class="text-purple-200 hover:text-white">Início</a></li>
<li><a href="#" class="text-purple-200 hover:text-white">Galeria</a></li>
<li><a href="#" class="text-purple-200 hover:text-white">Sobre</a></li>
<li><a href="#" class="text-purple-200 hover:text-white">Contato</a></li>
</ul>
</div>
<div>
<h4 class="text-xl font-bold mb-4">Contato</h4>
<ul class="space-y-2">
<li class="flex items-center">
<i class="fas fa-envelope mr-2 text-purple-200"></i>
<span class="text-purple-200">contato@lububu.com</span>
</li>
<li class="flex items-center">
<i class="fas fa-phone mr-2 text-purple-200"></i>
<span class="text-purple-200">(11) 98765-4321</span>
</li>
</ul>
</div>
<div>
<h4 class="text-xl font-bold mb-4">Redes Sociais</h4>
<div class="flex space-x-4">
<a href="#" class="text-2xl text-purple-200 hover:text-white"><i class="fab fa-facebook"></i></a>
<a href="#" class="text-2xl text-purple-200 hover:text-white"><i class="fab fa-instagram"></i></a>
<a href="#" class="text-2xl text-purple-200 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-2xl text-purple-200 hover:text-white"><i class="fab fa-tiktok"></i></a>
</div>
</div>
</div>
<div class="border-t border-purple-700 mt-8 pt-8 text-center text-purple-200">
<p>© 2023 Lububu Personalizado. Todos os direitos reservados.</p>
</div>
</div>
</footer>
<script>
// Elementos DOM
const faceUpload = document.getElementById('faceUpload');
const lububuFace = document.getElementById('lububuFace');
const removeFaceBtn = document.getElementById('removeFaceBtn');
const faceSize = document.getElementById('faceSize');
const customColor = document.getElementById('customColor');
const lububuBase = document.getElementById('lububuBase');
const downloadBtn = document.getElementById('downloadBtn');
// Elementos de pré-visualização
const lububuBasePreview = document.querySelector('.lububu-base-preview');
const lububuFacePreview = document.querySelector('.lububu-face-preview');
// Carregar imagem do rosto
faceUpload.addEventListener('change', function(e) {
const file = e.target.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
lububuFace.style.backgroundImage = `url(${event.target.result})`;
lububuFace.style.display = 'block';
lububuFacePreview.style.backgroundImage = `url(${event.target.result})`;
lububuFacePreview.style.display = 'block';
}
reader.readAsDataURL(file);
}
});
// Remover rosto
removeFaceBtn.addEventListener('click', function() {
lububuFace.style.backgroundImage = 'none';
lububuFace.style.display = 'none';
lububuFacePreview.style.backgroundImage = 'none';
lububuFacePreview.style.display = 'none';
faceUpload.value = '';
});
// Ajustar tamanho do rosto
faceSize.addEventListener('input', function() {
const size = this.value + 'px';
const previewSize = (this.value * 0.5) + 'px'; // Scale down for preview
lububuFace.style.width = size;
lububuFace.style.height = size;
lububuFacePreview.style.width = previewSize;
lububuFacePreview.style.height = previewSize;
});
// Mudar cor do pelo
function changeFurColor(color) {
const filter = `hue-rotate(${getHueRotation(color)}) brightness(1.1)`;
lububuBase.style.filter = filter;
lububuBasePreview.style.filter = filter;
lububuBasePreview.style.backgroundImage = lububuBase.style.backgroundImage;
customColor.value = color;
}
// Cor personalizada
customColor.addEventListener('input', function() {
changeFurColor(this.value);
});
// Função para calcular rotação de matiz baseada na cor
function getHueRotation(color) {
// Convert hex to RGB
let r = parseInt(color.substring(1, 3), 16) / 255;
let g = parseInt(color.substring(3, 5), 16) / 255;
let b = parseInt(color.substring(5, 7), 16) / 255;
// Find min and max
let max = Math.max(r, g, b);
let min = Math.min(r, g, b);
let h, s, l = (max + min) / 2;
if (max === min) {
h = s = 0; // achromatic
} else {
let d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
// Convert hue to degrees (0-360)
h = h * 360;
// The base color is amber-200 (#fbbf24) which has hue ~38°
// Calculate the difference needed to reach target hue
return (h - 38) + 'deg';
}
// Baixar imagem (simulação)
downloadBtn.addEventListener('click', function() {
alert('Seu lububu personalizado foi baixado com sucesso! (Funcionalidade simulada)');
// Em uma implementação real, aqui usariamos html2canvas ou similar para capturar a div como imagem
});
// Inicializar com cor padrão
changeFurColor('#fbbf24');
lububuBasePreview.style.backgroundImage = lububuBase.style.backgroundImage;
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=daddy4ever/d" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |