nagasurendra commited on
Commit
7229c2d
·
verified ·
1 Parent(s): 5f33c60

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +24 -22
templates/menu.html CHANGED
@@ -335,15 +335,6 @@ form-check-input addon-option{
335
  }
336
  /* Custom Toggle Switch Styling */
337
 
338
- /* Flex container to align toggle buttons */
339
- /* Flex container to align toggle buttons */
340
- .toggle-container {
341
- display: flex;
342
- justify-content: flex-start; /* Align buttons to the left */
343
- gap: 20px; /* Adjust space between buttons */
344
- margin: 0 auto; /* Center align the container if required */
345
- }
346
-
347
  /* Custom Toggle Switch Styling */
348
  .custom-toggle {
349
  -webkit-appearance: none;
@@ -357,12 +348,21 @@ form-check-input addon-option{
357
  cursor: pointer;
358
  transition: background 0.3s;
359
  display: inline-block; /* Ensure it is aligned on the same line */
 
360
  }
361
 
 
 
 
 
 
 
 
362
  .custom-toggle:checked {
363
  background: #4caf50; /* Green when checked */
364
  }
365
 
 
366
  .custom-toggle:before {
367
  content: "";
368
  position: absolute;
@@ -379,6 +379,7 @@ form-check-input addon-option{
379
  transform: translateX(20px); /* Moves the toggle to the right */
380
  }
381
 
 
382
  /* Optional: Style the labels */
383
  .form-check-label {
384
  font-size: 16px;
@@ -465,21 +466,22 @@ form-check-input addon-option{
465
  <form method="get" action="/menu" class="text-center mb-4" id="filter-form">
466
  <label class="form-label fw-bold">Filters:</label>
467
 
468
- <!-- Veg Toggle -->
469
- <div class="form-check form-check-inline">
470
- <input type="checkbox" id="veg-toggle" name="veg"
471
- {% if selected_category == "Veg" %}checked{% endif %}
472
- class="custom-toggle" onchange="handleToggle('veg')">
473
- <label class="form-check-label" for="veg-toggle">Veg Only</label>
474
- </div>
475
 
 
476
  <!-- Customized Dish Toggle -->
477
- <div class="form-check form-check-inline">
478
- <input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish"
479
- {% if selected_category == "Customized Dish" %}checked{% endif %}
480
- class="custom-toggle" onchange="handleToggle('custom')">
481
- <label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
482
- </div>
483
  </form>
484
 
485
 
 
335
  }
336
  /* Custom Toggle Switch Styling */
337
 
 
 
 
 
 
 
 
 
 
338
  /* Custom Toggle Switch Styling */
339
  .custom-toggle {
340
  -webkit-appearance: none;
 
348
  cursor: pointer;
349
  transition: background 0.3s;
350
  display: inline-block; /* Ensure it is aligned on the same line */
351
+ margin-right: 10px; /* Space between toggle and text */
352
  }
353
 
354
+ /* Make the text aligned correctly with the toggle switch */
355
+ .toggle-container {
356
+ display: flex;
357
+ align-items: center;
358
+ }
359
+
360
+ /* Custom toggle checked style */
361
  .custom-toggle:checked {
362
  background: #4caf50; /* Green when checked */
363
  }
364
 
365
+ /* Knob of the toggle */
366
  .custom-toggle:before {
367
  content: "";
368
  position: absolute;
 
379
  transform: translateX(20px); /* Moves the toggle to the right */
380
  }
381
 
382
+
383
  /* Optional: Style the labels */
384
  .form-check-label {
385
  font-size: 16px;
 
466
  <form method="get" action="/menu" class="text-center mb-4" id="filter-form">
467
  <label class="form-label fw-bold">Filters:</label>
468
 
469
+ <div class="toggle-container">
470
+ <!-- Veg Only Toggle -->
471
+ <input type="checkbox" id="veg-toggle" name="veg"
472
+ {% if selected_category == "Veg" %}checked{% endif %}
473
+ class="custom-toggle" onchange="handleToggle('veg')">
474
+ <label for="veg-toggle">Veg Only</label>
475
+ </div>
476
 
477
+ <div class="toggle-container">
478
  <!-- Customized Dish Toggle -->
479
+ <input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish"
480
+ {% if selected_category == "Customized Dish" %}checked{% endif %}
481
+ class="custom-toggle" onchange="handleToggle('custom')">
482
+ <label for="category-CustomizedDish">Customized Dish</label>
483
+ </div>
484
+
485
  </form>
486
 
487