Dooratre commited on
Commit
f065149
·
verified ·
1 Parent(s): 8a5db1d

Update templates/arabic.html

Browse files
Files changed (1) hide show
  1. templates/arabic.html +523 -523
templates/arabic.html CHANGED
@@ -1,524 +1,524 @@
1
- <!DOCTYPE html>
2
- <html class="no-js" lang="en">
3
-
4
- <head>
5
- <meta charset="utf-8">
6
- <title>eStore Template</title>
7
- <meta name="description" content="">
8
- <meta name="viewport" content="width=device-width, initial-scale=1">
9
-
10
- <link rel="shortcut icon" href="assets/images/favicon.png" type="image/png">
11
- <link rel="preconnect" href="https://fonts.googleapis.com">
12
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
- <link href="https://fonts.googleapis.com/css2?family=Milonga&display=swap" rel="stylesheet">
14
- <link rel="stylesheet" href="assets/css/slick.css">
15
- <link rel="stylesheet" href="assets/css/LineIcons.css">
16
- <link rel="stylesheet" href="assets/css/materialdesignicons.min.css">
17
- <link rel="stylesheet" href="assets/css/jquery-ui.min.css">
18
- <link rel="stylesheet" href="assets/css/nice-select.css">
19
- <link rel="stylesheet" href="assets/css/bootstrap.min.css">
20
- <link rel="stylesheet" href="assets/css/default.css">
21
- <link rel="stylesheet" href="assets/css/style.css">
22
- <style>
23
- @media (max-width: 767px) {
24
- .navbar-style-7 .navbar-container {
25
- background-color: #1BFD9C;
26
- }}
27
- .navbar-style-7 {
28
- background-color: #000;
29
- }
30
-
31
- .primary-icon-text,
32
- .primary-btn-text {
33
- color: #1BFD9C;
34
- }
35
-
36
- body {
37
- background-color: #000000;
38
- margin: 0;
39
- padding: 0;
40
- color: #000000;
41
- }
42
-
43
- p {
44
- font-family: "Milonga", serif;
45
- font-size: 18px;
46
- line-height: 22px;
47
- font-weight: 400;
48
- color:#000000;
49
- margin: 0;
50
- }
51
-
52
-
53
- .navigation {
54
- background-color: #007bff;
55
- color: #fff;
56
- }
57
-
58
- .navbar-top-link a {
59
- color: #fff;
60
- text-decoration: none;
61
- }
62
-
63
- .navbar-top-link a:hover {
64
- color: #fff;
65
- text-decoration: underline;
66
- }
67
-
68
-
69
-
70
- #chat-container {
71
- background-color: #000000;
72
- width: 100%;
73
- height: calc(100vh - 60px);
74
- display: flex;
75
- flex-direction: column;
76
- justify-content: flex-start;
77
- align-items: flex-start;
78
- color: #ffffff;
79
- overflow-y: auto;
80
- flex-grow: 1;
81
- padding: 20px;
82
- padding-bottom: 100px; /* Add padding to the bottom of the chat container */
83
- }
84
- .message {
85
- margin-bottom: 10px;
86
- }
87
-
88
- .user-message {
89
- font-family: "Milonga", serif;
90
- font-size: 18px;
91
- line-height: 22px;
92
- font-weight: 400;
93
- color: #1BFD9C;
94
- background-color: #000000;
95
- border-radius: 10px;
96
- padding: 10px;
97
- text-align: left;
98
- margin-bottom: 10px;
99
- display: flex;
100
- align-items: flex-start;
101
- }
102
-
103
- .user-avatar {
104
- width: 40px;
105
- height: 40px;
106
- border-radius: 50%;
107
- margin-right: 10px;
108
- }
109
-
110
- .bot-message {
111
- background-color: #1BFD9C;
112
- border-radius: 10px;
113
- padding: 10px;
114
- text-align: left;
115
- margin-bottom: 10px;
116
- display: flex;
117
- align-items: flex-start;
118
- }
119
-
120
- .bot-avatar {
121
- width: 40px;
122
- height: 40px;
123
- border-radius: 50%;
124
- margin-right: 10px;
125
- }
126
-
127
- #input-container {
128
- position: absolute;
129
- bottom: 0;
130
- right: 0;
131
- width: 100%;
132
- background: none;
133
- display: flex;
134
- justify-content: center;
135
- align-items: center;
136
- padding: 10px; /* Add padding around the input field and button */
137
- box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Add a shadow at the bottom */
138
- animation: slideIn 0.5s ease-in-out;
139
- }
140
- input[type="text"] {
141
- --green: #1BFD9C;
142
- font-size: 15px; /* Increase font size for phone view */
143
- padding: 0.65em 2.7em;
144
- letter-spacing: 0.06em;
145
- position: relative;
146
- font-family: inherit;
147
- border-radius: 0.6em;
148
- overflow: hidden;
149
- transition: all 0.3s;
150
- line-height: 1.4em;
151
- border: 2px solid var(--green);
152
- background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%,transparent 60% , rgba(27, 253, 156, 0.1) 100%);
153
- color: var(--green);
154
- box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
155
- }
156
-
157
- input[type="text"]:focus {
158
- outline: none;
159
- box-shadow: 0 0 5px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
160
- }
161
-
162
-
163
-
164
- .navbar-sidebar-7 {
165
- position: absolute;
166
- bottom: 0;
167
- right: 0;
168
- width: 100%;
169
- z-index: 999; /* Ensure the menu is above other elements */
170
- } .coin {
171
- font-size: 200px;
172
- width: 0.1em;
173
- height: 1em;
174
- background: linear-gradient(#faa504, #141001);
175
- margin: auto;
176
- position: absolute;
177
- top: 0;
178
- left: 0;
179
- right: 0;
180
- bottom: 0;
181
- animation: rotate_4001510 3s infinite linear;
182
- transform-style: preserve-3d;
183
- background-color: #000000;
184
- }
185
-
186
- .coin .side,
187
- .coin:before,
188
- .coin:after {
189
- content: "";
190
- position: absolute;
191
- width: 1em;
192
- height: 1em;
193
- overflow: hidden;
194
- border-radius: 50%;
195
- right: -0.4em;
196
- text-align: center;
197
- line-height: 1;
198
- transform: rotateY(-90deg);
199
- -moz-backface-visibility: hidden;
200
- -webkit-backface-visibility: hidden;
201
- backface-visibility: hidden;
202
- }
203
-
204
- .coin .tails,
205
- .coin:after {
206
- left: -0.4em;
207
- transform: rotateY(90deg);
208
- }
209
-
210
- .coin:before,
211
- .coin:after {
212
- background: linear-gradient(#faa504, #141001);
213
- backface-visibility: hidden;
214
- transform: rotateY(90deg);
215
- }
216
-
217
- .coin:after {
218
- transform: rotateY(-90deg);
219
- }
220
-
221
- @keyframes rotate_4001510 {
222
- 100% {
223
- transform: rotateY(360deg);
224
- }
225
- }
226
-
227
- .svg_back {
228
- transform: scaleX(-1);
229
- }
230
- .preloader {
231
- background-color: #000;
232
- }
233
- button {
234
- --green: #1BFD9C;
235
- font-size: 15px;
236
- padding: 0.65em 2.7em;
237
- letter-spacing: 0.06em;
238
- position: relative;
239
- font-family: inherit;
240
- border-radius: 0.6em;
241
- overflow: hidden;
242
- transition: all 0.3s;
243
- line-height: 1.4em;
244
- border: 2px solid var(--green);
245
- background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%,transparent 60% , rgba(27, 253, 156, 0.1) 100%);
246
- color: var(--green);
247
- box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
248
- }
249
-
250
- button:hover {
251
- color: #82ffc9;
252
- box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
253
- }
254
-
255
- button:before {
256
- content: "";
257
- position: absolute;
258
- left: -4em;
259
- width: 4em;
260
- height: 100%;
261
- top: 0;
262
- transition: transform .4s ease-in-out;
263
- background: linear-gradient(to right, transparent 1%, rgba(27, 253, 156, 0.1) 40%,rgba(27, 253, 156, 0.1) 60% , transparent 100%);
264
- }
265
-
266
- button:hover:before {
267
- transform: translateX(15em);
268
- }
269
-
270
- .typing::after {
271
- content: "";
272
- display: inline-block;
273
- width: 4px;
274
- height: 12px;
275
- background-color: #000;
276
- animation: typing 1s infinite;
277
- }
278
-
279
- @keyframes typing {
280
- 0% {
281
- opacity: 0;
282
- }
283
- 50% {
284
- opacity: 1;
285
- }
286
- 100% {
287
- opacity: 0;
288
- }
289
- }
290
- @keyframes slideIn {
291
- 0% {
292
- transform: translateY(100%);
293
- opacity: 0;
294
- }
295
- 100% {
296
- transform: translateY(0);
297
- opacity: 1;
298
- }
299
- }
300
-
301
- .send-btn {
302
- animation: fadeIn 0.5s ease-in-out;
303
- }
304
-
305
- @keyframes fadeIn {
306
- 0% {
307
- opacity: 0;
308
- }
309
- 100% {
310
- opacity: 1;
311
- }
312
- }
313
-
314
- </style>
315
- </head>
316
-
317
- <body>
318
-
319
- <div class="preloader hidden">
320
- <div class="coin">
321
- <div class="side heads">
322
- <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" height="100%" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 4091.27 4091.73" xmlns:xlink="http://www.w3.org/1999/xlink">
323
- <g id="Layer_x0020_1">
324
- <metadata id="CorelCorpID_0Corel-Layer"></metadata>
325
- <g id="_1421344023328">
326
- <path fill="#F7931A" fill-rule="nonzero" d="M4030.06 2540.77c-273.24,1096.01 -1383.32,1763.02 -2479.46,1489.71 -1095.68,-273.24 -1762.69,-1383.39 -1489.33,-2479.31 273.12,-1096.13 1383.2,-1763.19 2479,-1489.95 1096.06,273.24 1763.03,1383.51 1489.76,2479.57l0.02 -0.02z"></path>
327
- <path fill="white" fill-rule="nonzero" d="M2947.77 1754.38c40.72,-272.26 -166.56,-418.61 -450,-516.24l91.95 -368.8 -224.5 -55.94 -89.51 359.09c-59.02,-14.72 -119.63,-28.59 -179.87,-42.34l90.16 -361.46 -224.36 -55.94 -92 368.68c-48.84,-11.12 -96.81,-22.11 -143.35,-33.69l0.26 -1.16 -309.59 -77.31 -59.72 239.78c0,0 166.56,38.18 163.05,40.53 90.91,22.69 107.35,82.87 104.62,130.57l-104.74 420.15c6.26,1.59 14.38,3.89 23.34,7.49 -7.49,-1.86 -15.46,-3.89 -23.73,-5.87l-146.81 588.57c-11.11,27.62 -39.31,69.07 -102.87,53.33 2.25,3.26 -163.17,-40.72 -163.17,-40.72l-111.46 256.98 292.15 72.83c54.35,13.63 107.61,27.89 160.06,41.3l-92.9 373.03 224.24 55.94 92 -369.07c61.26,16.63 120.71,31.97 178.91,46.43l-91.69 367.33 224.51 55.94 92.89 -372.33c382.82,72.45 670.67,43.24 791.83,-303.02 97.63,-278.78 -4.86,-439.58 -206.26,-544.44 146.69,-33.83 257.18,-130.31 286.64,-329.61l-0.07 -0.05zm-512.93 719.26c-69.38,278.78 -538.76,128.08 -690.94,90.29l123.28 -494.2c152.17,37.99 640.17,113.17 567.67,403.91zm69.43 -723.3c-63.29,253.58 -453.96,124.75 -580.69,93.16l111.77 -448.21c126.73,31.59 534.85,90.55 468.94,355.05l-0.02 0z"></path>
328
- </g>
329
- </g>
330
- </svg>
331
- </div>
332
- <div class="side tails">
333
- <svg xmlns="http://www.w3.org/2000/svg" class="svg_back" xml:space="preserve" width="100%" height="100%" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 4091.27 4091.73" xmlns:xlink="http://www.w3.org/1999/xlink">
334
- <g id="Layer_x0020_1">
335
- <metadata id="CorelCorpID_0Corel-Layer"></metadata>
336
- <g id="_1421344023328">
337
- <path fill="#F7931A" fill-rule="nonzero" d="M4030.06 2540.77c-273.24,1096.01 -1383.32,1763.02 -2479.46,1489.71 -1095.68,-273.24 -1762.69,-1383.39 -1489.33,-2479.31 273.12,-1096.13 1383.2,-1763.19 2479,-1489.95 1096.06,273.24 1763.03,1383.51 1489.76,2479.57l0.02 -0.02z"></path>
338
- <path fill="white" fill-rule="nonzero" d="M2947.77 1754.38c40.72,-272.26 -166.56,-418.61 -450,-516.24l91.95 -368.8 -224.5 -55.94 -89.51 359.09c-59.02,-14.72 -119.63,-28.59 -179.87,-42.34l90.16 -361.46 -224.36 -55.94 -92 368.68c-48.84,-11.12 -96.81,-22.11 -143.35,-33.69l0.26 -1.16 -309.59 -77.31 -59.72 239.78c0,0 166.56,38.18 163.05,40.53 90.91,22.69 107.35,82.87 104.62,130.57l-104.74 420.15c6.26,1.59 14.38,3.89 23.34,7.49 -7.49,-1.86 -15.46,-3.89 -23.73,-5.87l-146.81 588.57c-11.11,27.62 -39.31,69.07 -102.87,53.33 2.25,3.26 -163.17,-40.72 -163.17,-40.72l-111.46 256.98 292.15 72.83c54.35,13.63 107.61,27.89 160.06,41.3l-92.9 373.03 224.24 55.94 92 -369.07c61.26,16.63 120.71,31.97 178.91,46.43l-91.69 367.33 224.51 55.94 92.89 -372.33c382.82,72.45 670.67,43.24 791.83,-303.02 97.63,-278.78 -4.86,-439.58 -206.26,-544.44 146.69,-33.83 257.18,-130.31 286.64,-329.61l-0.07 -0.05zm-512.93 719.26c-69.38,278.78 -538.76,128.08 -690.94,90.29l123.28 -494.2c152.17,37.99 640.17,113.17 567.67,403.91zm69.43 -723.3c-63.29,253.58 -453.96,124.75 -580.69,93.16l111.77 -448.21c126.73,31.59 534.85,90.55 468.94,355.05l-0.02 0z"></path>
339
- </g>
340
- </g>
341
- </svg>
342
- </div>
343
- </div>
344
- </div>
345
-
346
- <div class="navigation">
347
- <header class="navbar-style-7 position-relative">
348
- <div class="container">
349
- <div class="navbar-mobile d-lg-none">
350
- <div class="row align-items-center">
351
- <div class="col-3">
352
- <div class="navbar-toggle icon-text-btn">
353
- <a class="icon-btn primary-icon-text mobile-menu-open-7" href="javascript:void(0)">
354
- <i class="mdi mdi-menu"></i>
355
- </a>
356
- </div>
357
- </div>
358
- <div class="col-6">
359
- <div class="mobile-logo text-center">
360
- <a href="/"><img src="/assets/images/yy.png" alt="Logo"></a>
361
- </div>
362
- </div>
363
-
364
- <div class="col-12">
365
-
366
- <div class="input-group mb-3 input-container" id="input-container">
367
- <input id="user-input" type="text" class="form-control" placeholder="Type your message...">
368
- <button id="send-btn" class="send-btn">SEND</button>
369
- </div>
370
- </div>
371
-
372
- <div class="col-3"></div>
373
-
374
- </div>
375
- </div>
376
- </div>
377
-
378
- <div class="navbar-container navbar-sidebar-7">
379
- <div class="navbar-close d-lg-none">
380
- <a class="close-mobile-menu-7" href="javascript:void(0)"><i class="mdi mdi-close"></i></a>
381
- </div>
382
-
383
- <div class="navbar-top-wrapper">
384
- <div class="container-lg">
385
- <div class="navbar-top d-lg-flex justify-content-between">
386
- <div class="navbar-top-left">
387
-
388
- </div>
389
- <div class="navbar-top-right">
390
- <div class="navbar-top-link">
391
- <li><a id="clear-history-btn"><i class="mdi mdi-delete" style="font-size: 24px; margin-right: 5px;"></i> Clear Conversation</a></li>
392
- <br>
393
- <li><a href="/trans" style="text-decoration: none;"><i class="mdi mdi-abjad-arabic" style="font-size: 24px; margin-right: 5px;"></i>Arabic</a></li>
394
-
395
-
396
- </div>
397
- <div class="navbar-top-right">
398
- <ul class="navbar-top-link">
399
- </ul>
400
- </div>
401
- </div>
402
- </div>
403
- </div>
404
- </div>
405
-
406
- <div class="navbar-wrapper">
407
- <div class="container-lg">
408
- <nav class="main-navbar d-lg-flex justify-content-between align-items-center">
409
- <div class="desktop-logo d-none d-lg-block">
410
- </div>
411
- </nav>
412
- </div>
413
- </div>
414
- <div class="navbar-top-right">
415
- <ul class="navbar-top-link">
416
- <li></li>
417
- </div>
418
- </div>
419
- <div class="container-fluid">
420
- <div class="row">
421
- <div class="col-12">
422
- <div id="chat-container">
423
- <div id="chat-box"></div>
424
- </div>
425
- </div>
426
- <div id="trading-container"></div>
427
- </div>
428
- </div>
429
- </header>
430
- </div>
431
-
432
- <script src="assets/js/popper.min.js"></script>
433
- <script src="assets/js/bootstrap.min.js"></script>
434
- <script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
435
- <script src="assets/js/vendor/modernizr-3.7.1.min.js"></script>
436
- <script>
437
- const chatBox = document.getElementById('chat-box');
438
- const userInput = document.getElementById('user-input');
439
- const sendBtn = document.getElementById('send-btn');
440
- const clearHistoryBtn = document.getElementById('clear-history-btn');
441
-
442
- // Event listener for send button click
443
- sendBtn.addEventListener('click', () => {
444
- const userMessage = userInput.value;
445
- userInput.value = '';
446
-
447
- chatBox.innerHTML += `
448
- <div class="message user-message">
449
- <img src="https://th.bing.com/th/id/OIP.OYbzbbyzogwtriubL2pP0AHaHa?w=195&h=195&c=7&r=0&o=5&pid=1.7" alt="User Avatar" class="user-avatar">
450
- <user-message>${userMessage}<user-message/>
451
- </div>
452
- `;
453
-
454
- const botMessage = document.createElement('div');
455
- botMessage.classList.add('message', 'bot-message');
456
- botMessage.innerHTML = `
457
- <img src="assets/images/AI.png" alt="Bot Avatar" class="bot-avatar">
458
- <p class="typing typing-animation"></p>
459
- `;
460
- chatBox.appendChild(botMessage);
461
-
462
- fetch('/arabic', {
463
- method: 'POST',
464
- headers: {
465
- 'Content-Type': 'application/json'
466
- },
467
- body: JSON.stringify({ user_input: userMessage })
468
- })
469
- .then(response => response.text())
470
- .then(data => {
471
- const formattedData = data.replace(/\<br>/g, '<br>');
472
- const typingElement = botMessage.lastElementChild;
473
-
474
- // Split the response data into an array of words
475
- const words = formattedData.split(' ');
476
-
477
- // Use a recursive function to display each word with a delay
478
- function displayWords(index) {
479
- if (index < words.length) {
480
- typingElement.innerHTML += words[index] + ' ';
481
- setTimeout(() => {
482
- displayWords(index + 1);
483
- }, 200); // Adjust the delay as needed
484
- } else {
485
- typingElement.classList.remove('typing-animation');
486
- }
487
- }
488
-
489
- displayWords(0);
490
- });
491
- });
492
-
493
- // Event listener for clear history button click
494
- clearHistoryBtn.addEventListener('click', () => {
495
- fetch('/clear_history')
496
- .then(response => response.text())
497
- .then(data => {
498
- console.log(data); // You can handle the response data as needed
499
- // Clear the chat box
500
- chatBox.innerHTML = '';
501
- });
502
- });
503
-
504
- // Event listener for beforeunload event
505
- window.addEventListener('beforeunload', () => {
506
- fetch('/clear_history')
507
- .then(response => response.text())
508
- .then(data => {
509
- // Clear the chat box before the page is unloaded
510
- chatBox.innerHTML = '';
511
- });
512
- });
513
- </script>
514
- <script src="assets/js/slick.min.js"></script>
515
- <script src="assets/js/jquery-vj-accordion-steps.js"></script>
516
- <script src="assets/js/jquery-ui.min.js"></script>
517
- <script src="assets/js/jquery.form-validator.min.js"></script>
518
- <script src="assets/js/jquery.nice-select.min.js"></script>
519
- <script src="assets/js/jquery.formatter.min.js"></script>
520
- <script src="assets/js/count-up.min.js"></script>
521
- <script src="assets/js/main.js"></script>
522
- </body>
523
-
524
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html class="no-js" lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>eStore Template</title>
7
+ <meta name="description" content="">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+
10
+ <link rel="shortcut icon" href="assets/images/favicon.png" type="image/png">
11
+ <link rel="preconnect" href="https://fonts.googleapis.com">
12
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
+ <link href="https://fonts.googleapis.com/css2?family=Milonga&display=swap" rel="stylesheet">
14
+ <link rel="stylesheet" href="assets/css/slick.css">
15
+ <link rel="stylesheet" href="assets/css/LineIcons.css">
16
+ <link rel="stylesheet" href="assets/css/materialdesignicons.min.css">
17
+ <link rel="stylesheet" href="assets/css/jquery-ui.min.css">
18
+ <link rel="stylesheet" href="assets/css/nice-select.css">
19
+ <link rel="stylesheet" href="assets/css/bootstrap.min.css">
20
+ <link rel="stylesheet" href="assets/css/default.css">
21
+ <link rel="stylesheet" href="assets/css/style.css">
22
+ <style>
23
+ @media (max-width: 767px) {
24
+ .navbar-style-7 .navbar-container {
25
+ background-color: #1BFD9C;
26
+ }}
27
+ .navbar-style-7 {
28
+ background-color: #000;
29
+ }
30
+
31
+ .primary-icon-text,
32
+ .primary-btn-text {
33
+ color: #1BFD9C;
34
+ }
35
+
36
+ body {
37
+ background-color: #000000;
38
+ margin: 0;
39
+ padding: 0;
40
+ color: #000000;
41
+ }
42
+
43
+ p {
44
+ font-family: "Milonga", serif;
45
+ font-size: 18px;
46
+ line-height: 22px;
47
+ font-weight: 400;
48
+ color:#000000;
49
+ margin: 0;
50
+ }
51
+
52
+
53
+ .navigation {
54
+ background-color: #007bff;
55
+ color: #fff;
56
+ }
57
+
58
+ .navbar-top-link a {
59
+ color: #fff;
60
+ text-decoration: none;
61
+ }
62
+
63
+ .navbar-top-link a:hover {
64
+ color: #fff;
65
+ text-decoration: underline;
66
+ }
67
+
68
+
69
+
70
+ #chat-container {
71
+ background-color: #000000;
72
+ width: 100%;
73
+ height: calc(100vh - 60px);
74
+ display: flex;
75
+ flex-direction: column;
76
+ justify-content: flex-start;
77
+ align-items: flex-start;
78
+ color: #ffffff;
79
+ overflow-y: auto;
80
+ flex-grow: 1;
81
+ padding: 20px;
82
+ padding-bottom: 100px; /* Add padding to the bottom of the chat container */
83
+ }
84
+ .message {
85
+ margin-bottom: 10px;
86
+ }
87
+
88
+ .user-message {
89
+ font-family: "Milonga", serif;
90
+ font-size: 18px;
91
+ line-height: 22px;
92
+ font-weight: 400;
93
+ color: #1BFD9C;
94
+ background-color: #000000;
95
+ border-radius: 10px;
96
+ padding: 10px;
97
+ text-align: left;
98
+ margin-bottom: 10px;
99
+ display: flex;
100
+ align-items: flex-start;
101
+ }
102
+
103
+ .user-avatar {
104
+ width: 40px;
105
+ height: 40px;
106
+ border-radius: 50%;
107
+ margin-right: 10px;
108
+ }
109
+
110
+ .bot-message {
111
+ background-color: #1BFD9C;
112
+ border-radius: 10px;
113
+ padding: 10px;
114
+ text-align: left;
115
+ margin-bottom: 10px;
116
+ display: flex;
117
+ align-items: flex-start;
118
+ }
119
+
120
+ .bot-avatar {
121
+ width: 40px;
122
+ height: 40px;
123
+ border-radius: 50%;
124
+ margin-right: 10px;
125
+ }
126
+
127
+ #input-container {
128
+ position: absolute;
129
+ bottom: 0;
130
+ right: 0;
131
+ width: 100%;
132
+ background: none;
133
+ display: flex;
134
+ justify-content: center;
135
+ align-items: center;
136
+ padding: 10px; /* Add padding around the input field and button */
137
+ box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Add a shadow at the bottom */
138
+ animation: slideIn 0.5s ease-in-out;
139
+ }
140
+ input[type="text"] {
141
+ --green: #1BFD9C;
142
+ font-size: 15px; /* Increase font size for phone view */
143
+ padding: 0.65em 2.7em;
144
+ letter-spacing: 0.06em;
145
+ position: relative;
146
+ font-family: inherit;
147
+ border-radius: 0.6em;
148
+ overflow: hidden;
149
+ transition: all 0.3s;
150
+ line-height: 1.4em;
151
+ border: 2px solid var(--green);
152
+ background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%,transparent 60% , rgba(27, 253, 156, 0.1) 100%);
153
+ color: var(--green);
154
+ box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
155
+ }
156
+
157
+ input[type="text"]:focus {
158
+ outline: none;
159
+ box-shadow: 0 0 5px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
160
+ }
161
+
162
+
163
+
164
+ .navbar-sidebar-7 {
165
+ position: absolute;
166
+ bottom: 0;
167
+ right: 0;
168
+ width: 100%;
169
+ z-index: 999; /* Ensure the menu is above other elements */
170
+ } .coin {
171
+ font-size: 200px;
172
+ width: 0.1em;
173
+ height: 1em;
174
+ background: linear-gradient(#faa504, #141001);
175
+ margin: auto;
176
+ position: absolute;
177
+ top: 0;
178
+ left: 0;
179
+ right: 0;
180
+ bottom: 0;
181
+ animation: rotate_4001510 3s infinite linear;
182
+ transform-style: preserve-3d;
183
+ background-color: #000000;
184
+ }
185
+
186
+ .coin .side,
187
+ .coin:before,
188
+ .coin:after {
189
+ content: "";
190
+ position: absolute;
191
+ width: 1em;
192
+ height: 1em;
193
+ overflow: hidden;
194
+ border-radius: 50%;
195
+ right: -0.4em;
196
+ text-align: center;
197
+ line-height: 1;
198
+ transform: rotateY(-90deg);
199
+ -moz-backface-visibility: hidden;
200
+ -webkit-backface-visibility: hidden;
201
+ backface-visibility: hidden;
202
+ }
203
+
204
+ .coin .tails,
205
+ .coin:after {
206
+ left: -0.4em;
207
+ transform: rotateY(90deg);
208
+ }
209
+
210
+ .coin:before,
211
+ .coin:after {
212
+ background: linear-gradient(#faa504, #141001);
213
+ backface-visibility: hidden;
214
+ transform: rotateY(90deg);
215
+ }
216
+
217
+ .coin:after {
218
+ transform: rotateY(-90deg);
219
+ }
220
+
221
+ @keyframes rotate_4001510 {
222
+ 100% {
223
+ transform: rotateY(360deg);
224
+ }
225
+ }
226
+
227
+ .svg_back {
228
+ transform: scaleX(-1);
229
+ }
230
+ .preloader {
231
+ background-color: #000;
232
+ }
233
+ button {
234
+ --green: #1BFD9C;
235
+ font-size: 15px;
236
+ padding: 0.65em 2.7em;
237
+ letter-spacing: 0.06em;
238
+ position: relative;
239
+ font-family: inherit;
240
+ border-radius: 0.6em;
241
+ overflow: hidden;
242
+ transition: all 0.3s;
243
+ line-height: 1.4em;
244
+ border: 2px solid var(--green);
245
+ background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%,transparent 60% , rgba(27, 253, 156, 0.1) 100%);
246
+ color: var(--green);
247
+ box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
248
+ }
249
+
250
+ button:hover {
251
+ color: #82ffc9;
252
+ box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
253
+ }
254
+
255
+ button:before {
256
+ content: "";
257
+ position: absolute;
258
+ left: -4em;
259
+ width: 4em;
260
+ height: 100%;
261
+ top: 0;
262
+ transition: transform .4s ease-in-out;
263
+ background: linear-gradient(to right, transparent 1%, rgba(27, 253, 156, 0.1) 40%,rgba(27, 253, 156, 0.1) 60% , transparent 100%);
264
+ }
265
+
266
+ button:hover:before {
267
+ transform: translateX(15em);
268
+ }
269
+
270
+ .typing::after {
271
+ content: "";
272
+ display: inline-block;
273
+ width: 4px;
274
+ height: 12px;
275
+ background-color: #000;
276
+ animation: typing 1s infinite;
277
+ }
278
+
279
+ @keyframes typing {
280
+ 0% {
281
+ opacity: 0;
282
+ }
283
+ 50% {
284
+ opacity: 1;
285
+ }
286
+ 100% {
287
+ opacity: 0;
288
+ }
289
+ }
290
+ @keyframes slideIn {
291
+ 0% {
292
+ transform: translateY(100%);
293
+ opacity: 0;
294
+ }
295
+ 100% {
296
+ transform: translateY(0);
297
+ opacity: 1;
298
+ }
299
+ }
300
+
301
+ .send-btn {
302
+ animation: fadeIn 0.5s ease-in-out;
303
+ }
304
+
305
+ @keyframes fadeIn {
306
+ 0% {
307
+ opacity: 0;
308
+ }
309
+ 100% {
310
+ opacity: 1;
311
+ }
312
+ }
313
+
314
+ </style>
315
+ </head>
316
+
317
+ <body>
318
+
319
+ <div class="preloader hidden">
320
+ <div class="coin">
321
+ <div class="side heads">
322
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" height="100%" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 4091.27 4091.73" xmlns:xlink="http://www.w3.org/1999/xlink">
323
+ <g id="Layer_x0020_1">
324
+ <metadata id="CorelCorpID_0Corel-Layer"></metadata>
325
+ <g id="_1421344023328">
326
+ <path fill="#F7931A" fill-rule="nonzero" d="M4030.06 2540.77c-273.24,1096.01 -1383.32,1763.02 -2479.46,1489.71 -1095.68,-273.24 -1762.69,-1383.39 -1489.33,-2479.31 273.12,-1096.13 1383.2,-1763.19 2479,-1489.95 1096.06,273.24 1763.03,1383.51 1489.76,2479.57l0.02 -0.02z"></path>
327
+ <path fill="white" fill-rule="nonzero" d="M2947.77 1754.38c40.72,-272.26 -166.56,-418.61 -450,-516.24l91.95 -368.8 -224.5 -55.94 -89.51 359.09c-59.02,-14.72 -119.63,-28.59 -179.87,-42.34l90.16 -361.46 -224.36 -55.94 -92 368.68c-48.84,-11.12 -96.81,-22.11 -143.35,-33.69l0.26 -1.16 -309.59 -77.31 -59.72 239.78c0,0 166.56,38.18 163.05,40.53 90.91,22.69 107.35,82.87 104.62,130.57l-104.74 420.15c6.26,1.59 14.38,3.89 23.34,7.49 -7.49,-1.86 -15.46,-3.89 -23.73,-5.87l-146.81 588.57c-11.11,27.62 -39.31,69.07 -102.87,53.33 2.25,3.26 -163.17,-40.72 -163.17,-40.72l-111.46 256.98 292.15 72.83c54.35,13.63 107.61,27.89 160.06,41.3l-92.9 373.03 224.24 55.94 92 -369.07c61.26,16.63 120.71,31.97 178.91,46.43l-91.69 367.33 224.51 55.94 92.89 -372.33c382.82,72.45 670.67,43.24 791.83,-303.02 97.63,-278.78 -4.86,-439.58 -206.26,-544.44 146.69,-33.83 257.18,-130.31 286.64,-329.61l-0.07 -0.05zm-512.93 719.26c-69.38,278.78 -538.76,128.08 -690.94,90.29l123.28 -494.2c152.17,37.99 640.17,113.17 567.67,403.91zm69.43 -723.3c-63.29,253.58 -453.96,124.75 -580.69,93.16l111.77 -448.21c126.73,31.59 534.85,90.55 468.94,355.05l-0.02 0z"></path>
328
+ </g>
329
+ </g>
330
+ </svg>
331
+ </div>
332
+ <div class="side tails">
333
+ <svg xmlns="http://www.w3.org/2000/svg" class="svg_back" xml:space="preserve" width="100%" height="100%" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 4091.27 4091.73" xmlns:xlink="http://www.w3.org/1999/xlink">
334
+ <g id="Layer_x0020_1">
335
+ <metadata id="CorelCorpID_0Corel-Layer"></metadata>
336
+ <g id="_1421344023328">
337
+ <path fill="#F7931A" fill-rule="nonzero" d="M4030.06 2540.77c-273.24,1096.01 -1383.32,1763.02 -2479.46,1489.71 -1095.68,-273.24 -1762.69,-1383.39 -1489.33,-2479.31 273.12,-1096.13 1383.2,-1763.19 2479,-1489.95 1096.06,273.24 1763.03,1383.51 1489.76,2479.57l0.02 -0.02z"></path>
338
+ <path fill="white" fill-rule="nonzero" d="M2947.77 1754.38c40.72,-272.26 -166.56,-418.61 -450,-516.24l91.95 -368.8 -224.5 -55.94 -89.51 359.09c-59.02,-14.72 -119.63,-28.59 -179.87,-42.34l90.16 -361.46 -224.36 -55.94 -92 368.68c-48.84,-11.12 -96.81,-22.11 -143.35,-33.69l0.26 -1.16 -309.59 -77.31 -59.72 239.78c0,0 166.56,38.18 163.05,40.53 90.91,22.69 107.35,82.87 104.62,130.57l-104.74 420.15c6.26,1.59 14.38,3.89 23.34,7.49 -7.49,-1.86 -15.46,-3.89 -23.73,-5.87l-146.81 588.57c-11.11,27.62 -39.31,69.07 -102.87,53.33 2.25,3.26 -163.17,-40.72 -163.17,-40.72l-111.46 256.98 292.15 72.83c54.35,13.63 107.61,27.89 160.06,41.3l-92.9 373.03 224.24 55.94 92 -369.07c61.26,16.63 120.71,31.97 178.91,46.43l-91.69 367.33 224.51 55.94 92.89 -372.33c382.82,72.45 670.67,43.24 791.83,-303.02 97.63,-278.78 -4.86,-439.58 -206.26,-544.44 146.69,-33.83 257.18,-130.31 286.64,-329.61l-0.07 -0.05zm-512.93 719.26c-69.38,278.78 -538.76,128.08 -690.94,90.29l123.28 -494.2c152.17,37.99 640.17,113.17 567.67,403.91zm69.43 -723.3c-63.29,253.58 -453.96,124.75 -580.69,93.16l111.77 -448.21c126.73,31.59 534.85,90.55 468.94,355.05l-0.02 0z"></path>
339
+ </g>
340
+ </g>
341
+ </svg>
342
+ </div>
343
+ </div>
344
+ </div>
345
+
346
+ <div class="navigation">
347
+ <header class="navbar-style-7 position-relative">
348
+ <div class="container">
349
+ <div class="navbar-mobile d-lg-none">
350
+ <div class="row align-items-center">
351
+ <div class="col-3">
352
+ <div class="navbar-toggle icon-text-btn">
353
+ <a class="icon-btn primary-icon-text mobile-menu-open-7" href="javascript:void(0)">
354
+ <i class="mdi mdi-menu"></i>
355
+ </a>
356
+ </div>
357
+ </div>
358
+ <div class="col-6">
359
+ <div class="mobile-logo text-center">
360
+ <a href="/"><img src="/assets/images/yy.png" alt="Logo"></a>
361
+ </div>
362
+ </div>
363
+
364
+ <div class="col-12">
365
+
366
+ <div class="input-group mb-3 input-container" id="input-container">
367
+ <input id="user-input" type="text" class="form-control" placeholder="Type your message...">
368
+ <button id="send-btn" class="send-btn">SEND</button>
369
+ </div>
370
+ </div>
371
+
372
+ <div class="col-3"></div>
373
+
374
+ </div>
375
+ </div>
376
+ </div>
377
+
378
+ <div class="navbar-container navbar-sidebar-7">
379
+ <div class="navbar-close d-lg-none">
380
+ <a class="close-mobile-menu-7" href="javascript:void(0)"><i class="mdi mdi-close"></i></a>
381
+ </div>
382
+
383
+ <div class="navbar-top-wrapper">
384
+ <div class="container-lg">
385
+ <div class="navbar-top d-lg-flex justify-content-between">
386
+ <div class="navbar-top-left">
387
+
388
+ </div>
389
+ <div class="navbar-top-right">
390
+ <div class="navbar-top-link">
391
+ <li><a id="clear-history-btn"><i class="mdi mdi-delete" style="font-size: 24px; margin-right: 5px;"></i> Clear Conversation</a></li>
392
+ <br>
393
+ <li><a href="/" style="text-decoration: none;"><i class="mdi mdi-alpha-e" style="font-size: 24px; margin-right: 5px;"></i>English</a></li>
394
+
395
+
396
+ </div>
397
+ <div class="navbar-top-right">
398
+ <ul class="navbar-top-link">
399
+ </ul>
400
+ </div>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ </div>
405
+
406
+ <div class="navbar-wrapper">
407
+ <div class="container-lg">
408
+ <nav class="main-navbar d-lg-flex justify-content-between align-items-center">
409
+ <div class="desktop-logo d-none d-lg-block">
410
+ </div>
411
+ </nav>
412
+ </div>
413
+ </div>
414
+ <div class="navbar-top-right">
415
+ <ul class="navbar-top-link">
416
+ <li></li>
417
+ </div>
418
+ </div>
419
+ <div class="container-fluid">
420
+ <div class="row">
421
+ <div class="col-12">
422
+ <div id="chat-container">
423
+ <div id="chat-box"></div>
424
+ </div>
425
+ </div>
426
+ <div id="trading-container"></div>
427
+ </div>
428
+ </div>
429
+ </header>
430
+ </div>
431
+
432
+ <script src="assets/js/popper.min.js"></script>
433
+ <script src="assets/js/bootstrap.min.js"></script>
434
+ <script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
435
+ <script src="assets/js/vendor/modernizr-3.7.1.min.js"></script>
436
+ <script>
437
+ const chatBox = document.getElementById('chat-box');
438
+ const userInput = document.getElementById('user-input');
439
+ const sendBtn = document.getElementById('send-btn');
440
+ const clearHistoryBtn = document.getElementById('clear-history-btn');
441
+
442
+ // Event listener for send button click
443
+ sendBtn.addEventListener('click', () => {
444
+ const userMessage = userInput.value;
445
+ userInput.value = '';
446
+
447
+ chatBox.innerHTML += `
448
+ <div class="message user-message">
449
+ <img src="https://th.bing.com/th/id/OIP.OYbzbbyzogwtriubL2pP0AHaHa?w=195&h=195&c=7&r=0&o=5&pid=1.7" alt="User Avatar" class="user-avatar">
450
+ <user-message>${userMessage}<user-message/>
451
+ </div>
452
+ `;
453
+
454
+ const botMessage = document.createElement('div');
455
+ botMessage.classList.add('message', 'bot-message');
456
+ botMessage.innerHTML = `
457
+ <img src="assets/images/AI.png" alt="Bot Avatar" class="bot-avatar">
458
+ <p class="typing typing-animation"></p>
459
+ `;
460
+ chatBox.appendChild(botMessage);
461
+
462
+ fetch('/arabic', {
463
+ method: 'POST',
464
+ headers: {
465
+ 'Content-Type': 'application/json'
466
+ },
467
+ body: JSON.stringify({ user_input: userMessage })
468
+ })
469
+ .then(response => response.text())
470
+ .then(data => {
471
+ const formattedData = data.replace(/\<br>/g, '<br>');
472
+ const typingElement = botMessage.lastElementChild;
473
+
474
+ // Split the response data into an array of words
475
+ const words = formattedData.split(' ');
476
+
477
+ // Use a recursive function to display each word with a delay
478
+ function displayWords(index) {
479
+ if (index < words.length) {
480
+ typingElement.innerHTML += words[index] + ' ';
481
+ setTimeout(() => {
482
+ displayWords(index + 1);
483
+ }, 200); // Adjust the delay as needed
484
+ } else {
485
+ typingElement.classList.remove('typing-animation');
486
+ }
487
+ }
488
+
489
+ displayWords(0);
490
+ });
491
+ });
492
+
493
+ // Event listener for clear history button click
494
+ clearHistoryBtn.addEventListener('click', () => {
495
+ fetch('/clear_history')
496
+ .then(response => response.text())
497
+ .then(data => {
498
+ console.log(data); // You can handle the response data as needed
499
+ // Clear the chat box
500
+ chatBox.innerHTML = '';
501
+ });
502
+ });
503
+
504
+ // Event listener for beforeunload event
505
+ window.addEventListener('beforeunload', () => {
506
+ fetch('/clear_history')
507
+ .then(response => response.text())
508
+ .then(data => {
509
+ // Clear the chat box before the page is unloaded
510
+ chatBox.innerHTML = '';
511
+ });
512
+ });
513
+ </script>
514
+ <script src="assets/js/slick.min.js"></script>
515
+ <script src="assets/js/jquery-vj-accordion-steps.js"></script>
516
+ <script src="assets/js/jquery-ui.min.js"></script>
517
+ <script src="assets/js/jquery.form-validator.min.js"></script>
518
+ <script src="assets/js/jquery.nice-select.min.js"></script>
519
+ <script src="assets/js/jquery.formatter.min.js"></script>
520
+ <script src="assets/js/count-up.min.js"></script>
521
+ <script src="assets/js/main.js"></script>
522
+ </body>
523
+
524
  </html>