Infinity-1995 commited on
Commit
69d86de
·
verified ·
1 Parent(s): 49355be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -94
app.py CHANGED
@@ -137,99 +137,9 @@ def generate_pdf(itinerary_text):
137
  doc.build(story)
138
 
139
  return temp_path, gr.update(visible=True)
140
-
141
  # ---------------------- UI ----------------------
142
  with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")) as demo:
143
- # Hero section
144
- hero_html = """
145
- <style>
146
- * {
147
- margin: 0;
148
- padding: 0;
149
- box-sizing: border-box;
150
- }
151
- .hero {
152
- display: flex;
153
- height:100vh;
154
- flex-direction: column;
155
- justify-content: center;
156
- align-items: center;
157
- background: white;
158
- text-align: center;
159
- }
160
- .hero h1 {
161
- font-size: 48px;
162
- color: #008080;
163
- margin-bottom: 10px;
164
- }
165
- .hero .typing {
166
- font-size: 20px;
167
- color: #007777;
168
- height: 30px;
169
- overflow: hidden;
170
- white-space: nowrap;
171
- border-right: 3px solid #007777;
172
- animation: blink 0.7s infinite;
173
- }
174
- @keyframes blink {
175
- 0% { border-color: transparent; }
176
- 50% { border-color: #007777; }
177
- 100% { border-color: transparent; }
178
- }
179
- .hero button {
180
- margin-top: 20px;
181
- padding: 10px 20px;
182
- background-color: #008080;
183
- color: white;
184
- font-size: 16px;
185
- border: none;
186
- border-radius: 6px;
187
- cursor: pointer;
188
- }
189
- .hero button:hover {
190
- background-color: #006666;
191
- }
192
- </style>
193
-
194
- <div class="hero">
195
- <h1 style="font-size: 38px; margin-bottom: 0;">FEEL AWAY APP</h1>
196
- <div class="typing" id="typing-text"></div>
197
- <button onclick="document.getElementById('main-content').scrollIntoView({behavior: 'smooth'});">
198
- Get Started
199
- </button>
200
- </div>
201
-
202
- <script>
203
- const tagline = `"Your Mood, Your Journey – Personalized Itineraries, Instantly"`;
204
- let i = 0;
205
- let forward = true;
206
- function typeWriter() {
207
- const el = document.getElementById("typing-text");
208
- if (forward) {
209
- if (i < tagline.length) {
210
- el.innerHTML += tagline.charAt(i);
211
- i++;
212
- } else {
213
- forward = false;
214
- setTimeout(typeWriter, 2000);
215
- return;
216
- }
217
- } else {
218
- if (i > 0) {
219
- el.innerHTML = tagline.substring(0, i-1);
220
- i--;
221
- } else {
222
- forward = true;
223
- }
224
- }
225
- setTimeout(typeWriter, 60);
226
- }
227
- window.onload = typeWriter;
228
- </script>
229
- """
230
- gr.HTML(hero_html)
231
-
232
- # Main content
233
  header_html = """
234
  <style>
235
  @keyframes colorCycle {
@@ -241,12 +151,22 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")
241
  }
242
  .color-cycle {
243
  animation: colorCycle 3s infinite;
 
 
 
 
244
  }
245
  .tagline {
246
  font-style: italic;
247
  color: #007777;
248
  font-size: 18px;
249
  margin-top: 4px;
 
 
 
 
 
 
250
  }
251
  .equal-row {
252
  display: flex;
@@ -264,12 +184,44 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")
264
  display: block;
265
  }
266
  </style>
267
- <div style='text-align: center;'>
268
  <h1 class="color-cycle" style="font-size: 38px; margin-bottom: 0;">FEEL AWAY APP</h1>
269
- <p class="tagline">"Your Mood, Your Journey – Personalized Itineraries, Instantly"</p>
270
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  """
272
-
273
  with gr.Column(elem_id="main-content"):
274
  gr.HTML(header_html)
275
 
 
137
  doc.build(story)
138
 
139
  return temp_path, gr.update(visible=True)
 
140
  # ---------------------- UI ----------------------
141
  with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")) as demo:
142
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  header_html = """
144
  <style>
145
  @keyframes colorCycle {
 
151
  }
152
  .color-cycle {
153
  animation: colorCycle 3s infinite;
154
+ font-weight: 800;
155
+ letter-spacing: 1.5px;
156
+ text-transform: uppercase;
157
+ text-shadow: 1px 1px 3px #a0d1d1;
158
  }
159
  .tagline {
160
  font-style: italic;
161
  color: #007777;
162
  font-size: 18px;
163
  margin-top: 4px;
164
+ height: 24px;
165
+ white-space: nowrap;
166
+ overflow: hidden;
167
+ border-right: 3px solid #007777;
168
+ font-weight: 600;
169
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
170
  }
171
  .equal-row {
172
  display: flex;
 
184
  display: block;
185
  }
186
  </style>
187
+ <div style='text-align: center; margin-top: 30px; margin-bottom: 30px;'>
188
  <h1 class="color-cycle" style="font-size: 38px; margin-bottom: 0;">FEEL AWAY APP</h1>
189
+ <p class="tagline" id="typing-text-main"></p>
190
  </div>
191
+ <script>
192
+ const tagline = "Your Mood, Your Journey – Personalized Itineraries, Instantly";
193
+ function typeWriter(elId) {
194
+ let i = 0;
195
+ let forward = true;
196
+ const el = document.getElementById(elId);
197
+ function typing() {
198
+ if (forward) {
199
+ if (i < tagline.length) {
200
+ el.innerHTML += tagline.charAt(i);
201
+ i++;
202
+ } else {
203
+ forward = false;
204
+ setTimeout(typing, 2000);
205
+ return;
206
+ }
207
+ } else {
208
+ if (i > 0) {
209
+ el.innerHTML = tagline.substring(0, i-1);
210
+ i--;
211
+ } else {
212
+ forward = true;
213
+ }
214
+ }
215
+ setTimeout(typing, 60);
216
+ }
217
+ typing();
218
+ }
219
+ window.onload = () => {
220
+ typeWriter("typing-text-main");
221
+ }
222
+ </script>
223
  """
224
+
225
  with gr.Column(elem_id="main-content"):
226
  gr.HTML(header_html)
227