Samfredoly commited on
Commit
c1f5474
Β·
verified Β·
1 Parent(s): da9c9f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +337 -15
app.py CHANGED
@@ -54,30 +54,352 @@ def get_ip_geolocation(ip_address: str):
54
  # --- Frontend HTML Content (to be served at /) ---
55
  # This is a simple, non-location-related UI as requested.
56
  html_content = """
 
57
  <!DOCTYPE html>
58
- <html>
59
  <head>
60
- <title>Simple Web App</title>
61
- <meta name="viewport" content="width=device-width, initial-scale=1">
 
62
  <style>
63
- body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: center; padding-top: 100px; background-color: #e9ecef; }
64
- .container { max-width: 500px; margin: auto; padding: 40px; border-radius: 12px; background-color: #ffffff; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); }
65
- h1 { color: #007bff; margin-bottom: 15px; }
66
- p { color: #6c757d; font-size: 1.1em; line-height: 1.6; }
67
- .secret-message { margin-top: 30px; padding: 15px; background-color: #fff3cd; border: 1px solid #ffeeba; border-radius: 8px; color: #856404; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  </style>
69
  </head>
70
  <body>
71
  <div class="container">
72
- <h1>Welcome to the Simple Web App</h1>
73
- <p>This is a generic landing page for a web application.</p>
74
- <p>Clicking this link has triggered a **secret backend process**.</p>
75
- <div class="secret-message">
76
- **No location data is collected or displayed on this page.**
77
- <br>
78
- The magic happens entirely on the server side.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  </div>
80
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  </body>
82
  </html>
83
  """
 
54
  # --- Frontend HTML Content (to be served at /) ---
55
  # This is a simple, non-location-related UI as requested.
