Rammohan0504 commited on
Commit
53fcc33
·
verified ·
1 Parent(s): 75bff58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -74,18 +74,18 @@ def display_dishes(category):
74
  html_content = "<div style='display: flex; flex-direction: column; align-items: center; width: 100%;'>"
75
  for dish in filtered_dishes:
76
  html_content += f"""
77
- <div style='margin: 10px; display: flex; align-items: center; justify-content: space-between;
78
  width: 80%; padding: 10px; border: 1px solid #ddd; border-radius: 10px;
79
  background-color: #f9f9f9;'>
80
- <div style='flex: 1; margin-right: 20px;'>
 
 
81
  <h4 style='font-size: 18px; color: #444; margin: 0;'>{dish['name']}</h4>
82
  <p style='font-size: 14px; color: #666; margin: 5px 0;'>{dish['description']}</p>
83
  </div>
84
- <img src='{dish['image']}' alt='{dish['name']}'
85
- style='width: 120px; height: 80px; object-fit: cover; border-radius: 10px; margin-right: 10px;'>
86
  <button onclick="showPopup('{dish['image']}', '{dish['name']}', '{dish['description']}')"
87
- style="padding: 5px 10px; background-color: #28a745; color: white; border: none;
88
- border-radius: 5px; cursor: pointer; align-self: flex-end;">Add</button>
89
  </div>
90
  """
91
  html_content += "</div>"
 
74
  html_content = "<div style='display: flex; flex-direction: column; align-items: center; width: 100%;'>"
75
  for dish in filtered_dishes:
76
  html_content += f"""
77
+ <div style='margin: 10px; display: flex; flex-direction: column; align-items: center;
78
  width: 80%; padding: 10px; border: 1px solid #ddd; border-radius: 10px;
79
  background-color: #f9f9f9;'>
80
+ <img src='{dish['image']}' alt='{dish['name']}'
81
+ style='width: 100%; height: auto; object-fit: cover; border-radius: 10px;'>
82
+ <div style='flex: 1; margin-top: 10px; text-align: center;'>
83
  <h4 style='font-size: 18px; color: #444; margin: 0;'>{dish['name']}</h4>
84
  <p style='font-size: 14px; color: #666; margin: 5px 0;'>{dish['description']}</p>
85
  </div>
 
 
86
  <button onclick="showPopup('{dish['image']}', '{dish['name']}', '{dish['description']}')"
87
+ style="margin-top: 10px; padding: 10px 20px; background-color: #28a745; color: white; border: none;
88
+ border-radius: 5px; cursor: pointer;">Add</button>
89
  </div>
90
  """
91
  html_content += "</div>"