openfree commited on
Commit
5afac0c
·
verified ·
1 Parent(s): d90e90d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -223,14 +223,16 @@ def get_vercel_deployments():
223
 
224
  def get_vercel_card(deployment, index):
225
  """Generate HTML card for a Vercel deployment"""
226
- url = deployment.get('url', '')
 
 
 
227
  created = format_timestamp(deployment.get('created'))
228
  name = deployment.get('name', 'Unnamed Project')
229
  state = deployment.get('state', 'N/A')
230
 
231
- bg_color = get_pastel_color(index + 20) # 기존 색상과 겹치지 않도록 인덱스 조정
232
 
233
- # 랜덤 이모지 선택
234
  tech_emojis = ['⚡', '🚀', '🌟', '✨', '💫', '🔥', '🌈', '🎯', '🎨', '🔮']
235
  random_emojis = random.sample(tech_emojis, 3)
236
 
@@ -270,6 +272,9 @@ def get_vercel_card(deployment, index):
270
  <p style='margin: 8px 0;'>
271
  <strong>Created:</strong> 📅 {created}
272
  </p>
 
 
 
273
  </div>
274
  <div style='margin-top: 20px;'>
275
  <a href='https://{url}' target='_blank'
 
223
 
224
  def get_vercel_card(deployment, index):
225
  """Generate HTML card for a Vercel deployment"""
226
+ # URL 형식 수정
227
+ raw_url = deployment.get('url', '')
228
+ url = f"{raw_url}.vercel.app" if not raw_url.endswith('.vercel.app') else raw_url
229
+
230
  created = format_timestamp(deployment.get('created'))
231
  name = deployment.get('name', 'Unnamed Project')
232
  state = deployment.get('state', 'N/A')
233
 
234
+ bg_color = get_pastel_color(index + 20)
235
 
 
236
  tech_emojis = ['⚡', '🚀', '🌟', '✨', '💫', '🔥', '🌈', '🎯', '🎨', '🔮']
237
  random_emojis = random.sample(tech_emojis, 3)
238
 
 
272
  <p style='margin: 8px 0;'>
273
  <strong>Created:</strong> 📅 {created}
274
  </p>
275
+ <p style='margin: 8px 0;'>
276
+ <strong>URL:</strong> 🔗 {url}
277
+ </p>
278
  </div>
279
  <div style='margin-top: 20px;'>
280
  <a href='https://{url}' target='_blank'