Spaces:
Running
Running
faz com que seja possivel visualizar como esta a ficar o lububu - Initial Deployment
821f8de verified Download index.html from daddy4ever/d: direct link, hf CLI and curl.
- Browser
- Download file 18.2 kB
-
https://huggingface.co/spaces/daddy4ever/d/resolve/main/index.html
- Command line
-
hf download hf://spaces/daddy4ever/d/index.html
-
curl -L -o index.html https://huggingface.co/spaces/daddy4ever/d/resolve/main/index.html
18.2 kB
| <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> |