ts3 / index.html
Saad4web's picture
Get inspired from the example and build web app like studio pictures maker for content branding on topic related vpn and mobile apps and software like top vpn can use etc ... Also using the listing like ul / li ... And add more improvements, also add bg image ability <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tech Brand Studio</title> <script src="https://cdn.tailwindcss.com"></script> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <style> body { font-family: 'Inter', sans-serif; background-color: #111827; /* bg-gray-900 */ } /* Custom scrollbar for a more modern look */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #1f2937; /* bg-gray-800 */ } ::-webkit-scrollbar-thumb { background: #4b5563; /* bg-gray-600 */ border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #6b7280; /* bg-gray-500 */ } .glassmorphism { background: rgba(31, 41, 55, 0.5); /* bg-gray-800 with opacity */ backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); } .preview-card-aspect-square { aspect-ratio: 1 / 1; } .preview-card-aspect-portrait { aspect-ratio: 9 / 16; } .preview-card-aspect-landscape { aspect-ratio: 16 / 9; } </style> </head> <body class="text-white"> <div class="flex flex-col lg:flex-row min-h-screen"> <!-- Left Panel: Controls --> <aside class="w-full lg:w-1/3 xl:w-1/4 p-4 lg:p-6 space-y-6 overflow-y-auto lg:h-screen"> <header class="text-center lg:text-left"> <h1 class="text-2xl font-bold text-cyan-400">Tech Brand Studio</h1> <p class="text-sm text-gray-400">Create content for VPNs & Software</p> </header> <!-- Brand Manager --> <div class="glassmorphism p-4 rounded-xl space-y-4"> <h2 class="text-lg font-semibold border-b border-gray-700 pb-2 flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-cyan-400" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd" /></svg> Brand Manager </h2> <input type="text" id="brandName" placeholder="Your Brand Name" class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition" onkeyup="updatePreview()"> <input type="text" id="brandTagline" placeholder="Your tagline here" class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition" onkeyup="updatePreview()"> <div class="grid grid-cols-2 gap-4"> <label for="logoUpload" class="w-full text-center bg-gray-700 hover:bg-gray-600 cursor-pointer rounded-md px-3 py-2 transition">Upload Logo</label> <input type="file" id="logoUpload" class="hidden" accept="image/*" onchange="handleLogoUpload(event)"> <input type="color" id="brandColor" value="#22d3ee" class="w-full bg-gray-700 rounded-md cursor-pointer" oninput="updatePreview()"> </div> </div> <!-- AI Assistant --> <div class="glassmorphism p-4 rounded-xl space-y-4"> <h2 class="text-lg font-semibold border-b border-gray-700 pb-2 flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-cyan-400" viewBox="0 0 20 20" fill="currentColor"><path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /></svg> AI Assistant </h2> <select id="contentTopic" class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition"> <option>Online Privacy</option> <option>Top 5 VPNs</option> <option>Cybersecurity Threats</option> <option>Data Encryption Explained</option> <option>Benefits of a VPN</option> </select> <select id="contentStyle" class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition"> <option>Informative</option> <option>Urgent Security Alert</option> <option>Top List</option> <option>Myth vs. Fact</option> <option>Promotional</option> </select> <button id="generateButton" onclick="generateContent()" class="w-full bg-cyan-600 hover:bg-cyan-500 rounded-md px-3 py-2 font-semibold transition flex items-center justify-center"> <span id="generateButtonText">Generate Ideas</span> <svg id="generateSpinner" class="animate-spin -ml-1 mr-3 h-5 w-5 text-white hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> </button> <div id="apiError" class="text-red-400 text-sm hidden mt-2"></div> </div> <!-- Quick Templates --> <div class="glassmorphism p-4 rounded-xl space-y-4"> <h2 class="text-lg font-semibold border-b border-gray-700 pb-2 flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-cyan-400" viewBox="0 0 20 20" fill="currentColor"><path d="M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" /></svg> Quick Templates </h2> <div class="grid grid-cols-2 gap-4"> <button class="bg-red-600 hover:bg-red-500 p-3 rounded-md transition" onclick="applyTemplate('alert')">Security Alert</button> <button class="bg-blue-600 hover:bg-blue-500 p-3 rounded-md transition" onclick="applyTemplate('list')">Top VPN List</button> <button class="bg-purple-600 hover:bg-purple-500 p-3 rounded-md transition" onclick="applyTemplate('feature')">Feature Spotlight</button> <button class="bg-green-600 hover:bg-green-500 p-3 rounded-md transition" onclick="applyTemplate('fact')">Did You Know?</button> </div> </div> <!-- Content Editor --> <div class="glassmorphism p-4 rounded-xl space-y-4"> <h2 class="text-lg font-semibold border-b border-gray-700 pb-2 flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-cyan-400" viewBox="0 0 20 20" fill="currentColor"><path d="M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" /><path fill-rule="evenodd" d="M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z" clip-rule="evenodd" /></svg> Content Editor </h2> <input type="text" id="headline" placeholder="Your amazing headline..." class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition" onkeyup="updatePreview()"> <textarea id="description" placeholder="Tell your story..." rows="4" class="w-full bg-gray-900 border border-gray-700 rounded-md px-3 py-2 focus:ring-2 focus:ring-cyan-500 focus:outline-none transition" onkeyup="updatePreview()"></textarea> </div> </aside> <!-- Right Panel: Preview & Actions --> <main class="w-full lg:w-2/3 xl:w-3/4 p-4 lg:p-10 flex flex-col items-center justify-center bg-gray-900"> <!-- Aspect Ratio Controls --> <div class="mb-4 flex items-center space-x-2 bg-gray-800 p-1 rounded-lg"> <button id="aspect-square" onclick="changeAspectRatio('square')" class="px-3 py-1 rounded-md bg-cyan-600">1:1</button> <button id="aspect-portrait" onclick="changeAspectRatio('portrait')" class="px-3 py-1 rounded-md">9:16</button> <button id="aspect-landscape" onclick="changeAspectRatio('landscape')" class="px-3 py-1 rounded-md">16:9</button> </div> <!-- Live Preview --> <div id="preview-container" class="w-full max-w-2xl"> <div id="previewCard" class="preview-card-aspect-square w-full rounded-2xl p-8 lg:p-12 flex flex-col justify-center items-center text-center transition-all duration-500" style="background: linear-gradient(45deg, #1e3a8a, #4c1d95);"> <div id="logoContainer" class="mb-4"> <img id="logoPreview" src="https://placehold.co/100x100/transparent/FFFFFF?text=Logo" class="max-h-24" alt="Brand Logo"> </div> <h3 id="headlinePreview" class="text-3xl md:text-4xl font-black text-white" style="text-shadow: 2px 2px 8px rgba(0,0,0,0.5);">Your Amazing Headline Here!</h3> <div id="descriptionPreview" class="mt-4 text-lg text-gray-200"> <p>Add your description to tell the full story and engage your audience with compelling content.</p> </div> <div id="brandPreview" class="mt-8 text-sm text-gray-400"> <span id="brandNamePreview">Your Brand</span> | <span id="brandTaglinePreview">Your Tagline</span> </div> </div> </div> <!-- Action Buttons --> <div class="mt-6 flex space-x-4"> <button onclick="exportImage()" class="bg-green-600 hover:bg-green-500 text-white font-bold py-2 px-6 rounded-lg transition-transform transform hover:scale-105">Export as PNG</button> </div> </main> </div> <script> // --- STATE & ELEMENTS --- const brandNameEl = document.getElementById('brandName'); const brandTaglineEl = document.getElementById('brandTagline'); const brandColorEl = document.getElementById('brandColor'); const headlineEl = document.getElementById('headline'); const descriptionEl = document.getElementById('description'); const logoUploadEl = document.getElementById('logoUpload'); const previewCardEl = document.getElementById('previewCard'); const logoPreviewEl = document.getElementById('logoPreview'); const headlinePreviewEl = document.getElementById('headlinePreview'); const descriptionPreviewEl = document.getElementById('descriptionPreview'); const brandNamePreviewEl = document.getElementById('brandNamePreview'); const brandTaglinePreviewEl = document.getElementById('brandTaglinePreview'); let currentTemplate = 'default'; // --- PREVIEW UPDATE FUNCTIONS --- /** * Main function to update the live preview based on user inputs. * It gathers all values and calls specific update functions. */ function updatePreview() { const brandName = brandNameEl.value || "Your Brand"; const brandTagline = brandTaglineEl.value || "Your Tagline"; const headline = headlineEl.value || "Your Amazing Headline Here!"; const description = descriptionEl.value; const color = brandColorEl.value; // Update text content brandNamePreviewEl.textContent = brandName; brandTaglinePreviewEl.textContent = brandTagline; headlinePreviewEl.textContent = headline; // Update description, handling the list template specifically if (currentTemplate === 'list' && description) { const items = description.split('\n').filter(item => item.trim() !== ''); const listHtml = `<ul class="list-disc list-inside text-left mx-auto max-w-md space-y-2">${items.map(item => `<li>${item}</li>`).join('')}</ul>`; descriptionPreviewEl.innerHTML = listHtml; } else { descriptionPreviewEl.innerHTML = `<p>${description || "Add your description to tell the full story..."}</p>`; } // Update colors previewCardEl.style.background = `linear-gradient(45deg, ${getDarkerColor(color)}, ${color})`; } /** * Handles the logo file upload and displays it in the preview. * @param {Event} event - The file input change event. */ function handleLogoUpload(event) { const file = event.target.files[0]; if (file) { const reader = new FileReader(); reader.onload = function(e) { logoPreviewEl.src = e.target.result; } reader.readAsDataURL(file); } } /** * Changes the aspect ratio of the preview card. * @param {string} aspect - 'square', 'portrait', or 'landscape'. */ function changeAspectRatio(aspect) { const card = document.getElementById('previewCard'); const buttons = document.querySelectorAll('#aspect-square, #aspect-portrait, #aspect-landscape'); buttons.forEach(btn => btn.classList.remove('bg-cyan-600')); document.getElementById(`aspect-${aspect}`).classList.add('bg-cyan-600'); card.classList.remove('preview-card-aspect-square', 'preview-card-aspect-portrait', 'preview-card-aspect-landscape'); card.classList.add(`preview-card-aspect-${aspect}`); } // --- TEMPLATE & AI FUNCTIONS --- /** * Applies a pre-defined template to the content editor. * @param {string} templateName - The name of the template to apply. */ function applyTemplate(templateName) { currentTemplate = templateName; switch(templateName) { case 'alert': headlineEl.value = "URGENT: Security Alert!"; descriptionEl.value = "A new threat has been detected. Update your software immediately to stay protected. Your digital safety is our top priority."; break; case 'list': headlineEl.value = "Top 5 VPNs for 2025"; descriptionEl.value = "Lightning VPN: Best for speed\nSecureShell: Top for privacy\nGlobeTrotter VPN: Ideal for streaming\nPrivacyPeak: Excellent for beginners\nIronClad VPN: Most secure option"; break; case 'feature': headlineEl.value = "New Feature: Kill Switch"; descriptionEl.value = "Our new automatic Kill Switch feature ensures your IP address is never exposed, even if your VPN connection drops unexpectedly."; break; case 'fact': headlineEl.value = "Did You Know?"; descriptionEl.value = "Using a VPN can help you save money on flights and subscriptions by changing your virtual location."; break; } updatePreview(); } /** * Generates content using the Gemini API based on selected topic and style. */ async function generateContent() { const topic = document.getElementById('contentTopic').value; const style = document.getElementById('contentStyle').value; const generateButton = document.getElementById('generateButton'); const buttonText = document.getElementById('generateButtonText'); const spinner = document.getElementById('generateSpinner'); const apiError = document.getElementById('apiError'); // Show loading state buttonText.textContent = "Generating..."; spinner.classList.remove('hidden'); generateButton.disabled = true; apiError.classList.add('hidden'); // Determine if the request is for a list const isList = style.toLowerCase().includes('list') || topic.toLowerCase().includes('list'); currentTemplate = isList ? 'list' : 'default'; const prompt = `You are a marketing expert for tech products. Generate content for a social media graphic. Topic: "${topic}" Style: "${style}" Provide a short, punchy headline (max 10 words) and a brief description (max 40 words). ${isList ? "For the description, provide a bulleted list of 5 items, with each item on a new line. Do not use markdown like '*' or '-' for the list items." : ""} Return the response as a JSON object with two keys: "headline" and "description".`; try { const apiKey = ""; // API key is handled by the environment const apiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-05-20:generateContent?key=${apiKey}`; const payload = { contents: [{ role: "user", parts: [{ text: prompt }] }], generationConfig: { responseMimeType: "application/json", responseSchema: { type: "OBJECT", properties: { "headline": { "type": "STRING" }, "description": { "type": "STRING" } }, required: ["headline", "description"] } } }; const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); if (!response.ok) { throw new Error(`API error: ${response.statusText}`); } const result = await response.json(); if (result.candidates && result.candidates.length > 0) { const text = result.candidates[0].content.parts[0].text; const parsedJson = JSON.parse(text); headlineEl.value = parsedJson.headline; descriptionEl.value = parsedJson.description; updatePreview(); } else { throw new Error("No content generated. The response was empty."); } } catch (error) { console.error("Error fetching from Gemini API:", error); apiError.textContent = `Failed to generate content. ${error.message}`; apiError.classList.remove('hidden'); - Initial Deployment
aa41d8a verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tech Brand Studio | VPN & Software Marketing</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<script src="https://kit.fontawesome.com/3ffc3c7d21.js" crossorigin="anonymous"></script>
<style>
@keyframes pulse-glow {
0% { box-shadow: 0 0 0 0 rgba(7, 89, 133, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(7, 89, 133, 0); }
100% { box-shadow: 0 0 0 0 rgba(7, 89, 133, 0); }
}
:root {
--primary-bg: #0f172a;
--secondary-bg: #1e293b;
--accent-color: #0ea5e9;
--card-gradient: linear-gradient(135deg, #1d4ed8, #7e22ce);
}
body {
font-family: 'Inter', sans-serif;
background: var(--primary-bg);
min-height: 100vh;
}
.header-font {
font-family: 'Space Grotesk', sans-serif;
letter-spacing: -0.05rem;
}
.glassmorphism {
background: rgba(20, 30, 48, 0.6);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.preview-card-aspect-square { aspect-ratio: 1 / 1; }
.preview-card-aspect-portrait { aspect-ratio: 9 / 16; }
.preview-card-aspect-landscape { aspect-ratio: 16 / 9; }
.pulse-animation {
animation: pulse-glow 2s infinite;
}
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: rgba(15, 23, 42, 0.4);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: rgba(148, 163, 184, 0.4);
border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background: rgba(148, 163, 184, 0.6);
}
.chip {
display: inline-block;
background: rgba(14, 165, 233, 0.15);
border: 1px solid rgba(14, 165, 233, 0.3);
color: #38bdf8;
border-radius: 20px;
padding: 0.2rem 1rem;
font-size: 0.75rem;
font-weight: 500;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
transition: all 0.2s ease;
}
.chip:hover {
background: rgba(14, 165, 233, 0.25);
border-color: rgba(14, 165, 233, 0.6);
}
.chip.active {
background: rgba(14, 165, 233, 0.3);
border-color: rgba(14, 165, 233, 0.8);
}
.glow-text {
text-shadow: 0 0 8px rgba(14, 165, 233, 0.7);
}
.content-placeholder {
color: rgba(255, 255, 255, 0.5);
min-height: 1.25rem;
}
</style>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#0ea5e9',
primaryDark: '#0284c7',
darkBg: '#0f172a',
darkCard: '#1e293b',
darkBorder: '#334155',
}
}
}
}
</script>
</head>
<body class="text-gray-200 bg-darkBg min-h-screen flex flex-col">
<!-- Site Header -->
<header class="py-4 px-4 lg:px-8 border-b border-gray-800">
<div class="container mx-auto flex justify-between items-center">
<div class="flex items-center space-x-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 8L6 19.4M12 8L18 19.4M12 8L6 4.5M12 8L18 4.5" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="12" cy="3" r="1" fill="currentColor"/>
<circle cx="12" cy="21" r="1" fill="currentColor"/>
</svg>
<div>
<h1 class="text-2xl font-bold text-white header-font">VPN Brand Studio</h1>
<p class="text-sm text-gray-400">Create content for VPNs & software products</p>
</div>
</div>
<div class="hidden md:flex items-center space-x-4">
<button class="px-4 py-2 rounded-full bg-primary/10 hover:bg-primary/20 text-primary ring-1 ring-primary/30 transition-all">
<i class="fas fa-save mr-2"></i> Save Template
</button>
<button class="px-4 py-2 rounded-full bg-darkCard hover:bg-gray-700 text-gray-300 ring-1 ring-gray-700 transition-all">
<i class="fas fa-cog mr-2"></i> Settings
</button>
</div>
<div class="flex md:hidden">
<button id="mobile-menu" class="p-2 rounded-md bg-gray-800">
<i class="fas fa-bars text-gray-300"></i>
</button>
</div>
</div>
</header>
<div class="flex flex-col lg:flex-row flex-1 overflow-hidden">
<!-- Left Panel: Controls -->
<aside class="w-full lg:w-1/3 xl:w-1/4 p-4 lg:p-6 space-y-6 overflow-y-auto custom-scrollbar">
<!-- Brand Manager -->
<div class="glassmorphism p-6 rounded-2xl space-y-4 transition-all hover:border-opacity-40">
<h2 class="text-xl font-bold flex items-center">
<i class="fas fa-building text-primary mr-3"></i>
Brand Manager
</h2>
<div class="space-y-4">
<div>
<label class="block text-gray-400 text-sm mb-1">Brand Name</label>
<input type="text" id="brandName" placeholder="e.g., SecureGuard VPN" class="w-full bg-darkCard border border-gray-700 rounded-lg px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none transition">
</div>
<div>
<label class="block text-gray-400 text-sm mb-1">Tagline</label>
<input type="text" id="brandTagline" placeholder="e.g., Privacy Without Compromise" class="w-full bg-darkCard border border-gray-700 rounded-lg px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none transition">
</div>
<div class="space-y-3">
<label class="block text-gray-400 text-sm">Brand Assets</label>
<div class="grid grid-cols-2 gap-3">
<div>
<label for="logoUpload" class="w-full flex flex-col items-center justify-center bg-darkCard border-2 border-dashed border-gray-700 hover:border-primary/50 rounded-lg p-4 cursor-pointer transition-all duration-200">
<i class="fas fa-image text-primary mb-2 text-xl"></i>
<span class="text-sm">Upload Logo</span>
</label>
<input type="file" id="logoUpload" class="hidden" accept="image/*">
</div>
<div>
<label for="bgImageUpload" class="w-full flex flex-col items-center justify-center bg-darkCard border-2 border-dashed border-gray-700 hover:border-primary/50 rounded-lg p-4 cursor-pointer transition-all duration-200">
<i class="fas fa-globe text-primary mb-2 text-xl"></i>
<span class="text-sm">Background Image</span>
</label>
<input type="file" id="bgImageUpload" class="hidden" accept="image/*">
</div>
</div>
</div>
<div>
<label class="block text-gray-400 text-sm mb-1">Brand Color</label>
<div class="flex space-x-3">
<input type="color" id="brandColor" value="#0ea5e9" class="w-12 h-12 rounded-lg bg-darkCard cursor-pointer">
</div>
</div>
</div>
</div>
<!-- Content Categories -->
<div class="glassmorphism p-6 rounded-2xl">
<h2 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-layer-group text-primary mr-3"></i>
Content Themes
</h2>
<div class="flex flex-wrap gap-2">
<span class="chip active">Online Privacy</span>
<span class="chip">Security Threats</span>
<span class="chip">VPN Comparisons</span>
<span class="chip">Encryption Tech</span>
<span class="chip">Geo-Unblocking</span>
<span class="chip">DNS Protection</span>
<span class="chip">Speed Tests</span>
<span class="chip">No-Log Policies</span>
</div>
</div>
<!-- Content Suggestions -->
<div class="glassmorphism p-6 rounded-2xl space-y-4">
<h2 class="text-xl font-bold flex items-center">
<i class="fas fa-robot text-primary mr-3"></i>
AI Assistant
</h2>
<div>
<label class="block text-gray-400 text-sm mb-1">Generate Content About</label>
<select class="w-full bg-darkCard border border-gray-700 rounded-lg px-4 py-3 focus:ring-2 focus:ring-primary focus:outline-none transition">
<option>Online Privacy Risks</option>
<option>VPN vs Proxy Comparison</option>
<option>How Encryption Works</option>
<option>Benefits of a No-Logs Policy</option>
<option>How VPNs Improve Security</option>
<option>Bypassing Geographic Restrictions</option>
</select>
</div>
<button class="w-full bg-primary/10 hover:bg-primary/20 text-primary ring-1 ring-primary/30 rounded-lg px-4 py-3 flex items-center justify-center font-semibold transition-all transform hover:scale-[1.01]">
Generate Content Ideas
</button>
</div>
<!-- Content Templates -->
<div class="glassmorphism p-6 rounded-2xl">
<h2 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-star text-primary mr-3"></i>
Recommended Templates
</h2>
<div class="space-y-3">
<div class="p-3 bg-gray-800/30 rounded-lg cursor-pointer transition-all hover:bg-primary/10 border border-gray-700">
<div class="flex items-start">
<div class="mr-3 mt-1 text-primary">
<i class="fas fa-shield-alt"></i>
</div>
<div>
<h3 class="font-semibold">Security Showcase</h3>
<p class="text-sm text-gray-400">Highlight security features</p>
</div>
</div>
</div>
<div class="p-3 bg-gray-800/30 rounded-lg cursor-pointer transition-all hover:bg-primary/10 border border-gray-700">
<div class="flex items-start">
<div class="mr-3 mt-1 text-primary">
<i class="fas fa-list-ol"></i>
</div>
<div>
<h3 class="font-semibold">Top Features List</h3>
<p class="text-sm text-gray-400">Bullet point key benefits</p>
</div>
</div>
</div>
<div class="p-3 bg-gray-800/30 rounded-lg cursor-pointer transition-all hover:bg-primary/10 border border-gray-700">
<div class="flex items-start">
<div class="mr-3 mt-1 text-primary">
<i class="fas fa-globe-americas"></i>
</div>
<div>
<h3 class="font-semibold">Global Server Map</h3>
<p class="text-sm text-gray-400">Show worldwide coverage</p>
</div>
</div>
</div>
<div class="p-3 bg-gray-800/30 rounded-lg cursor-pointer transition-all hover:bg-primary/10 border border-gray-700">
<div class="flex items-start">
<div class="mr-3 mt-1 text-primary">
<i class="fas fa-bolt"></i>
</div>
<div>
<h3 class="font-semibold">Speed Comparison</h3>
<p class="text-sm text-gray-400">Display performance data</p>
</div>
</div>
</div>
</div>
</div>
</aside>
<!-- Right Panel: Preview & Actions -->
<main class="w-full lg:w-2/3 xl:w-3/4 flex flex-col items-center p-4 lg:p-8">
<!-- Preview Controls -->
<div class="w-full max-w-4xl bg-darkCard rounded-xl p-4 mb-6">
<div class="flex flex-wrap items-center justify-between gap-4">
<div class="space-y-2">
<h3 class="text-lg font-semibold">Preview Options</h3>
<div class="flex space-x-2 items-center">
<div class="bg-gray-800 px-2 py-1 rounded-lg">
<label class="text-sm text-gray-400 mr-2">Ratio:</label>
<div class="inline-flex space-x-1">
<button class="aspect-btn px-2 py-1 rounded-md bg-gray-950" data-aspect="square">1:1</button>
<button class="aspect-btn px-2 py-1 rounded-md" data-aspect="portrait">9:16</button>
<button class="aspect-btn px-2 py-1 rounded-md" data-aspect="landscape">16:9</button>
</div>
</div>
</div>
</div>
<div class="space-y-2">
<div class="space-y-1">
<label class="text-sm text-gray-400">Background Blur</label>
<input type="range" min="0" max="20" value="8" class="w-28 accent-primary">
</div>
</div>
<div class="space-y-2">
<div class="space-y-1">
<label class="text-sm text-gray-400">Light/Dark Mode</label>
<div class="relative inline-block">
<input type="checkbox" id="darkModeToggle" class="sr-only" checked>
<div class="block bg-gray-700 w-14 h-7 rounded-full"></div>
<div class="dot absolute left-1 top-1 bg-primary w-5 h-5 rounded-full transition transform"></div>
</div>
</div>
</div>
<div>
<button class="export-btn px-4 py-2 rounded-lg bg-primary text-white font-medium flex items-center">
<i class="fas fa-download mr-2"></i> Export as PNG
</button>
</div>
</div>
</div>
<!-- Main Preview Area -->
<div class="w-full flex justify-center mb-8 max-w-4xl">
<div id="preview-container" class="w-full">
<div id="preview-card" class="w-full h-0 relative overflow-hidden rounded-3xl preview-card-aspect-portrait">
<!-- Background Image -->
<div class="absolute inset-0 bg-cover bg-center" id="bg-container" style=""></div>
<!-- Background Overlay -->
<div class="absolute inset-0" id="bg-overlay" style="background: rgba(0, 0, 0, 0.4);"></div>
<!-- Content Container -->
<div class="absolute inset-0 z-10 flex flex-col items-center justify-center p-8 text-center">
<!-- Brand Identity Section -->
<div class="mb-6" id="logo-container">
<div class="w-32 h-32 bg-gray-200 border-2 border-dashed rounded-xl flex items-center justify-center text-gray-600">
Upload Logo
</div>
</div>
<!-- Headline -->
<h1 id="headline" class="text-5xl font-bold mb-6 text-white">
Protect Your<span class="text-primary glow-text"> Digital Life</span>
</h1>
<!-- Features List -->
<ul id="features-list" class="mb-8 text-left max-w-lg">
<li class="text-xl mb-4 flex items-start">
<i class="fas fa-check-circle text-primary mt-1 mr-3 text-lg"></i>
<span>Military-grade 256-bit encryption</span>
</li>
<li class="text-xl mb-4 flex items-start">
<i class="fas fa-check-circle text-primary mt-1 mr-3 text-lg"></i>
<span>2,000+ servers in 94 countries</span>
</li>
<li class="text-xl mb-4 flex items-start">
<i class="fas fa-check-circle text-primary mt-1 mr-3 text-lg"></i>
<span>Strict no-logs policy</span>
</li>
<li class="text-xl flex items-start">
<i class="fas fa-check-circle text-primary mt-1 mr-3 text-lg"></i>
<span>24/7 customer support</span>
</li>
</ul>
<!-- Call to Action Button -->
<div class="mt-6 relative z-20 cursor-pointer">
<span class="relative inline-flex items-center justify-center px-8 py-4 overflow-hidden font-bold rounded-full group pulse-animation">
<span class="absolute top-0 left-0 w-full h-full opacity-0 transition-all duration-500 transform -translate-x-full group-hover:opacity-100"></span>
<span class="absolute w-8 h-8 opacity-0 bottom-0 left-1/2 transform -translate-x-1/2 -translate-y-4 transition-all duration-500 ease-in-out"></span>
<span class="relative flex items-center text-white text-lg">
<i class="fas fa-shield-alt mr-3"></i>
Secure Your Connection Now
</span>
</span>
</div>
<!-- Brand Footer -->
<div class="mt-16 text-gray-300">
<p id="brand-name-tagline">SecureGuard VPN • Privacy Without Compromise</p>
</div>
</div>
</div>
</div>
</div>
<!-- Additional Templates -->
<div class="w-full max-w-4xl">
<h3 class="text-xl font-semibold mb-4">Other Recommended Templates</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<!-- Template 1 -->
<div class="relative h-40 bg-gradient-to-r from-blue-900 to-blue-700 rounded-xl overflow-hidden">
<div class="absolute inset-0 bg-gray-900/30 flex items-center justify-center">
<button class="text-white">Use This Template</button>
</div>
<div class="absolute top-2 left-2 text-sm text-white bg-primary/30 px-2 py-1 rounded">Premium</div>
</div>
<!-- Template 2 -->
<div class="relative h-40 bg-gradient-to-r from-violet-800 to-purple-800 rounded-xl overflow-hidden">
<div class="absolute inset-0 bg-gray-900/30 flex items-center justify-center">
<button class="text-white">Use This Template</button>
</div>
<div class="absolute top-2 left-2 text-sm text-white bg-primary/30 px-2 py-1 rounded">Free</div>
</div>
<!-- Template 3 -->
<div class="relative h-40 bg-gradient-to-r from-teal-900 to-emerald-800 rounded-xl overflow-hidden">
<div class="absolute inset-0 bg-gray-900/30 flex items-center justify-center">
<button class="text-white">Use This Template</button>
</div>
<div class="absolute top-2 left-2 text-sm text-white bg-primary/30 px-2 py-1 rounded">Popular</div>
</div>
</div>
</div>
</main>
</div>
<script>
// Initialize elements
document.addEventListener('DOMContentLoaded', function() {
// Aspect Ratio Buttons
const aspectBtns = document.querySelectorAll('.aspect-btn');
const previewCard = document.getElementById('preview-card');
aspectBtns.forEach(btn => {
btn.addEventListener('click', function() {
// Reset all buttons
aspectBtns.forEach(b => b.classList.remove('bg-primary', 'text-white'));
// Set active state
this.classList.add('bg-primary', 'text-white');
// Update aspect ratio
const aspect = this.dataset.aspect;
previewCard.className = previewCard.className.replace(/preview-card-aspect-(square|portrait|landscape)/, '');
previewCard.classList.add(`preview-card-aspect-${aspect}`);
});
});
// Set first aspect ratio button as active
if (aspectBtns.length > 0) {
aspectBtns[0].classList.add('bg-primary', 'text-white');
}
// File Upload Handlers
const logoUpload = document.getElementById('logoUpload');
if (logoUpload) {
logoUpload.addEventListener('change', function(e) {
if (e.target.files && e.target.files[0]) {
const reader = new FileReader();
reader.onload = function(event) {
document.getElementById('logo-container').innerHTML = `
<img src="${event.target.result}" class="max-h-24 mx-auto" alt="Brand Logo">
`;
}
reader.readAsDataURL(e.target.files[0]);
}
});
}
const bgUpload = document.getElementById('bgImageUpload');
if (bgUpload) {
bgUpload.addEventListener('change', function(e) {
if (e.target.files && e.target.files[0]) {
const reader = new FileReader();
reader.onload = function(event) {
document.getElementById('bg-container').style.backgroundImage = `url('${event.target.result}')`;
}
reader.readAsDataURL(e.target.files[0]);
}
});
}
// Brand Name & Tagline
const brandName = document.getElementById('brandName');
const brandTagline = document.getElementById('brandTagline');
const brandNameTaglineEl = document.getElementById('brand-name-tagline');
function updateBrand() {
if (!brandName.value && !brandTagline.value) {
brandNameTaglineEl.textContent = "SecureGuard VPN • Privacy Without Compromise";
return;
}
let name = brandName.value || "SecureGuard VPN";
let tagline = brandTagline.value ? ` • ${brandTagline.value}` : "";
brandNameTaglineEl.textContent = name + tagline;
}
brandName.addEventListener('input', updateBrand);
brandTagline.addEventListener('input', updateBrand);
// Color Picker
const brandColor = document.getElementById('brandColor');
brandColor.addEventListener('input', function() {
document.documentElement.style.setProperty('--accent-color', this.value);
document.querySelectorAll('.primary-color').forEach(el => {
el.style.color = this.value;
});
});
// Dark Mode Toggle
const darkModeToggle = document.getElementById('darkModeToggle');
darkModeToggle.addEventListener('change', function() {
if (this.checked) {
document.documentElement.style.setProperty('--primary-bg', '#0f172a');
document.documentElement.style.setProperty('--secondary-bg', '#1e293b');
} else {
document.documentElement.style.setProperty('--primary-bg', '#f8fafc');
document.documentElement.style.setProperty('--secondary-bg', '#f1f5f9');
}
});
// Export Button
const exportBtn = document.querySelector('.export-btn');
exportBtn.addEventListener('click', function() {
this.innerHTML = '<i class="fas fa-spinner animate-spin mr-2"></i> Exporting...';
html2canvas(document.getElementById('preview-container')).then(canvas => {
const link = document.createElement('a');
link.download = 'vpn-brand-studio-export.png';
link.href = canvas.toDataURL('image/png');
link.click();
this.innerHTML = '<i class="fas fa-download mr-2"></i> Export as PNG';
// Pulse effect on export
this.classList.add('pulse-animation');
setTimeout(() => {
this.classList.remove('pulse-animation');
}, 2000);
});
});
});
</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=Saad4web/ts3" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>