Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -91,21 +91,17 @@ def filter_menu(preference):
|
|
91 |
for section, items in filtered_data.items():
|
92 |
html_content += f"<h2 style='text-align: center; margin-top: 10px;'>{section}</h2>"
|
93 |
html_content += '<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; justify-content: center;">'
|
94 |
-
for
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
<div style="
|
99 |
-
<
|
100 |
-
<
|
101 |
-
|
102 |
-
<p style='font-size: 1.1em; color: green; text-align: center;'>${item['Price__c']}</p>
|
103 |
-
<p style='font-size: 0.9em; text-align: justify;'>{item['Description__c']}</p>
|
104 |
-
</div>
|
105 |
</div>
|
106 |
-
|
107 |
-
|
108 |
-
html_content += "<div style='visibility: hidden; height: 250px;'></div>"
|
109 |
html_content += '</div>'
|
110 |
html_content += '</div>'
|
111 |
|
|
|
91 |
for section, items in filtered_data.items():
|
92 |
html_content += f"<h2 style='text-align: center; margin-top: 10px;'>{section}</h2>"
|
93 |
html_content += '<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; justify-content: center;">'
|
94 |
+
for item in items:
|
95 |
+
html_content += f"""
|
96 |
+
<div style="border: 1px solid #ddd; border-radius: 10px; box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); overflow: hidden; height: 350px;">
|
97 |
+
<img src="{item.get('Image1__c', '')}" style="width: 100%; height: 200px; object-fit: cover;">
|
98 |
+
<div style="padding: 10px;">
|
99 |
+
<h3 style='font-size: 1.2em; text-align: center;'>{item['Name']}</h3>
|
100 |
+
<p style='font-size: 1.1em; color: green; text-align: center;'>${item['Price__c']}</p>
|
101 |
+
<p style='font-size: 0.9em; text-align: justify; margin: 5px;'>{item['Description__c']}</p>
|
|
|
|
|
|
|
102 |
</div>
|
103 |
+
</div>
|
104 |
+
"""
|
|
|
105 |
html_content += '</div>'
|
106 |
html_content += '</div>'
|
107 |
|