Spaces:
Runtime error
Runtime error
Update app.py
Browse files97 unmodified lines989910010110210310410510610713 unmodified lines1211221231241251261271282 unmodified lines13113213313413513613713813914014128 unmodified lines17017117217317417597 unmodified lines# Pagination setuppage = request.args.get('page', 1, type=int)per_page = 10 # 10 products per column# Calculate start and end indices for the current pagestart = (page - 1) * per_page * 3 # 3 columns per rowend = start + per_page * 3# Slice the products list for the current page13 unmodified lines<style>body {font-family: Arial, sans-serif;margin: 20px;background-color: #f9f9f9;}h1 {color: #333;2 unmodified lines.container {display: flex;flex-wrap: wrap;justify-content: space-between;gap: 20px;}.product {flex: 1 1 calc(30% - 20px); /* Three columns */background-color: #fff;border: 1px solid #ddd;padding: 15px;28 unmodified lines.pagination a:hover:not(.active) {background-color: #ddd;}</style></head><body>97 unmodified lines989910010110210310410510610713 unmodified lines1211221231241251261271281292 unmodified lines13213313413513613713813914014114228 unmodified lines17117217317417517617717817918018118218397 unmodified lines# Pagination setuppage = request.args.get('page', 1, type=int)per_page = 6 # Adjusted for mobile view# Calculate start and end indices for the current pagestart = (page - 1) * per_page * 3 # 3 columns for bigger screensend = start + per_page * 3# Slice the products list for the current page13 unmodified lines<style>body {font-family: Arial, sans-serif;margin: 0; /* Reset default margin */background-color: #f9f9f9;padding: 20px;}h1 {color: #333;2 unmodified lines.container {display: flex;flex-wrap: wrap;justify-content: space-around;gap: 20px;}.product {flex: 1 1 calc(100% - 20px); /* Full width on mobile */background-color: #fff;border: 1px solid #ddd;padding: 15px;28 unmodified lines.pagination a:hover:not(.active) {background-color: #ddd;}/* Media query for larger screens */@media (min-width: 768px) {.product {flex: 1 1 calc(30% - 20px); /* Three columns on larger screens */}}</style></head><body>
app.py+13-5