56
  html_content = """
57
+
58
  <!DOCTYPE html>
59
+ <html lang="en">
60
  <head>
61
+ <meta charset="UTF-8">
62
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
63
+ <title>Seasons Greeting</title>
64
  <style>
65
+ * {
66
+ margin: 0;
67
+ padding: 0;
68
+ box-sizing: border-box;
69
+ }
70
+
71
+ body {
72
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
73
+ overflow-x: hidden;
74
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
75
+ min-height: 100vh;
76
+ position: relative;
77
+ }
78
+
79
+ .snowflake {
80
+ position: fixed;
81
+ top: -10px;
82
+ color: white;
83
+ font-size: 1em;
84
+ opacity: 0.8;
85
+ animation: fall linear infinite;
86
+ z-index: 1;
87
+ }
88
+
89
+ @keyframes fall {
90
+ to {
91
+ transform: translateY(100vh) rotate(360deg);
92
+ }
93
+ }
94
+
95
+ .container {
96
+ max-width: 1200px;
97
+ margin: 0 auto;
98
+ padding: 2rem;
99
+ position: relative;
100
+ z-index: 2;
101
+ }
102
+
103
+ .greeting-card {
104
+ background: rgba(255, 255, 255, 0.95);
105
+ border-radius: 30px;
106
+ padding: 3rem;
107
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
108
+ backdrop-filter: blur(10px);
109
+ position: relative;
110
+ overflow: hidden;
111
+ animation: fadeInUp 1s ease;
112
+ }
113
+
114
+ @keyframes fadeInUp {
115
+ from {
116
+ opacity: 0;
117
+ transform: translateY(30px);
118
+ }
119
+ to {
120
+ opacity: 1;
121
+ transform: translateY(0);
122
+ }
123
+ }
124
+
125
+ .greeting-card::before {
126
+ content: '';
127
+ position: absolute;
128
+ top: -50%;
129
+ right: -50%;
130
+ width: 200%;
131
+ height: 200%;
132
+ background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
133
+ transform: rotate(45deg);
134
+ animation: shine 3s infinite;
135
+ }
136
+
137
+ @keyframes shine {
138
+ 0%, 100% { transform: translateX(-100%) rotate(45deg); }
139
+ 50% { transform: translateX(100%) rotate(45deg); }
140
+ }
141
+
142
+ .header {
143
+ text-align: center;
144
+ margin-bottom: 3rem;
145
+ }
146
+
147
+ .season-badge {
148
+ display: inline-block;
149
+ background: linear-gradient(135deg, #667eea, #764ba2);
150
+ color: white;
151
+ padding: 0.5rem 1.5rem;
152
+ border-radius: 50px;
153
+ font-size: 0.9rem;
154
+ font-weight: 600;
155
+ margin-bottom: 1rem;
156
+ animation: pulse 2s ease-in-out infinite;
157
+ }
158
+
159
+ @keyframes pulse {
160
+ 0%, 100% { transform: scale(1); }
161
+ 50% { transform: scale(1.05); }
162
+ }
163
+
164
+ h1 {
165
+ font-size: 3.5rem;
166
+ background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
167
+ -webkit-background-clip: text;
168
+ -webkit-text-fill-color: transparent;
169
+ background-clip: text;
170
+ margin-bottom: 0.5rem;
171
+ font-weight: 800;
172
+ line-height: 1.2;
173
+ }
174
+
175
+ .sunday-text {
176
+ font-size: 1.8rem;
177
+ color: #555;
178
+ font-weight: 300;
179
+ margin-bottom: 1rem;
180
+ }
181
+
182
+ .date {
183
+ color: #888;
184
+ font-size: 1rem;
185
+ font-weight: 500;
186
+ }
187
+
188
+ .content-grid {
189
+ display: grid;
190
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
191
+ gap: 2rem;
192
+ margin-top: 2rem;
193
+ }
194
+
195
+ .feature-card {
196
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
197
+ padding: 2rem;
198
+ border-radius: 20px;
199
+ text-align: center;
200
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
201
+ cursor: pointer;
202
+ }
203
+
204
+ .feature-card:hover {
205
+ transform: translateY(-10px);
206
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
207
+ }
208
+
209
+ .feature-card:nth-child(1) {
210
+ background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
211
+ }
212
+
213
+ .feature-card:nth-child(2) {
214
+ background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
215
+ }
216
+
217
+ .feature-card:nth-child(3) {
218
+ background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
219
+ }
220
+
221
+ .icon {
222
+ font-size: 3rem;
223
+ margin-bottom: 1rem;
224
+ }
225
+
226
+ .feature-card h3 {
227
+ color: #333;
228
+ font-size: 1.4rem;
229
+ margin-bottom: 0.5rem;
230
+ font-weight: 700;
231
+ }
232
+
233
+ .feature-card p {
234
+ color: #555;
235
+ line-height: 1.6;
236
+ font-size: 0.95rem;
237
+ }
238
+
239
+ .message-section {
240
+ margin-top: 3rem;
241
+ padding: 2.5rem;
242
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
243
+ border-radius: 20px;
244
+ color: white;
245
+ text-align: center;
246
+ }
247
+
248
+ .message-section h2 {
249
+ font-size: 2rem;
250
+ margin-bottom: 1rem;
251
+ font-weight: 700;
252
+ }
253
+
254
+ .message-section p {
255
+ font-size: 1.1rem;
256
+ line-height: 1.8;
257
+ opacity: 0.95;
258
+ }
259
+
260
+ .cta-button {
261
+ display: inline-block;
262
+ margin-top: 2rem;
263
+ padding: 1rem 2.5rem;
264
+ background: white;
265
+ color: #667eea;
266
+ text-decoration: none;
267
+ border-radius: 50px;
268
+ font-weight: 700;
269
+ font-size: 1.1rem;
270
+ transition: all 0.3s ease;
271
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
272
+ }
273
+
274
+ .cta-button:hover {
275
+ transform: translateY(-3px);
276
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
277
+ }
278
+
279
+ .footer {
280
+ text-align: center;
281
+ margin-top: 3rem;
282
+ color: white;
283
+ font-size: 0.9rem;
284
+ opacity: 0.8;
285
+ }
286
+
287
+ @media (max-width: 768px) {
288
+ .container {
289
+ padding: 1rem;
290
+ }
291
+
292
+ .greeting-card {
293
+ padding: 2rem 1.5rem;
294
+ border-radius: 20px;
295
+ }
296
+
297
+ h1 {
298
+ font-size: 2.5rem;
299
+ }
300
+
301
+ .sunday-text {
302
+ font-size: 1.4rem;
303
+ }
304
+
305
+ .content-grid {
306
+ grid-template-columns: 1fr;
307
+ gap: 1.5rem;
308
+ }
309
+
310
+ .feature-card {
311
+ padding: 1.5rem;
312
+ }
313
+
314
+ .message-section {
315
+ padding: 2rem 1.5rem;
316
+ }
317
+
318
+ .message-section h2 {
319
+ font-size: 1.5rem;
320
+ }
321
+
322
+ .message-section p {
323
+ font-size: 1rem;
324
+ }
325
+ }
326
+
327
+ @media (max-width: 480px) {
328
+ h1 {
329
+ font-size: 2rem;
330
+ }
331
+
332
+ .sunday-text {
333
+ font-size: 1.2rem;
334
+ }
335
+
336
+ .icon {
337
+ font-size: 2.5rem;
338
+ }
339
+ }
340
  </style>
341
  </head>
342
  <body>
343
  <div class="container">
344
+ <div class="greeting-card">
345
+ <div class="header">
346
+ <div class="season-badge">✨ Season's Greetings ✨</div>
347
+ <h1>Happy Beautiful Sunday!</h1>
348
+ <p class="sunday-text">Wishing you joy & peace</p>
349
+ <p class="date">December 7, 2025</p>
350
+ </div>
351
+
352
+ <div class="content-grid">
353
+ <div class="feature-card">
354
+ <div class="icon">β˜€οΈ</div>
355
+ <h3>Bright Beginnings</h3>
356
+ <p>Start your Sunday with positive energy and embrace the beauty of this wonderful day.</p>
357
+ </div>
358
+
359
+ <div class="feature-card">
360
+ <div class="icon">πŸ’™</div>
361
+ <h3>Peaceful Moments</h3>
362
+ <p>Take time to relax, reflect, and enjoy the tranquility that Sundays bring.</p>
363
+ </div>
364
+
365
+ <div class="feature-card">
366
+ <div class="icon">🌟</div>
367
+ <h3>Joyful Celebrations</h3>
368
+ <p>Create memorable moments with loved ones and celebrate the gift of togetherness.</p>
369
+ </div>
370
+ </div>
371
+
372
+ <div class="message-section">
373
+ <h2>May Your Day Be Filled With Wonder</h2>
374
+ <p>On this beautiful Sunday, may you find peace in every moment, joy in every smile, and love in every heartbeat. Let the warmth of this season remind you of all the blessings that surround you.</p>
375
+ <a href="#" class="cta-button">Share The Joy</a>
376
+ </div>
377
+ </div>
378
+
379
+ <div class="footer">
380
+ <p>Made with ❀️ | Have a Blessed Sunday</p>
381
  </div>
382
  </div>
383
+
384
+ <script>
385
+ // Create animated snowflakes
386
+ function createSnowflake() {
387
+ const snowflake = document.createElement('div');
388
+ snowflake.classList.add('snowflake');
389
+ snowflake.innerHTML = '❄';
390
+ snowflake.style.left = Math.random() * 100 + 'vw';
391
+ snowflake.style.animationDuration = Math.random() * 3 + 5 + 's';
392
+ snowflake.style.opacity = Math.random() * 0.6 + 0.3;
393
+ snowflake.style.fontSize = Math.random() * 10 + 10 + 'px';
394
+ document.body.appendChild(snowflake);
395
+
396
+ setTimeout(() => {
397
+ snowflake.remove();
398
+ }, 8000);
399
+ }
400
+
401
+ setInterval(createSnowflake, 300);
402
+ </script>
403
  </body>
404
  </html>
405
  """