harshdhane commited on
Commit
dba07d9
·
verified ·
1 Parent(s): 4b7e032

Update templates/history.html

Browse files
Files changed (1) hide show
  1. templates/history.html +405 -26
templates/history.html CHANGED
@@ -1,29 +1,408 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head><title>Excuse History</title></head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  <body>
5
- <h1>🕒 Your Excuse History</h1>
6
-
7
- {% if history %}
8
- <ul>
9
- {% for item in history %}
10
- <li>
11
- {{ item }}
12
- {% if item not in favorites %}
13
- <form action="{{ url_for('favorite') }}" method="post" style="display:inline;">
14
- <input type="hidden" name="excuse" value="{{ item }}">
15
- <button type="submit">⭐ Add to Favorites</button>
16
- </form>
17
- {% else %}
18
- <span>⭐ Favorited</span>
19
- {% endif %}
20
- </li>
21
- {% endfor %}
22
- </ul>
23
- {% else %}
24
- <p>No excuses generated yet!</p>
25
- {% endif %}
26
-
27
- <a href="{{ url_for('index') }}">⬅ Back</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  </body>
29
- </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ language_dict['history'] }}</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
16
+ background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
17
+ min-height: 100vh;
18
+ color: #333;
19
+ line-height: 1.6;
20
+ padding: 20px 0;
21
+ }
22
+
23
+ .container {
24
+ max-width: 1000px;
25
+ margin: 0 auto;
26
+ padding: 20px;
27
+ }
28
+
29
+ .header {
30
+ text-align: center;
31
+ margin-bottom: 40px;
32
+ padding: 30px 0;
33
+ }
34
+
35
+ h1 {
36
+ color: #fff;
37
+ font-size: 3rem;
38
+ margin-bottom: 15px;
39
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
40
+ font-weight: 700;
41
+ letter-spacing: -1px;
42
+ }
43
+
44
+ .main-content {
45
+ background: rgba(255, 255, 255, 0.95);
46
+ backdrop-filter: blur(15px);
47
+ padding: 40px;
48
+ border-radius: 20px;
49
+ box-shadow: 0 20px 40px rgba(0,0,0,0.1);
50
+ margin-bottom: 30px;
51
+ border: 1px solid rgba(255,255,255,0.3);
52
+ }
53
+
54
+ .history-list {
55
+ list-style: none;
56
+ padding: 0;
57
+ margin: 0;
58
+ }
59
+
60
+ .history-item {
61
+ background: linear-gradient(135deg, #f8f9fa, #e9ecef);
62
+ margin-bottom: 20px;
63
+ padding: 25px;
64
+ border-radius: 15px;
65
+ border-left: 5px solid #74b9ff;
66
+ box-shadow: 0 5px 15px rgba(0,0,0,0.08);
67
+ transition: all 0.3s ease;
68
+ position: relative;
69
+ overflow: hidden;
70
+ }
71
+
72
+ .history-item::before {
73
+ content: '';
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ width: 100%;
78
+ height: 100%;
79
+ background: linear-gradient(135deg, transparent, rgba(116, 185, 255, 0.05));
80
+ opacity: 0;
81
+ transition: opacity 0.3s ease;
82
+ }
83
+
84
+ .history-item:hover {
85
+ transform: translateY(-5px);
86
+ box-shadow: 0 10px 25px rgba(0,0,0,0.15);
87
+ border-left-color: #0984e3;
88
+ }
89
+
90
+ .history-item:hover::before {
91
+ opacity: 1;
92
+ }
93
+
94
+ .excuse-text {
95
+ font-size: 1.1rem;
96
+ color: #2c3e50;
97
+ line-height: 1.6;
98
+ margin-bottom: 15px;
99
+ font-weight: 500;
100
+ position: relative;
101
+ z-index: 1;
102
+ }
103
+
104
+ .item-meta {
105
+ display: flex;
106
+ justify-content: space-between;
107
+ align-items: center;
108
+ flex-wrap: wrap;
109
+ gap: 15px;
110
+ margin-top: 15px;
111
+ padding-top: 15px;
112
+ border-top: 1px solid rgba(0,0,0,0.1);
113
+ }
114
+
115
+ .timestamp {
116
+ color: #6c757d;
117
+ font-size: 0.95rem;
118
+ font-weight: 500;
119
+ background: rgba(108, 117, 125, 0.1);
120
+ padding: 5px 12px;
121
+ border-radius: 20px;
122
+ display: inline-flex;
123
+ align-items: center;
124
+ gap: 5px;
125
+ }
126
+
127
+ .timestamp::before {
128
+ content: '🕒';
129
+ font-size: 0.9rem;
130
+ }
131
+
132
+ .favorite-section {
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 10px;
136
+ }
137
+
138
+ .favorite-btn {
139
+ background: linear-gradient(135deg, #fdcb6e, #f39c12);
140
+ color: #fff;
141
+ border: none;
142
+ padding: 10px 20px;
143
+ border-radius: 25px;
144
+ cursor: pointer;
145
+ font-size: 0.9rem;
146
+ font-weight: 600;
147
+ transition: all 0.3s ease;
148
+ box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
149
+ text-transform: uppercase;
150
+ letter-spacing: 0.5px;
151
+ display: inline-flex;
152
+ align-items: center;
153
+ gap: 8px;
154
+ }
155
+
156
+ .favorite-btn:hover {
157
+ background: linear-gradient(135deg, #f39c12, #fdcb6e);
158
+ transform: translateY(-2px);
159
+ box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
160
+ }
161
+
162
+ .favorite-btn:active {
163
+ transform: translateY(0);
164
+ }
165
+
166
+ .favorited-badge {
167
+ background: linear-gradient(135deg, #00b894, #00cec9);
168
+ color: #fff;
169
+ padding: 10px 20px;
170
+ border-radius: 25px;
171
+ font-size: 0.9rem;
172
+ font-weight: 600;
173
+ text-transform: uppercase;
174
+ letter-spacing: 0.5px;
175
+ box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
176
+ display: inline-flex;
177
+ align-items: center;
178
+ gap: 8px;
179
+ }
180
+
181
+ .favorited-badge::before {
182
+ content: '⭐';
183
+ animation: sparkle 2s ease-in-out infinite;
184
+ }
185
+
186
+ @keyframes sparkle {
187
+ 0%, 100% { transform: scale(1); }
188
+ 50% { transform: scale(1.2); }
189
+ }
190
+
191
+ .empty-state {
192
+ text-align: center;
193
+ padding: 60px 20px;
194
+ background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
195
+ border-radius: 15px;
196
+ margin: 20px 0;
197
+ }
198
+
199
+ .empty-state-icon {
200
+ font-size: 4rem;
201
+ margin-bottom: 20px;
202
+ opacity: 0.7;
203
+ }
204
+
205
+ .empty-state p {
206
+ font-size: 1.3rem;
207
+ color: #2c3e50;
208
+ font-weight: 600;
209
+ margin-bottom: 15px;
210
+ }
211
+
212
+ .empty-state-subtitle {
213
+ font-size: 1rem;
214
+ color: #6c757d;
215
+ font-weight: 400;
216
+ }
217
+
218
+ .navigation {
219
+ text-align: center;
220
+ margin-top: 40px;
221
+ }
222
+
223
+ .back-link {
224
+ display: inline-block;
225
+ background: rgba(255, 255, 255, 0.2);
226
+ backdrop-filter: blur(10px);
227
+ color: #fff;
228
+ text-decoration: none;
229
+ padding: 15px 30px;
230
+ border-radius: 50px;
231
+ font-weight: 600;
232
+ font-size: 1.1rem;
233
+ transition: all 0.3s ease;
234
+ border: 2px solid rgba(255, 255, 255, 0.3);
235
+ text-transform: uppercase;
236
+ letter-spacing: 0.5px;
237
+ display: inline-flex;
238
+ align-items: center;
239
+ gap: 10px;
240
+ }
241
+
242
+ .back-link:hover {
243
+ background: rgba(255, 255, 255, 0.3);
244
+ transform: translateY(-3px);
245
+ box-shadow: 0 8px 25px rgba(0,0,0,0.2);
246
+ border-color: rgba(255, 255, 255, 0.5);
247
+ }
248
+
249
+ .stats-bar {
250
+ display: flex;
251
+ justify-content: space-around;
252
+ align-items: center;
253
+ background: rgba(255, 255, 255, 0.1);
254
+ backdrop-filter: blur(10px);
255
+ padding: 20px;
256
+ border-radius: 15px;
257
+ margin-bottom: 30px;
258
+ border: 1px solid rgba(255, 255, 255, 0.2);
259
+ }
260
+
261
+ .stat-item {
262
+ text-align: center;
263
+ color: #fff;
264
+ }
265
+
266
+ .stat-number {
267
+ font-size: 2rem;
268
+ font-weight: 700;
269
+ display: block;
270
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
271
+ }
272
+
273
+ .stat-label {
274
+ font-size: 0.9rem;
275
+ opacity: 0.8;
276
+ text-transform: uppercase;
277
+ letter-spacing: 0.5px;
278
+ }
279
+
280
+ .favorite-form {
281
+ display: inline-block;
282
+ margin: 0;
283
+ }
284
+
285
+ @media (max-width: 768px) {
286
+ .container {
287
+ padding: 15px;
288
+ }
289
+
290
+ h1 {
291
+ font-size: 2.5rem;
292
+ }
293
+
294
+ .main-content {
295
+ padding: 25px;
296
+ }
297
+
298
+ .history-item {
299
+ padding: 20px;
300
+ }
301
+
302
+ .item-meta {
303
+ flex-direction: column;
304
+ align-items: flex-start;
305
+ gap: 10px;
306
+ }
307
+
308
+ .stats-bar {
309
+ flex-direction: column;
310
+ gap: 20px;
311
+ }
312
+
313
+ .stat-item {
314
+ width: 100%;
315
+ padding: 10px;
316
+ background: rgba(255, 255, 255, 0.1);
317
+ border-radius: 10px;
318
+ }
319
+ }
320
+
321
+ @media (max-width: 480px) {
322
+ h1 {
323
+ font-size: 2rem;
324
+ }
325
+
326
+ .main-content {
327
+ padding: 20px;
328
+ }
329
+
330
+ .history-item {
331
+ padding: 15px;
332
+ }
333
+
334
+ .excuse-text {
335
+ font-size: 1rem;
336
+ }
337
+
338
+ .favorite-btn, .favorited-badge {
339
+ font-size: 0.8rem;
340
+ padding: 8px 15px;
341
+ }
342
+ }
343
+ </style>
344
+ </head>
345
  <body>
346
+ <div class="container">
347
+ <div class="header">
348
+ <h1>🕒 {{ language_dict['history'] }}</h1>
349
+ </div>
350
+
351
+ {% if history %}
352
+ <div class="stats-bar">
353
+ <div class="stat-item">
354
+ <span class="stat-number">{{ history|length }}</span>
355
+ <span class="stat-label">Total Excuses</span>
356
+ </div>
357
+ <div class="stat-item">
358
+ <span class="stat-number">{{ favorites|length if favorites else 0 }}</span>
359
+ <span class="stat-label">Favorites</span>
360
+ </div>
361
+ <div class="stat-item">
362
+ <span class="stat-number">{{ ((favorites|length if favorites else 0) / history|length * 100)|round|int }}%</span>
363
+ <span class="stat-label">Success Rate</span>
364
+ </div>
365
+ </div>
366
+
367
+ <div class="main-content">
368
+ <ul class="history-list">
369
+ {% for item in history %}
370
+ <li class="history-item">
371
+ <div class="excuse-text">{{ item['excuse'] }}</div>
372
+ <div class="item-meta">
373
+ <span class="timestamp">{{ item['timestamp'] }}</span>
374
+ <div class="favorite-section">
375
+ {% if item['excuse'] not in favorites %}
376
+ <form action="{{ url_for('favorite') }}" method="post" class="favorite-form">
377
+ <input type="hidden" name="excuse" value="{{ item['excuse'] }}">
378
+ <button type="submit" class="favorite-btn">
379
+ ⭐ Add to {{ language_dict['favorites'] }}
380
+ </button>
381
+ </form>
382
+ {% else %}
383
+ <span class="favorited-badge">Favorited</span>
384
+ {% endif %}
385
+ </div>
386
+ </div>
387
+ </li>
388
+ {% endfor %}
389
+ </ul>
390
+ </div>
391
+ {% else %}
392
+ <div class="main-content">
393
+ <div class="empty-state">
394
+ <div class="empty-state-icon">📝</div>
395
+ <p>No excuses generated yet!</p>
396
+ <p class="empty-state-subtitle">Start creating some creative excuses to see them here</p>
397
+ </div>
398
+ </div>
399
+ {% endif %}
400
+
401
+ <div class="navigation">
402
+ <a href="{{ url_for('index') }}" class="back-link">
403
+ ⬅ Back to Home
404
+ </a>
405
+ </div>
406
+ </div>
407
  </body>
408
+ </html>