openfree commited on
Commit
4212b58
·
verified ·
1 Parent(s): 6752c22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -441,10 +441,9 @@ def load_all_templates():
441
  """
442
  return create_template_html("🎮 모든 게임 템플릿", load_json_data())
443
 
444
-
445
  def create_template_html(title, items):
446
  """
447
- 폰트를 작게 조정
448
  """
449
  html_content = r"""
450
  <style>
@@ -467,13 +466,6 @@ def create_template_html(title, items):
467
  transform: translateY(-4px);
468
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
469
  }
470
- .card-image {
471
- width: 100%;
472
- height: 140px;
473
- object-fit: cover;
474
- border-radius: 8px;
475
- margin-bottom: 10px;
476
- }
477
  .card-name {
478
  font-weight: bold;
479
  margin-bottom: 8px;
@@ -499,7 +491,6 @@ def create_template_html(title, items):
499
  for item in items:
500
  card_html = f"""
501
  <div class="prompt-card" onclick="copyToInput(this)" data-prompt="{html.escape(item.get('prompt', ''))}">
502
- <img src="{item.get('image_url', '')}" class="card-image" loading="lazy" alt="{html.escape(item.get('name', ''))}">
503
  <div class="card-name">{html.escape(item.get('name', ''))}</div>
504
  <div class="card-prompt">{html.escape(item.get('prompt', ''))}</div>
505
  </div>
@@ -521,6 +512,8 @@ function copyToInput(card) {
521
  </div>
522
  """
523
  return gr.HTML(value=html_content)
 
 
524
 
525
 
526
  # ------------------------
 
441
  """
442
  return create_template_html("🎮 모든 게임 템플릿", load_json_data())
443
 
 
444
  def create_template_html(title, items):
445
  """
446
+ 이미지 없이 템플릿 HTML 생성
447
  """
448
  html_content = r"""
449
  <style>
 
466
  transform: translateY(-4px);
467
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
468
  }
 
 
 
 
 
 
 
469
  .card-name {
470
  font-weight: bold;
471
  margin-bottom: 8px;
 
491
  for item in items:
492
  card_html = f"""
493
  <div class="prompt-card" onclick="copyToInput(this)" data-prompt="{html.escape(item.get('prompt', ''))}">
 
494
  <div class="card-name">{html.escape(item.get('name', ''))}</div>
495
  <div class="card-prompt">{html.escape(item.get('prompt', ''))}</div>
496
  </div>
 
512
  </div>
513
  """
514
  return gr.HTML(value=html_content)
515
+
516
+
517
 
518
 
519
  # ------------------------