Rammohan0504 commited on
Commit
a25ae0f
·
verified ·
1 Parent(s): 33b57be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -42,15 +42,19 @@ def filter_dishes(category):
42
  # Function to generate dish cards
43
  def display_dishes(category):
44
  filtered_dishes = filter_dishes(category)
45
- html_content = "<div style='display: flex; flex-wrap: wrap; justify-content: center;'>"
46
  for dish in filtered_dishes:
47
  html_content += f"""
48
- <div style='margin: 10px; text-align: center; cursor: pointer; border: 1px solid #ddd;
49
- padding: 10px; border-radius: 10px; width: 200px; background-color: #f9f9f9;'
 
50
  onclick="showPopup('{dish['image']}', '{dish['name']}', '{dish['description']}')">
51
  <img src='{dish['image']}' alt='{dish['name']}'
52
- style='width: 180px; height: 120px; object-fit: cover; border-radius: 10px;'>
53
- <h4 style='margin-top: 10px; font-size: 16px; color: #444;'>{dish['name']}</h4>
 
 
 
54
  </div>
55
  """
56
  html_content += "</div>"
 
42
  # Function to generate dish cards
43
  def display_dishes(category):
44
  filtered_dishes = filter_dishes(category)
45
+ html_content = "<div style='display: flex; flex-direction: column; align-items: center; width: 100%;'>"
46
  for dish in filtered_dishes:
47
  html_content += f"""
48
+ <div style='margin: 10px; display: flex; align-items: center; justify-content: space-between;
49
+ width: 80%; padding: 10px; border: 1px solid #ddd; border-radius: 10px;
50
+ background-color: #f9f9f9; cursor: pointer;'
51
  onclick="showPopup('{dish['image']}', '{dish['name']}', '{dish['description']}')">
52
  <img src='{dish['image']}' alt='{dish['name']}'
53
+ style='width: 120px; height: 80px; object-fit: cover; border-radius: 10px;'>
54
+ <div style='flex: 1; margin-left: 20px;'>
55
+ <h4 style='font-size: 18px; color: #444; margin: 0;'>{dish['name']}</h4>
56
+ <p style='font-size: 14px; color: #666; margin: 5px 0;'>{dish['description']}</p>
57
+ </div>
58
  </div>
59
  """
60
  html_content += "</div>"