YuriVM's picture
frontend for webapp. At the top left is a circular image of a cartoon prince standing confidently against a sky with clouds and balloons. In the center, there is a large, bold pink letter "A".
a515efb verified
Raw History Blame Contribute Delete
13.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlexDroid - Android Flex Design Studio</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>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.cells.min.js"></script>
</head>
<body>
<div class="app-container">
<img src="http://static.photos/fantasy/320x240/10" class="prince-image" alt="Cartoon Prince">
<div class="letter-a">A</div>
<div class="buttons-container">
<button class="action-button">
<img src="https://cdn.jsdelivr.net/npm/feather-icons/dist/icons/refresh-cw.svg" alt="Refresh">
</button>
<button class="action-button">
<img src="https://cdn.jsdelivr.net/npm/feather-icons/dist/icons/mic.svg" alt="Microphone">
</button>
<button class="action-button">
<img src="https://cdn.jsdelivr.net/npm/feather-icons/dist/icons/arrow-right.svg" alt="Next">
</button>
</div>
</div>
<main class="container mx-auto px-4 py-8">
<div class="flex flex-col md:flex-row gap-8">
<!-- Preview Section -->
<div class="md:w-1/3 bg-white rounded-xl shadow-lg overflow-hidden">
<div class="bg-indigo-600 p-4 text-white">
<h2 class="text-xl font-bold flex items-center gap-2">
<i data-feather="smartphone"></i> Device Preview
</h2>
</div>
<div class="p-4">
<div class="border-2 border-gray-300 rounded-3xl p-2 mx-auto" style="width: 300px; height: 600px;">
<div class="h-full bg-gray-50 rounded-2xl overflow-hidden flex flex-col">
<!-- Status Bar -->
<div class="bg-indigo-600 text-white p-2 flex justify-between items-center">
<span class="text-xs">9:41</span>
<div class="flex gap-1">
<i data-feather="signal" class="w-3 h-3"></i>
<i data-feather="wifi" class="w-3 h-3"></i>
<i data-feather="battery" class="w-3 h-3"></i>
</div>
</div>
<!-- Preview Content -->
<div id="previewContent" class="flex-grow p-4 flex flex-col gap-4">
<div class="bg-indigo-100 p-4 rounded-lg flex items-center justify-center">
<p class="text-indigo-800">Flex Item 1</p>
</div>
<div class="bg-indigo-100 p-4 rounded-lg flex items-center justify-center">
<p class="text-indigo-800">Flex Item 2</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Controls Section -->
<div class="md:w-2/3">
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-6">
<div class="bg-indigo-600 p-4 text-white">
<h2 class="text-xl font-bold flex items-center gap-2">
<i data-feather="sliders"></i> Flex Controls
</h2>
</div>
<div class="p-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<!-- Flex Direction -->
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-medium mb-2 flex items-center gap-1">
<i data-feather="columns" class="w-4 h-4"></i> Direction
</h3>
<div class="flex flex-wrap gap-2">
<button onclick="updateFlex('flex-row')" class="flex-btn bg-indigo-100 text-indigo-800 px-3 py-1 rounded">
Row
</button>
<button onclick="updateFlex('flex-row-reverse')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Row Reverse
</button>
<button onclick="updateFlex('flex-col')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Column
</button>
<button onclick="updateFlex('flex-col-reverse')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Column Reverse
</button>
</div>
</div>
<!-- Justify Content -->
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-medium mb-2 flex items-center gap-1">
<i data-feather="align-center" class="w-4 h-4"></i> Justify
</h3>
<div class="flex flex-wrap gap-2">
<button onclick="updateFlex('justify-start')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Start
</button>
<button onclick="updateFlex('justify-end')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
End
</button>
<button onclick="updateFlex('justify-center')" class="flex-btn bg-indigo-100 text-indigo-800 px-3 py-1 rounded">
Center
</button>
<button onclick="updateFlex('justify-between')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Between
</button>
<button onclick="updateFlex('justify-around')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Around
</button>
</div>
</div>
<!-- Align Items -->
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-medium mb-2 flex items-center gap-1">
<i data-feather="align-left" class="w-4 h-4"></i> Align
</h3>
<div class="flex flex-wrap gap-2">
<button onclick="updateFlex('items-start')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Start
</button>
<button onclick="updateFlex('items-end')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
End
</button>
<button onclick="updateFlex('items-center')" class="flex-btn bg-indigo-100 text-indigo-800 px-3 py-1 rounded">
Center
</button>
<button onclick="updateFlex('items-baseline')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Baseline
</button>
<button onclick="updateFlex('items-stretch')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Stretch
</button>
</div>
</div>
<!-- Flex Wrap -->
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-medium mb-2 flex items-center gap-1">
<i data-feather="wrap-text" class="w-4 h-4"></i> Wrap
</h3>
<div class="flex flex-wrap gap-2">
<button onclick="updateFlex('flex-nowrap')" class="flex-btn bg-indigo-100 text-indigo-800 px-3 py-1 rounded">
No Wrap
</button>
<button onclick="updateFlex('flex-wrap')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Wrap
</button>
<button onclick="updateFlex('flex-wrap-reverse')" class="flex-btn bg-gray-100 text-gray-800 px-3 py-1 rounded">
Wrap Reverse
</button>
</div>
</div>
</div>
<!-- Item Controls -->
<div class="mt-6 bg-gray-50 p-4 rounded-lg">
<h3 class="font-medium mb-2 flex items-center gap-1">
<i data-feather="layout" class="w-4 h-4"></i> Item Controls
</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium mb-1">Number of Items</label>
<input type="range" min="1" max="6" value="2" class="w-full" oninput="updateItemCount(this.value)">
</div>
<div>
<label class="block text-sm font-medium mb-1">Item Height</label>
<select class="w-full p-2 border rounded" onchange="updateItemHeight(this.value)">
<option value="h-16">Small</option>
<option value="h-24" selected>Medium</option>
<option value="h-32">Large</option>
</select>
</div>
</div>
</div>
</div>
</div>
<!-- Code Output -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="bg-indigo-600 p-4 text-white">
<h2 class="text-xl font-bold flex items-center gap-2">
<i data-feather="code"></i> Generated Code
</h2>
</div>
<div class="p-4">
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto">
<pre id="codeOutput" class="text-green-400 text-sm">
&lt;div class="flex flex-col items-center justify-center gap-4"&gt;
&lt;div class="bg-indigo-100 p-4 rounded-lg h-24 flex items-center justify-center"&gt;
&lt;p class="text-indigo-800"&gt;Flex Item 1&lt;/p&gt;
&lt;/div&gt;
&lt;div class="bg-indigo-100 p-4 rounded-lg h-24 flex items-center justify-center"&gt;
&lt;p class="text-indigo-800"&gt;Flex Item 2&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
<button onclick="copyCode()" class="mt-4 bg-indigo-600 text-white px-4 py-2 rounded-lg flex items-center gap-2">
<i data-feather="copy"></i> Copy Code
</button>
</div>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Initialize Vanta.js background
VANTA.CELLS({
el: "body",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
color1: 0x9fa8da,
color2: 0x7986cb,
size: 1.20,
speed: 1.10
});
</script>
<script>
// Add interactivity here if needed
document.querySelectorAll('.action-button').forEach(button => {
button.addEventListener('click', () => {
button.style.transform = 'scale(0.95)';
setTimeout(() => {
button.style.transform = 'scale(1)';
}, 200);
});
});
</script>
</body>
</html>