nagasurendra commited on
Commit
aced822
·
verified ·
1 Parent(s): e9152f4

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +44 -5
templates/menu.html CHANGED
@@ -333,6 +333,40 @@ form-check-input addon-option{
333
  .custom-radio:hover {
334
  border-color: #388E3C;
335
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  /* Optional: Style the labels */
337
  .form-check-label {
338
  font-size: 16px;
@@ -421,18 +455,23 @@ form-check-input addon-option{
421
  <label class="form-label fw-bold">Select a Category:</label>
422
  <div class="form-check form-check-inline">
423
  {% for category in categories %}
424
- <input type="radio" id="category-{{ category }}" name="category" value="{{ category }}" class="custom-radio"
 
 
425
  {% if selected_category == category %}checked{% endif %} onchange="this.form.submit()">
426
  <label class="form-check-label" for="category-{{ category }}">{{ category }}</label>
427
  {% endfor %}
428
- </div>
429
- <!-- Separate Customized Dish radio button in a new div to align it properly -->
430
- <div class="form-check">
431
- <input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish" class="custom-radio"
 
 
432
  {% if selected_category == "Customized Dish" %}checked{% endif %} onchange="this.form.submit()">
433
  <label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
434
  </div>
435
  </form>
 
436
 
437
  <!-- Show menu items only when Customized Dish is not selected -->
438
  <div class="container mt-4">
 
333
  .custom-radio:hover {
334
  border-color: #388E3C;
335
  }
336
+ /* Custom Toggle Switch Styling */
337
+ .custom-toggle {
338
+ -webkit-appearance: none;
339
+ -moz-appearance: none;
340
+ appearance: none;
341
+ position: relative;
342
+ width: 60px;
343
+ height: 34px;
344
+ background: #ccc;
345
+ border-radius: 50px;
346
+ cursor: pointer;
347
+ transition: background 0.3s;
348
+ }
349
+
350
+ .custom-toggle:checked {
351
+ background: #4caf50;
352
+ }
353
+
354
+ .custom-toggle:before {
355
+ content: "";
356
+ position: absolute;
357
+ top: 4px;
358
+ left: 4px;
359
+ width: 26px;
360
+ height: 26px;
361
+ background: white;
362
+ border-radius: 50%;
363
+ transition: transform 0.3s;
364
+ }
365
+
366
+ .custom-toggle:checked:before {
367
+ transform: translateX(26px);
368
+ }
369
+
370
  /* Optional: Style the labels */
371
  .form-check-label {
372
  font-size: 16px;
 
455
  <label class="form-label fw-bold">Select a Category:</label>
456
  <div class="form-check form-check-inline">
457
  {% for category in categories %}
458
+ <!-- Toggle switch instead of radio button -->
459
+ <input type="radio" id="category-{{ category }}" name="category" value="{{ category }}"
460
+ class="custom-toggle"
461
  {% if selected_category == category %}checked{% endif %} onchange="this.form.submit()">
462
  <label class="form-check-label" for="category-{{ category }}">{{ category }}</label>
463
  {% endfor %}
464
+ </div>
465
+
466
+ <!-- Customized Dish toggle (styled like a switch) -->
467
+ <div class="form-check form-check-inline">
468
+ <input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish"
469
+ class="custom-toggle"
470
  {% if selected_category == "Customized Dish" %}checked{% endif %} onchange="this.form.submit()">
471
  <label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
472
  </div>
473
  </form>
474
+
475
 
476
  <!-- Show menu items only when Customized Dish is not selected -->
477
  <div class="container mt-4">