Sabatino81 commited on
Commit
c9d8d7a
Β·
verified Β·
1 Parent(s): c2799fb

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +356 -34
app.py CHANGED
@@ -1473,68 +1473,390 @@ def render_header_html(header_id: str, header_info: dict, primary: str, secondar
1473
 
1474
  def render_footer_html(footer_id: str, footer_info: dict, primary: str, secondary: str, accent: str) -> str:
1475
  """
1476
- Generate HTML/CSS for a single footer preview
1477
  Returns HTML div with the footer rendered
1478
  """
1479
  footer_name = footer_info['name']
1480
 
1481
  # Common container style
1482
- base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1483
 
1484
- # Generate footer based on type
1485
- if footer_id == "minimal_icons":
1486
  content = f"""
1487
- <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px;">
1488
  <div style="color: {primary}; font-size: 24px;">🏠</div>
1489
  <div style="color: #999; font-size: 24px;">πŸ”</div>
1490
  <div style="color: #999; font-size: 24px;">❀️</div>
1491
  <div style="color: #999; font-size: 24px;">πŸ‘€</div>
1492
  </div>
1493
  """
1494
- elif footer_id == "floating_fab":
1495
  content = f"""
1496
- <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px; position: relative;">
1497
- <div style="color: #333; font-size: 24px;">🏠</div>
1498
- <div style="color: #333; font-size: 24px;">πŸ”</div>
1499
- <div style="width: 50px; height: 50px; border-radius: 50%; background: {primary}; display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; position: absolute; left: 50%; transform: translateX(-50%) translateY(-50%); box-shadow: 0 4px 8px rgba(0,0,0,0.2);">+</div>
1500
- <div style="color: #333; font-size: 24px;">❀️</div>
1501
- <div style="color: #333; font-size: 24px;">πŸ‘€</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1502
  </div>
1503
  """
1504
- elif footer_id == "animated_pills":
1505
  content = f"""
1506
- <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 12px;">
1507
- <div style="background: {primary}; color: white; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600;">🏠 Home</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1508
  <div style="color: #999; font-size: 20px;">πŸ”</div>
 
1509
  <div style="color: #999; font-size: 20px;">❀️</div>
1510
  <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1511
  </div>
1512
  """
1513
- elif footer_id == "classic_expanded":
 
1514
  content = f"""
1515
- <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px; border-top: 1px solid #eee;">
1516
- <div style="text-align: center;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1517
  <div style="color: {primary}; font-size: 20px;">🏠</div>
1518
- <div style="color: {primary}; font-size: 9px; margin-top: 2px;">Home</div>
 
 
1519
  </div>
 
 
 
 
 
1520
  <div style="text-align: center;">
1521
- <div style="color: #999; font-size: 20px;">πŸ”</div>
1522
- <div style="color: #999; font-size: 9px; margin-top: 2px;">Search</div>
1523
  </div>
1524
  <div style="text-align: center;">
1525
- <div style="color: #999; font-size: 20px;">❀️</div>
1526
- <div style="color: #999; font-size: 9px; margin-top: 2px;">Likes</div>
1527
  </div>
1528
  <div style="text-align: center;">
1529
- <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1530
- <div style="color: #999; font-size: 9px; margin-top: 2px;">Profile</div>
 
 
 
 
1531
  </div>
1532
  </div>
1533
  """
1534
- elif footer_id == "gesture_bar":
1535
  content = f"""
1536
- <div style="display: flex; justify-content: center; align-items: center; height: 100%; background: rgba(255,255,255,0.95);">
1537
- <div style="width: 120px; height: 4px; background: #ccc; border-radius: 2px;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1538
  </div>
1539
  """
1540
  else:
@@ -1758,7 +2080,7 @@ def generate_header_gallery(theme_json: str = ""):
1758
 
1759
  def generate_footer_gallery(theme_json: str = ""):
1760
  """
1761
- Generate HTML gallery of all 5 footers
1762
  Footers are rendered directly with HTML/CSS using theme colors
1763
  """
1764
  from agents.flutter_screen_generator import FlutterScreenGenerator
@@ -1787,9 +2109,9 @@ def generate_footer_gallery(theme_json: str = ""):
1787
  html_parts = []
1788
  html_parts.append("""
1789
  <div style="background: #f8f9fa; padding: 24px; border-radius: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
1790
- <h3 style="margin-top: 0; color: #212529; font-size: 20px;">🎯 Footer Catalog (5 Footers)</h3>
1791
  <p style="color: #6c757d; font-size: 14px; margin-bottom: 24px;">
1792
- Tutti i footer/navigation bar renderizzati con i tuoi colori del tema
1793
  </p>
1794
  """)
1795
 
@@ -2330,10 +2652,10 @@ Snapchat - bright colors, fun filters, youthful design""",
2330
 
2331
  # Footer Gallery Section
2332
  gr.Markdown("---")
2333
- with gr.Accordion("🎯 Footer Catalog (5 Footers)", open=False):
2334
  gr.Markdown("""
2335
- Tutti i 5 footer/navigation bar disponibili con preview renderizzate in HTML/CSS.
2336
- I footer vengono stilizzati automaticamente con i colori del tema.
2337
  """)
2338
 
2339
  # Refresh button to update with new theme
 
1473
 
1474
  def render_footer_html(footer_id: str, footer_info: dict, primary: str, secondary: str, accent: str) -> str:
1475
  """
1476
+ Generate HTML/CSS for a single footer preview (30 footer layouts)
1477
  Returns HTML div with the footer rendered
1478
  """
1479
  footer_name = footer_info['name']
1480
 
1481
  # Common container style
1482
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1483
 
1484
+ # CLASSIC TAB BARS (6)
1485
+ if footer_id == "classic_4_icons":
1486
  content = f"""
1487
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px; border-top: 1px solid #eee;">
1488
  <div style="color: {primary}; font-size: 24px;">🏠</div>
1489
  <div style="color: #999; font-size: 24px;">πŸ”</div>
1490
  <div style="color: #999; font-size: 24px;">❀️</div>
1491
  <div style="color: #999; font-size: 24px;">πŸ‘€</div>
1492
  </div>
1493
  """
1494
+ elif footer_id == "classic_5_icons":
1495
  content = f"""
1496
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 16px; border-top: 1px solid #eee;">
1497
+ <div style="text-align: center;">
1498
+ <div style="color: {primary}; font-size: 20px;">🏠</div>
1499
+ <div style="color: {primary}; font-size: 8px; margin-top: 2px; font-weight: 600;">Home</div>
1500
+ </div>
1501
+ <div style="text-align: center;">
1502
+ <div style="color: #999; font-size: 20px;">πŸ”</div>
1503
+ <div style="color: #999; font-size: 8px; margin-top: 2px;">Search</div>
1504
+ </div>
1505
+ <div style="text-align: center;">
1506
+ <div style="color: #999; font-size: 20px;">βž•</div>
1507
+ <div style="color: #999; font-size: 8px; margin-top: 2px;">Add</div>
1508
+ </div>
1509
+ <div style="text-align: center;">
1510
+ <div style="color: #999; font-size: 20px;">❀️</div>
1511
+ <div style="color: #999; font-size: 8px; margin-top: 2px;">Likes</div>
1512
+ </div>
1513
+ <div style="text-align: center;">
1514
+ <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1515
+ <div style="color: #999; font-size: 8px; margin-top: 2px;">Profile</div>
1516
+ </div>
1517
  </div>
1518
  """
1519
+ elif footer_id == "compact_icons_badge":
1520
  content = f"""
1521
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 24px; border-top: 1px solid #eee;">
1522
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1523
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1524
+ <div style="position: relative; color: #999; font-size: 22px;">
1525
+ πŸ””
1526
+ <div style="position: absolute; top: -4px; right: -4px; background: #FF3B30; border-radius: 50%; width: 12px; height: 12px; font-size: 8px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700;">5</div>
1527
+ </div>
1528
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1529
+ </div>
1530
+ """
1531
+ elif footer_id == "labeled_vertical":
1532
+ content = f"""
1533
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px; border-top: 2px solid #f0f0f0;">
1534
+ <div style="text-align: center;">
1535
+ <div style="color: {primary}; font-size: 24px; margin-bottom: 2px;">🏠</div>
1536
+ <div style="color: {primary}; font-size: 9px; font-weight: 700;">Home</div>
1537
+ </div>
1538
+ <div style="text-align: center;">
1539
+ <div style="color: #999; font-size: 24px; margin-bottom: 2px;">πŸ”</div>
1540
+ <div style="color: #999; font-size: 9px;">Explore</div>
1541
+ </div>
1542
+ <div style="text-align: center;">
1543
+ <div style="color: #999; font-size: 24px; margin-bottom: 2px;">❀️</div>
1544
+ <div style="color: #999; font-size: 9px;">Saved</div>
1545
+ </div>
1546
+ <div style="text-align: center;">
1547
+ <div style="color: #999; font-size: 24px; margin-bottom: 2px;">πŸ‘€</div>
1548
+ <div style="color: #999; font-size: 9px;">Profile</div>
1549
+ </div>
1550
+ </div>
1551
+ """
1552
+ elif footer_id == "colored_active":
1553
+ content = f"""
1554
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 16px; border-top: 1px solid #eee;">
1555
+ <div style="background: {primary}; color: white; padding: 8px 16px; border-radius: 20px; font-size: 18px;">🏠</div>
1556
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1557
+ <div style="color: #999; font-size: 22px;">❀️</div>
1558
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1559
+ </div>
1560
+ """
1561
+ elif footer_id == "icon_label_inline":
1562
+ content = f"""
1563
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 12px; border-top: 1px solid #eee;">
1564
+ <div style="display: flex; align-items: center; gap: 6px; color: {primary};">
1565
+ <span style="font-size: 18px;">🏠</span>
1566
+ <span style="font-size: 11px; font-weight: 600;">Home</span>
1567
+ </div>
1568
+ <div style="display: flex; align-items: center; gap: 6px; color: #999;">
1569
+ <span style="font-size: 18px;">πŸ”</span>
1570
+ <span style="font-size: 11px;">Search</span>
1571
+ </div>
1572
+ <div style="color: #999; font-size: 18px;">❀️</div>
1573
+ <div style="color: #999; font-size: 18px;">πŸ‘€</div>
1574
+ </div>
1575
+ """
1576
+
1577
+ # FLOATING & FAB STYLES (5)
1578
+ elif footer_id == "floating_rounded":
1579
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1580
+ content = f"""
1581
+ <div style="position: absolute; bottom: 8px; left: 16px; right: 16px; background: white; border-radius: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); height: 56px; display: flex; justify-content: space-around; align-items: center; padding: 0 16px;">
1582
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1583
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1584
+ <div style="color: #999; font-size: 22px;">❀️</div>
1585
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1586
+ </div>
1587
+ """
1588
+ elif footer_id == "floating_fab_center":
1589
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1590
+ content = f"""
1591
+ <div style="position: absolute; bottom: 8px; left: 16px; right: 16px; background: white; border-radius: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); height: 56px; display: flex; justify-content: space-around; align-items: center; padding: 0 16px; position: relative;">
1592
+ <div style="color: #999; font-size: 20px;">🏠</div>
1593
  <div style="color: #999; font-size: 20px;">πŸ”</div>
1594
+ <div style="width: 54px; height: 54px; border-radius: 50%; background: {primary}; display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; position: absolute; left: 50%; transform: translateX(-50%) translateY(-50%); box-shadow: 0 4px 12px rgba(0,0,0,0.2); top: 0;">+</div>
1595
  <div style="color: #999; font-size: 20px;">❀️</div>
1596
  <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1597
  </div>
1598
  """
1599
+ elif footer_id == "floating_translucent":
1600
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1601
  content = f"""
1602
+ <div style="position: absolute; bottom: 8px; left: 16px; right: 16px; background: rgba(255,255,255,0.85); backdrop-filter: blur(10px); border-radius: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); height: 56px; display: flex; justify-content: space-around; align-items: center; padding: 0 16px; border: 1px solid rgba(255,255,255,0.3);">
1603
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1604
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1605
+ <div style="color: #999; font-size: 22px;">❀️</div>
1606
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1607
+ </div>
1608
+ """
1609
+ elif footer_id == "floating_pills_bar":
1610
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1611
+ content = f"""
1612
+ <div style="position: absolute; bottom: 8px; left: 16px; right: 16px; background: white; border-radius: 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); height: 56px; display: flex; justify-content: space-around; align-items: center; padding: 0 12px;">
1613
+ <div style="background: {primary}; color: white; padding: 8px 12px; border-radius: 18px; font-size: 11px; font-weight: 600;">🏠 Home</div>
1614
+ <div style="color: #999; font-size: 20px;">πŸ”</div>
1615
+ <div style="color: #999; font-size: 20px;">❀️</div>
1616
+ <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1617
+ </div>
1618
+ """
1619
+ elif footer_id == "dual_fab":
1620
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1621
+ content = f"""
1622
+ <div style="position: absolute; bottom: 8px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center;">
1623
+ <div style="width: 50px; height: 50px; border-radius: 50%; background: {primary}; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.2);">🏠</div>
1624
+ <div style="width: 50px; height: 50px; border-radius: 50%; background: {secondary}; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.2);">+</div>
1625
+ </div>
1626
+ """
1627
+
1628
+ # CURVED & SHAPED DESIGNS (5)
1629
+ elif footer_id == "curved_top":
1630
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1631
+ content = f"""
1632
+ <div style="position: absolute; top: -20px; left: 0; right: 0; height: 90px; background: white; border-radius: 50% 50% 0 0 / 40px 40px 0 0;">
1633
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 24px 20px 0;">
1634
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1635
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1636
+ <div style="color: #999; font-size: 22px;">❀️</div>
1637
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1638
+ </div>
1639
+ </div>
1640
+ """
1641
+ elif footer_id == "notched_center":
1642
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1643
+ content = f"""
1644
+ <div style="position: relative; height: 100%; display: flex; justify-content: space-around; align-items: center; padding: 0 20px;">
1645
+ <div style="position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 30px; background: white; border-radius: 30px 30px 0 0;"></div>
1646
+ <div style="color: #999; font-size: 20px;">🏠</div>
1647
+ <div style="color: #999; font-size: 20px;">πŸ”</div>
1648
+ <div style="width: 50px; height: 50px; border-radius: 50%; background: {primary}; display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; position: absolute; left: 50%; transform: translateX(-50%) translateY(-50%); box-shadow: 0 4px 12px rgba(0,0,0,0.2); top: 0;">+</div>
1649
+ <div style="color: #999; font-size: 20px;">❀️</div>
1650
+ <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1651
+ </div>
1652
+ """
1653
+ elif footer_id == "wave_top":
1654
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1655
+ content = f"""
1656
+ <svg style="position: absolute; top: -15px; left: 0; width: 100%; height: 20px;" viewBox="0 0 300 20" preserveAspectRatio="none">
1657
+ <path d="M0,10 Q75,0 150,10 T300,10 L300,20 L0,20 Z" fill="white"/>
1658
+ </svg>
1659
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px;">
1660
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1661
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1662
+ <div style="color: #999; font-size: 22px;">❀���</div>
1663
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1664
+ </div>
1665
+ """
1666
+ elif footer_id == "island_bar":
1667
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: visible; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: transparent;"
1668
+ content = f"""
1669
+ <div style="position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: white; border-radius: 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); height: 52px; display: flex; justify-content: space-around; align-items: center; padding: 0 24px; gap: 28px;">
1670
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1671
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1672
+ <div style="color: #999; font-size: 22px;">❀️</div>
1673
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1674
+ </div>
1675
+ """
1676
+ elif footer_id == "arc_active":
1677
+ base_style = "width: 300px; height: 70px; border-radius: 0 0 12px 12px; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: white;"
1678
+ content = f"""
1679
+ <div style="position: absolute; top: 0; left: 20px; width: 52px; height: 4px; background: {primary}; border-radius: 0 0 4px 4px;"></div>
1680
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px;">
1681
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1682
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1683
+ <div style="color: #999; font-size: 22px;">❀️</div>
1684
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1685
+ </div>
1686
+ """
1687
+
1688
+ # SEGMENTED & PILLS (5)
1689
+ elif footer_id == "segmented_control":
1690
+ content = f"""
1691
+ <div style="display: flex; justify-content: center; align-items: center; height: 100%; padding: 0 16px;">
1692
+ <div style="background: #f0f0f0; border-radius: 24px; padding: 4px; display: flex; gap: 4px;">
1693
+ <div style="background: {primary}; color: white; padding: 8px 20px; border-radius: 20px; font-size: 11px; font-weight: 600;">Home</div>
1694
+ <div style="background: transparent; color: #666; padding: 8px 20px; border-radius: 20px; font-size: 11px; font-weight: 600;">Search</div>
1695
+ <div style="background: transparent; color: #666; padding: 8px 20px; border-radius: 20px; font-size: 11px; font-weight: 600;">Profile</div>
1696
+ </div>
1697
+ </div>
1698
+ """
1699
+ elif footer_id == "pill_buttons":
1700
+ content = f"""
1701
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 12px;">
1702
+ <div style="background: {primary}; color: white; padding: 10px 16px; border-radius: 22px; font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">🏠 Home</div>
1703
+ <div style="background: #f5f5f5; color: #666; padding: 10px 16px; border-radius: 22px; font-size: 12px; font-weight: 600;">πŸ”</div>
1704
+ <div style="background: #f5f5f5; color: #666; padding: 10px 16px; border-radius: 22px; font-size: 12px; font-weight: 600;">πŸ‘€</div>
1705
+ </div>
1706
+ """
1707
+ elif footer_id == "grouped_pills":
1708
+ content = f"""
1709
+ <div style="display: flex; justify-content: center; align-items: center; height: 100%; padding: 0 16px;">
1710
+ <div style="background: #f8f8f8; border-radius: 26px; padding: 6px 8px; display: flex; gap: 8px;">
1711
+ <div style="background: {primary}; color: white; padding: 8px 16px; border-radius: 20px; font-size: 11px; font-weight: 600;">🏠</div>
1712
+ <div style="color: #666; padding: 8px 16px; font-size: 18px;">πŸ”</div>
1713
+ <div style="color: #666; padding: 8px 16px; font-size: 18px;">❀️</div>
1714
+ <div style="color: #666; padding: 8px 16px; font-size: 18px;">πŸ‘€</div>
1715
+ </div>
1716
+ </div>
1717
+ """
1718
+ elif footer_id == "slider_nav":
1719
+ content = f"""
1720
+ <div style="position: relative; height: 100%; border-top: 1px solid #eee;">
1721
+ <div style="position: absolute; bottom: 0; left: 20px; width: 52px; height: 3px; background: {primary}; border-radius: 3px 3px 0 0;"></div>
1722
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px;">
1723
+ <div style="color: {primary}; font-size: 22px;">🏠</div>
1724
+ <div style="color: #999; font-size: 22px;">πŸ”</div>
1725
+ <div style="color: #999; font-size: 22px;">❀️</div>
1726
+ <div style="color: #999; font-size: 22px;">πŸ‘€</div>
1727
+ </div>
1728
+ </div>
1729
+ """
1730
+ elif footer_id == "morphing_pills":
1731
+ content = f"""
1732
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 12px; background: #fafafa;">
1733
+ <div style="background: {primary}; color: white; padding: 10px 18px; border-radius: 24px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px;">🏠 Home</div>
1734
+ <div style="color: #999; font-size: 20px; padding: 8px;">πŸ”</div>
1735
+ <div style="color: #999; font-size: 20px; padding: 8px;">❀️</div>
1736
+ <div style="color: #999; font-size: 20px; padding: 8px;">πŸ‘€</div>
1737
+ </div>
1738
+ """
1739
+
1740
+ # MINIMALIST & GESTURE (4)
1741
+ elif footer_id == "minimal_dots":
1742
+ content = f"""
1743
+ <div style="display: flex; justify-content: center; align-items: center; height: 100%; gap: 12px;">
1744
+ <div style="width: 8px; height: 8px; border-radius: 50%; background: {primary};"></div>
1745
+ <div style="width: 6px; height: 6px; border-radius: 50%; background: #ddd;"></div>
1746
+ <div style="width: 6px; height: 6px; border-radius: 50%; background: #ddd;"></div>
1747
+ <div style="width: 6px; height: 6px; border-radius: 50%; background: #ddd;"></div>
1748
+ </div>
1749
+ """
1750
+ elif footer_id == "gesture_swipe":
1751
+ content = f"""
1752
+ <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; gap: 4px; background: rgba(250,250,250,0.95);">
1753
+ <div style="width: 40px; height: 4px; background: #ccc; border-radius: 2px;"></div>
1754
+ <div style="font-size: 8px; color: #999; text-transform: uppercase; letter-spacing: 0.5px;">Swipe</div>
1755
+ </div>
1756
+ """
1757
+ elif footer_id == "thin_bar":
1758
+ content = f"""
1759
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 30px; border-top: 1px solid #f0f0f0;">
1760
+ <div style="width: 24px; height: 3px; background: {primary}; border-radius: 2px;"></div>
1761
+ <div style="width: 18px; height: 3px; background: #ddd; border-radius: 2px;"></div>
1762
+ <div style="width: 18px; height: 3px; background: #ddd; border-radius: 2px;"></div>
1763
+ <div style="width: 18px; height: 3px; background: #ddd; border-radius: 2px;"></div>
1764
+ </div>
1765
+ """
1766
+ elif footer_id == "invisible_tap":
1767
+ content = f"""
1768
+ <div style="position: relative; height: 100%; border-top: 1px solid #f8f8f8;">
1769
+ <div style="position: absolute; top: 0; left: 20px; width: 52px; height: 2px; background: {primary};"></div>
1770
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px; opacity: 0.3;">
1771
+ <div style="font-size: 18px;">🏠</div>
1772
+ <div style="font-size: 18px;">πŸ”</div>
1773
+ <div style="font-size: 18px;">❀️</div>
1774
+ <div style="font-size: 18px;">πŸ‘€</div>
1775
+ </div>
1776
+ </div>
1777
+ """
1778
+
1779
+ # ADVANCED & INTERACTIVE (5)
1780
+ elif footer_id == "expandable_drawer":
1781
+ content = f"""
1782
+ <div style="position: relative; height: 100%; background: white; border-top: 1px solid #eee;">
1783
+ <div style="display: flex; justify-content: center; padding-top: 6px;">
1784
+ <div style="width: 40px; height: 4px; background: #ddd; border-radius: 2px;"></div>
1785
+ </div>
1786
+ <div style="display: flex; justify-content: space-around; align-items: center; padding: 8px 20px;">
1787
  <div style="color: {primary}; font-size: 20px;">🏠</div>
1788
+ <div style="color: #999; font-size: 20px;">πŸ”</div>
1789
+ <div style="color: #999; font-size: 20px;">❀️</div>
1790
+ <div style="color: #999; font-size: 20px;">☰</div>
1791
  </div>
1792
+ </div>
1793
+ """
1794
+ elif footer_id == "grid_menu":
1795
+ content = f"""
1796
+ <div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 16px; background: #fafafa; border-top: 1px solid #eee;">
1797
  <div style="text-align: center;">
1798
+ <div style="color: {primary}; font-size: 18px;">🏠</div>
1799
+ <div style="font-size: 7px; color: {primary}; margin-top: 2px; font-weight: 600;">Home</div>
1800
  </div>
1801
  <div style="text-align: center;">
1802
+ <div style="color: #999; font-size: 18px;">πŸ”</div>
1803
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Search</div>
1804
  </div>
1805
  <div style="text-align: center;">
1806
+ <div style="color: #999; font-size: 18px;">❀️</div>
1807
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Saved</div>
1808
+ </div>
1809
+ <div style="text-align: center;">
1810
+ <div style="color: #999; font-size: 18px;">πŸ‘€</div>
1811
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Profile</div>
1812
  </div>
1813
  </div>
1814
  """
1815
+ elif footer_id == "carousel_nav":
1816
  content = f"""
1817
+ <div style="display: flex; align-items: center; height: 100%; padding: 0 12px; gap: 8px; overflow-x: auto; border-top: 1px solid #eee;">
1818
+ <div style="background: {primary}; color: white; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;">🏠 Home</div>
1819
+ <div style="background: #f5f5f5; color: #666; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;">πŸ” Search</div>
1820
+ <div style="background: #f5f5f5; color: #666; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;">❀️ Saved</div>
1821
+ <div style="background: #f5f5f5; color: #666; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;">πŸ‘€ Profile</div>
1822
+ </div>
1823
+ """
1824
+ elif footer_id == "context_aware":
1825
+ content = f"""
1826
+ <div style="position: relative; height: 100%; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-top: 1px solid rgba(0,0,0,0.05);">
1827
+ <div style="display: flex; justify-content: space-around; align-items: center; height: 100%; padding: 0 20px;">
1828
+ <div style="color: {primary}; font-size: 22px; opacity: 1;">🏠</div>
1829
+ <div style="color: #999; font-size: 18px; opacity: 0.6;">πŸ”</div>
1830
+ <div style="color: #999; font-size: 18px; opacity: 0.6;">❀️</div>
1831
+ <div style="color: #999; font-size: 18px; opacity: 0.6;">πŸ‘€</div>
1832
+ </div>
1833
+ </div>
1834
+ """
1835
+ elif footer_id == "nested_menu":
1836
+ content = f"""
1837
+ <div style="position: relative; height: 100%; background: white; border-top: 1px solid #eee;">
1838
+ <div style="display: flex; justify-content: space-around; align-items: flex-start; padding: 6px 16px;">
1839
+ <div style="text-align: center;">
1840
+ <div style="color: {primary}; font-size: 20px;">🏠</div>
1841
+ <div style="font-size: 7px; color: {primary}; margin-top: 2px; font-weight: 600;">Home</div>
1842
+ <div style="display: flex; gap: 2px; margin-top: 2px; justify-content: center;">
1843
+ <div style="width: 3px; height: 3px; border-radius: 50%; background: {primary};"></div>
1844
+ <div style="width: 3px; height: 3px; border-radius: 50%; background: {primary}; opacity: 0.3;"></div>
1845
+ </div>
1846
+ </div>
1847
+ <div style="text-align: center;">
1848
+ <div style="color: #999; font-size: 20px;">πŸ”</div>
1849
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Explore</div>
1850
+ </div>
1851
+ <div style="text-align: center;">
1852
+ <div style="color: #999; font-size: 20px;">❀️</div>
1853
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Saved</div>
1854
+ </div>
1855
+ <div style="text-align: center;">
1856
+ <div style="color: #999; font-size: 20px;">πŸ‘€</div>
1857
+ <div style="font-size: 7px; color: #999; margin-top: 2px;">Profile</div>
1858
+ </div>
1859
+ </div>
1860
  </div>
1861
  """
1862
  else:
 
2080
 
2081
  def generate_footer_gallery(theme_json: str = ""):
2082
  """
2083
+ Generate HTML gallery of all 30 footer layouts
2084
  Footers are rendered directly with HTML/CSS using theme colors
2085
  """
2086
  from agents.flutter_screen_generator import FlutterScreenGenerator
 
2109
  html_parts = []
2110
  html_parts.append("""
2111
  <div style="background: #f8f9fa; padding: 24px; border-radius: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2112
+ <h3 style="margin-top: 0; color: #212529; font-size: 20px;">🎯 Footer Catalog (30 Footer Layouts)</h3>
2113
  <p style="color: #6c757d; font-size: 14px; margin-bottom: 24px;">
2114
+ 30 layout di footer/navigation bar diversi - classic tabs, floating bars, curved designs, pills, minimalist, advanced - renderizzati con i tuoi colori
2115
  </p>
2116
  """)
2117
 
 
2652
 
2653
  # Footer Gallery Section
2654
  gr.Markdown("---")
2655
+ with gr.Accordion("🎯 Footer Catalog (30 Footer Layouts)", open=False):
2656
  gr.Markdown("""
2657
+ Tutti i 30 footer/navigation bar con layout diversi renderizzati in HTML/CSS.
2658
+ Classic tabs, floating bars, curved designs, pills, minimalist, advanced interactive.
2659
  """)
2660
 
2661
  # Refresh button to update with new theme