GamePage Generator PRO

🎮 GamePage Generator PRO 🕹️

⚙️ Configurações da Página

RPG FPS Aventura Estratégia Esportes Corrida Horror MMO Indie Simulador

🖼️ Mídia & Links

📷

Arraste e solte uma imagem ou clique para selecionar

Ou cole a URL da imagem abaixo

Slider de imagens aparecerá aqui

👁️ Pré-visualização & Código

Sua pré-visualização aparecerá aqui...

` : ''} `; // Gerar CSS separado const css = ` /* Estilos gerados pelo GamePage Generator PRO */ :root { --primary: ${primaryColor}; --secondary: ${secondaryColor}; --dark: #121212; --light: #f8f9fa; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; max-width: 1200px; margin: 0 auto; padding: 20px; background-color: #f5f5f5; } .game-container { background: white; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 30px; margin-bottom: 30px; } h1 { color: var(--primary); text-align: center; margin-bottom: 30px; font-size: 2.5rem; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .game-image { border-radius: 10px; max-width: 100%; height: auto; box-shadow: 0 5px 15px rgba(0,0,0,0.1); } .image-left { float: left; margin-right: 30px; margin-bottom: 20px; max-width: 40%; } .image-right { float: right; margin-left: 30px; margin-bottom: 20px; max-width: 40%; } .image-center { display: block; margin: 0 auto 30px; max-width: 80%; } p { margin-bottom: 20px; text-align: justify; } .slider-container { width: 100%; overflow: hidden; margin: 30px 0; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); } .slider { display: flex; transition: transform 0.5s ease; } .slider img { width: 100%; height: auto; flex-shrink: 0; } .game-button { display: inline-block; padding: 12px 30px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; text-decoration: none; border-radius: 30px; font-weight: bold; margin: 10px; transition: all 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.1); } .game-button:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); filter: brightness(1.1); } .button-container { display: flex; flex-wrap: wrap; justify-content: center; margin: 30px 0; } .youtube-video { width: 100%; max-width: 800px; margin: 30px auto; border-radius: 10px; overflow: hidden; } .youtube-video iframe { width: 100%; height: 450px; border: none; } @media (max-width: 768px) { .image-left, .image-right { float: none; margin: 0 auto 20px; max-width: 100%; display: block; } .youtube-video iframe { height: 250px; } } `; // Atualizar pré-visualização const previewContainer = document.getElementById('previewContainer'); previewContainer.innerHTML = html; // Atualizar código document.getElementById('htmlCode').textContent = html; document.getElementById('cssCode').textContent = css; // Ativar botões de download/cópia document.getElementById('downloadBtn').disabled = false; document.getElementById('copyCodeBtn').disabled = false; } // Configurar botão de gerar document.getElementById('generateBtn').addEventListener('click', generatePage); // Configurar botão de download document.getElementById('downloadBtn').addEventListener('click', function() { const html = document.getElementById('htmlCode').textContent; const title = document.getElementById('pageTitle').value || 'game-page'; const blob = new Blob([html], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${title.toLowerCase().replace(/[^a-z0-9]/g, '-')}.html`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); }); // Configurar botão de copiar código document.getElementById('copyCodeBtn').addEventListener('click', function() { const activeTab = document.querySelector('.tab-btn.active').dataset.tab; const codeElement = document.getElementById(`${activeTab}Code`); const range = document.createRange(); range.selectNode(codeElement); window.getSelection().removeAllRanges(); window.getSelection().addRange(range); document.execCommand('copy'); window.getSelection().removeAllRanges(); // Feedback visual const originalText = this.textContent; this.textContent = 'Código copiado!'; setTimeout(() => { this.textContent = originalText; }, 2000); }); // Configurar inserção de emoji document.getElementById('insertEmoji').addEventListener('click', function() { if (!selectedEmoji) { alert('Por favor, selecione um emoji primeiro'); return; } const contentTextarea = document.getElementById('mainContent'); const startPos = contentTextarea.selectionStart; const endPos = contentTextarea.selectionEnd; const text = contentTextarea.value; contentTextarea.value = text.substring(0, startPos) + selectedEmoji + text.substring(endPos); contentTextarea.focus(); contentTextarea.selectionStart = startPos + selectedEmoji.length; contentTextarea.selectionEnd = startPos + selectedEmoji.length; }); // Inicializar tudo initEmojiPalette(); setupTabs(); setupGenreSelection(); setupColorSelection(); setupImageUpload(); setupImageSlider(); setupAdditionalLinks(); setupLegacyConverter(); });

Postar um comentário

0 Comentários