Spaces:
Runtime error
Runtime error
Update templates/menu.html
Browse files- templates/menu.html +59 -6
templates/menu.html
CHANGED
|
@@ -628,15 +628,34 @@ form-check-input addon-option{
|
|
| 628 |
}
|
| 629 |
|
| 630 |
/* Ensure that the buttons do not stretch too much or shrink too much */
|
| 631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
display: flex;
|
| 633 |
-
justify-content: center;
|
| 634 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
}
|
| 636 |
|
| 637 |
-
/*
|
| 638 |
-
.category-
|
| 639 |
-
|
|
|
|
| 640 |
}
|
| 641 |
|
| 642 |
/* Hover effect for buttons */
|
|
@@ -652,6 +671,21 @@ form-check-input addon-option{
|
|
| 652 |
border: 2px solid #ff7043;
|
| 653 |
}
|
| 654 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 655 |
|
| 656 |
|
| 657 |
|
|
@@ -699,7 +733,7 @@ form-check-input addon-option{
|
|
| 699 |
<label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
|
| 700 |
</div> -->
|
| 701 |
<!-- </form> -->
|
| 702 |
-
<form method="get" action="/menu" class="text-center mb-4">
|
| 703 |
<!-- <label class="form-label fw-bold">Select a Category:</label> -->
|
| 704 |
|
| 705 |
<div class="form-check form-check-inline category-container">
|
|
@@ -717,9 +751,28 @@ form-check-input addon-option{
|
|
| 717 |
Customized Dish
|
| 718 |
</button>
|
| 719 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 720 |
</form>
|
| 721 |
|
| 722 |
|
|
|
|
| 723 |
|
| 724 |
|
| 725 |
|
|
|
|
| 628 |
}
|
| 629 |
|
| 630 |
/* Ensure that the buttons do not stretch too much or shrink too much */
|
| 631 |
+
/* Ensures all buttons stay in the same row */
|
| 632 |
+
.category-container {
|
| 633 |
+
display: flex;
|
| 634 |
+
justify-content: space-between; /* Aligns buttons in a row */
|
| 635 |
+
gap: 15px; /* Space between buttons */
|
| 636 |
+
margin-top: 20px; /* Space above the button row */
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
/* Style for the buttons */
|
| 640 |
+
.category-btn {
|
| 641 |
display: flex;
|
|
|
|
| 642 |
align-items: center;
|
| 643 |
+
justify-content: center;
|
| 644 |
+
padding: 10px 20px;
|
| 645 |
+
border: 2px solid #ccc;
|
| 646 |
+
border-radius: 25px;
|
| 647 |
+
background-color: white;
|
| 648 |
+
font-size: 16px;
|
| 649 |
+
cursor: pointer;
|
| 650 |
+
transition: background-color 0.3s, color 0.3s;
|
| 651 |
+
width: 120px; /* Ensures buttons are of equal width */
|
| 652 |
+
text-align: center;
|
| 653 |
}
|
| 654 |
|
| 655 |
+
/* Icons styling */
|
| 656 |
+
.category-btn .icon {
|
| 657 |
+
margin-right: 8px; /* Space between icon and text */
|
| 658 |
+
font-size: 20px; /* Icon size */
|
| 659 |
}
|
| 660 |
|
| 661 |
/* Hover effect for buttons */
|
|
|
|
| 671 |
border: 2px solid #ff7043;
|
| 672 |
}
|
| 673 |
|
| 674 |
+
/* Example icons from Font Awesome, adjust based on your icon class */
|
| 675 |
+
.category-btn .icon.all {
|
| 676 |
+
content: '\f0f6'; /* FontAwesome icon code for "All" */
|
| 677 |
+
}
|
| 678 |
+
.category-btn .icon.veg {
|
| 679 |
+
content: '\f4cd'; /* FontAwesome icon code for "Veg" */
|
| 680 |
+
}
|
| 681 |
+
.category-btn .icon.nonveg {
|
| 682 |
+
content: '\f0f6'; /* FontAwesome icon code for "Non Veg" */
|
| 683 |
+
}
|
| 684 |
+
.category-btn .icon.customized {
|
| 685 |
+
content: '\f0c0'; /* FontAwesome icon code for "Customized" */
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
|
| 689 |
|
| 690 |
|
| 691 |
|
|
|
|
| 733 |
<label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
|
| 734 |
</div> -->
|
| 735 |
<!-- </form> -->
|
| 736 |
+
<!-- <form method="get" action="/menu" class="text-center mb-4">
|
| 737 |
<!-- <label class="form-label fw-bold">Select a Category:</label> -->
|
| 738 |
|
| 739 |
<div class="form-check form-check-inline category-container">
|
|
|
|
| 751 |
Customized Dish
|
| 752 |
</button>
|
| 753 |
</div>
|
| 754 |
+
</form> -->
|
| 755 |
+
<form method="get" action="/menu" class="text-center mb-4">
|
| 756 |
+
<div class="category-container">
|
| 757 |
+
{% for category in categories %}
|
| 758 |
+
<button type="submit" name="category" value="{{ category }}" class="category-btn
|
| 759 |
+
{% if selected_category == category %}active-btn{% endif %}">
|
| 760 |
+
<i class="icon {{ category | lower }}"></i> <!-- Example icon class -->
|
| 761 |
+
{{ category }}
|
| 762 |
+
</button>
|
| 763 |
+
{% endfor %}
|
| 764 |
+
|
| 765 |
+
<!-- Customized Dish button -->
|
| 766 |
+
<button type="submit" name="category" value="Customized Dish" class="category-btn
|
| 767 |
+
{% if selected_category == "Customized Dish" %}active-btn{% endif %}">
|
| 768 |
+
<i class="icon customized"></i> <!-- Example icon class -->
|
| 769 |
+
Customized Dish
|
| 770 |
+
</button>
|
| 771 |
+
</div>
|
| 772 |
</form>
|
| 773 |
|
| 774 |
|
| 775 |
+
|
| 776 |
|
| 777 |
|
| 778 |
|