File size: 16,662 Bytes
ad9b2c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LangPal - Language Practice App</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>
        .gradient-bg {
            background: linear-gradient(135deg, #6B73FF 0%, #000DFF 50%, #0085FF 100%);
        }
        .dialogue-bubble {
            position: relative;
            border-radius: 20px;
            padding: 15px;
            margin: 10px 0;
            max-width: 80%;
        }
        .dialogue-bubble:after {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border: 15px solid transparent;
        }
        .user-bubble {
            background-color: #3B82F6;
            color: white;
            align-self: flex-end;
        }
        .user-bubble:after {
            border-left-color: #3B82F6;
            border-right: 0;
            right: -15px;
            top: 50%;
            transform: translateY(-50%);
        }
        .partner-bubble {
            background-color: #E5E7EB;
            color: #111827;
            align-self: flex-start;
        }
        .partner-bubble:after {
            border-right-color: #E5E7EB;
            border-left: 0;
            left: -15px;
            top: 50%;
            transform: translateY(-50%);
        }
        .waveform {
            height: 40px;
            background: linear-gradient(90deg, #3B82F6 0%, rgba(59, 130, 246, 0.5) 50%, rgba(59, 130, 246, 0.2) 100%);
            border-radius: 20px;
            animation: wave 1.5s infinite linear;
        }
        @keyframes wave {
            0% { background-position: 0% 50%; }
            100% { background-position: 100% 50%; }
        }
        .tab-active {
            border-bottom: 3px solid #3B82F6;
            color: #3B82F6;
            font-weight: 600;
        }
    </style>
</head>
<body class="bg-gray-50 min-h-screen">
    <!-- Header -->
    <header class="gradient-bg text-white shadow-lg">
        <div class="container mx-auto px-4 py-6">
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-3">
                    <i class="fas fa-comments text-3xl"></i>
                    <h1 class="text-2xl font-bold">LangPal</h1>
                </div>
                <div class="flex items-center space-x-4">
                    <button class="bg-white text-blue-600 px-4 py-2 rounded-full font-medium flex items-center">
                        <i class="fas fa-plus mr-2"></i> New Dialogue
                    </button>
                    <div class="w-10 h-10 rounded-full bg-white flex items-center justify-center text-blue-600 font-bold">
                        <i class="fas fa-user"></i>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <main class="container mx-auto px-4 py-8">
        <!-- Language Selector -->
        <div class="bg-white rounded-xl shadow-md p-4 mb-6">
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 border-0 rounded-full py-2 pl-4 pr-8 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option>English</option>
                            <option>Spanish</option>
                            <option>French</option>
                            <option>German</option>
                            <option>Japanese</option>
                        </select>
                        <i class="fas fa-chevron-down absolute right-3 top-3 text-gray-500"></i>
                    </div>
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 border-0 rounded-full py-2 pl-4 pr-8 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option>Spanish</option>
                            <option>English</option>
                            <option>French</option>
                            <option>German</option>
                            <option>Japanese</option>
                        </select>
                        <i class="fas fa-chevron-down absolute right-3 top-3 text-gray-500"></i>
                    </div>
                </div>
                <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-full font-medium flex items-center">
                    <i class="fas fa-exchange-alt mr-2"></i> Switch
                </button>
            </div>
        </div>

        <!-- Tabs -->
        <div class="flex border-b border-gray-200 mb-6">
            <button class="px-4 py-3 font-medium text-gray-500 hover:text-blue-600 mr-2 tab-active">
                <i class="fas fa-comment-dots mr-2"></i> Dialogue
            </button>
            <button class="px-4 py-3 font-medium text-gray-500 hover:text-blue-600 mr-2">
                <i class="fas fa-headphones mr-2"></i> Listen
            </button>
            <button class="px-4 py-3 font-medium text-gray-500 hover:text-blue-600">
                <i class="fas fa-microphone mr-2"></i> Practice
            </button>
        </div>

        <!-- Dialogue Content -->
        <div class="bg-white rounded-xl shadow-md overflow-hidden mb-6">
            <!-- Dialogue Title -->
            <div class="border-b border-gray-200 p-4 bg-gray-50">
                <h2 class="text-xl font-semibold text-gray-800">At the Restaurant</h2>
                <p class="text-gray-500 text-sm">Practice ordering food in Spanish</p>
            </div>

            <!-- Dialogue Lines -->
            <div class="p-4 flex flex-col">
                <!-- Line 1 -->
                <div class="dialogue-bubble partner-bubble">
                    <div class="flex justify-between items-start mb-1">
                        <span class="font-semibold">Waiter</span>
                        <div class="flex space-x-2">
                            <button class="text-gray-500 hover:text-blue-500">
                                <i class="fas fa-volume-up"></i>
                            </button>
                            <button class="text-gray-500 hover:text-blue-500">
                                <i class="fas fa-edit"></i>
                            </button>
                        </div>
                    </div>
                    <p>Buenas noches. ¿Tienen una reserva?</p>
                    <p class="text-gray-500 text-sm mt-2">Good evening. Do you have a reservation?</p>
                </div>

                <!-- Line 2 -->
                <div class="dialogue-bubble user-bubble">
                    <div class="flex justify-between items-start mb-1">
                        <span class="font-semibold">You</span>
                        <div class="flex space-x-2">
                            <button class="text-white hover:text-blue-200">
                                <i class="fas fa-volume-up"></i>
                            </button>
                            <button class="text-white hover:text-blue-200">
                                <i class="fas fa-edit"></i>
                            </button>
                        </div>
                    </div>
                    <p>Sí, reservamos a las 8 para dos personas a nombre de García.</p>
                    <p class="text-blue-100 text-sm mt-2">Yes, we reserved at 8 for two people under García.</p>
                </div>

                <!-- Line 3 -->
                <div class="dialogue-bubble partner-bubble">
                    <div class="flex justify-between items-start mb-1">
                        <span class="font-semibold">Waiter</span>
                        <div class="flex space-x-2">
                            <button class="text-gray-500 hover:text-blue-500">
                                <i class="fas fa-volume-up"></i>
                            </button>
                            <button class="text-gray-500 hover:text-blue-500">
                                <i class="fas fa-edit"></i>
                            </button>
                        </div>
                    </div>
                    <p>Perfecto. Por aquí, por favor. ¿Les gustaría ver el menú de bebidas primero?</p>
                    <p class="text-gray-500 text-sm mt-2">Perfect. This way, please. Would you like to see the drinks menu first?</p>
                </div>
            </div>

            <!-- Add New Line -->
            <div class="border-t border-gray-200 p-4 bg-gray-50">
                <div class="flex items-center space-x-3">
                    <select class="bg-gray-100 border-0 rounded-full py-2 pl-4 pr-8 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <option>Waiter</option>
                        <option>You</option>
                    </select>
                    <input type="text" placeholder="Enter dialogue line..." class="flex-1 bg-gray-100 border-0 rounded-full py-2 px-4 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <button class="bg-blue-500 hover:bg-blue-600 text-white p-2 rounded-full">
                        <i class="fas fa-plus"></i>
                    </button>
                </div>
            </div>
        </div>

        <!-- Practice Section -->
        <div class="bg-white rounded-xl shadow-md overflow-hidden">
            <div class="border-b border-gray-200 p-4 bg-gray-50">
                <h2 class="text-xl font-semibold text-gray-800">Practice Speaking</h2>
                <p class="text-gray-500 text-sm">Record yourself and compare with the original</p>
            </div>

            <div class="p-6">
                <!-- Current Line to Practice -->
                <div class="bg-blue-50 rounded-lg p-4 mb-6">
                    <div class="flex justify-between items-center mb-2">
                        <span class="font-semibold text-blue-800">Current Line</span>
                        <button class="text-blue-500 hover:text-blue-700">
                            <i class="fas fa-volume-up"></i> Play Original
                        </button>
                    </div>
                    <p class="text-blue-900">Sí, reservamos a las 8 para dos personas a nombre de García.</p>
                    <p class="text-blue-700 text-sm mt-1">Yes, we reserved at 8 for two people under García.</p>
                </div>

                <!-- Recording UI -->
                <div class="text-center">
                    <div class="w-24 h-24 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-6 cursor-pointer hover:bg-blue-200 transition">
                        <i class="fas fa-microphone text-3xl text-blue-600"></i>
                    </div>
                    
                    <div class="waveform mb-6"></div>
                    
                    <div class="flex justify-center space-x-4">
                        <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-6 py-2 rounded-full font-medium flex items-center">
                            <i class="fas fa-redo mr-2"></i> Retry
                        </button>
                        <button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-full font-medium flex items-center">
                            <i class="fas fa-check mr-2"></i> Compare
                        </button>
                    </div>
                </div>

                <!-- Results (hidden by default) -->
                <div class="mt-8 hidden">
                    <h3 class="text-lg font-semibold text-gray-800 mb-4">Comparison Results</h3>
                    
                    <div class="mb-6">
                        <div class="flex justify-between mb-1">
                            <span class="text-sm font-medium text-gray-700">Original</span>
                            <span class="text-sm font-medium text-green-600">95% match</span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2.5">
                            <div class="bg-green-500 h-2.5 rounded-full" style="width: 95%"></div>
                        </div>
                    </div>
                    
                    <div class="grid grid-cols-2 gap-4">
                        <div class="bg-gray-100 p-4 rounded-lg">
                            <h4 class="font-medium text-gray-700 mb-2">Original</h4>
                            <p class="text-gray-800">Sí, reservamos a las 8 para dos personas a nombre de García.</p>
                            <div class="mt-3 flex items-center text-sm text-gray-500">
                                <i class="fas fa-check-circle text-green-500 mr-1"></i>
                                <span>Perfect pronunciation</span>
                            </div>
                        </div>
                        
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-medium text-blue-700 mb-2">Your Recording</h4>
                            <p class="text-blue-800">Sí, reservamos a las 8 para dos personas a nombre de García.</p>
                            <div class="mt-3 flex items-center text-sm text-blue-500">
                                <i class="fas fa-info-circle mr-1"></i>
                                <span>Minor intonation difference</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-6 flex justify-center">
                        <button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-full font-medium">
                            Next Line <i class="fas fa-arrow-right ml-2"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- Bottom Navigation -->
    <nav class="fixed bottom-0 left-0 right-0 bg-white shadow-lg border-t border-gray-200">
        <div class="container mx-auto px-4">
            <div class="flex justify-around">
                <a href="#" class="py-4 px-6 text-center text-blue-600">
                    <i class="fas fa-home block text-xl mb-1"></i>
                    <span class="text-xs">Home</span>
                </a>
                <a href="#" class="py-4 px-6 text-center text-gray-500 hover:text-blue-600">
                    <i class="fas fa-book block text-xl mb-1"></i>
                    <span class="text-xs">Library</span>
                </a>
                <a href="#" class="py-4 px-6 text-center text-gray-500 hover:text-blue-600">
                    <i class="fas fa-chart-line block text-xl mb-1"></i>
                    <span class="text-xs">Progress</span>
                </a>
                <a href="#" class="py-4 px-6 text-center text-gray-500 hover:text-blue-600">
                    <i class="fas fa-cog block text-xl mb-1"></i>
                    <span class="text-xs">Settings</span>
                </a>
            </div>
        </div>
    </nav>

    <script>
        // Simple script to toggle the practice results
        document.querySelector('.fa-microphone').closest('div').addEventListener('click', function() {
            // In a real app, this would start recording
            setTimeout(() => {
                document.querySelector('.waveform').classList.add('hidden');
                document.querySelector('.hidden').classList.remove('hidden');
            }, 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=kubodimo0/lp-01" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>