File size: 13,905 Bytes
b8d400c
 
 
 
 
 
 
 
 
 
 
 
a515efb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8d400c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a515efb
 
 
 
 
 
 
 
 
 
 
b8d400c
 
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
<!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>