DSatishchandra commited on
Commit
82770c8
·
verified ·
1 Parent(s): 97c9072

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +58 -56
templates/menu.html CHANGED
@@ -313,68 +313,69 @@ form.text-center.mb-4 {
313
  font-size: 16px;
314
  margin-left: 8px; /* Space between the radio button and the label */
315
  }
316
- .modal-footer .d-flex {
317
- display: flex; /* Use flexbox */
318
- align-items: center; /* Vertically align the items */
319
- justify-content: flex-start; /* Align at the start */
320
- width: 100%;
321
- padding-left: 0;
322
- }
323
- .modal-footer .form-control {
324
- margin-right: 10px; /* Add a little space between the quantity input and the buttons */
325
- align-items:top;
326
- }
327
  .cart-container {
328
  display: flex;
329
  align-items: center;
330
  gap: 10px;
331
  }
 
 
 
 
 
 
332
 
333
- .quantity-box {
334
  display: flex;
335
  align-items: center;
336
- justify-content: space-between; /* Space between buttons and input */
337
- border: 1px solid #ccc;
338
- border-radius: 20px; /* Rounded corners */
339
- overflow: hidden;
340
- height: 40px;
341
- width: 120px; /* Set width of the entire quantity box */
342
  }
343
 
344
- .quantity-box button {
345
- background: #f0f0f0;
346
- border: none;
347
- padding: 5px 10px;
348
- cursor: pointer;
349
- height: 100%;
350
- font-size: 18px;
351
  }
352
 
353
- .quantity-box input {
354
- width: 40px;
355
- text-align: center;
356
- border: none;
357
- font-size: 18px;
358
- height: 100%;
359
- background-color: #fff;
360
- color: #333;
361
  }
362
- .add-to-cart-btn {
363
- background: green;
364
- color: white;
365
- padding: 10px 15px;
366
- border: none;
367
- border-radius: 5px;
368
- cursor: pointer;
369
- font-size: 16px;
370
- height: 40px;
371
  display: flex;
372
- align-items: center;
373
  justify-content: center;
374
- white-space: nowrap;
375
- margin-left: 10px; /* Space between quantity box and button */
376
- align-self: flex-start; /* Align the button at the top */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  }
 
378
  </style>
379
  </head>
380
  <body>
@@ -469,8 +470,6 @@ form.text-center.mb-4 {
469
  </a>
470
  </div>
471
 
472
-
473
-
474
  <!-- Modal for Item Details -->
475
  <div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
476
  <div class="modal-dialog modal-dialog-centered">
@@ -502,16 +501,19 @@ form.text-center.mb-4 {
502
  <span id="modal-section" data-section="" data-category="" style="display: none;"></span>
503
 
504
  </div>
505
- <div class="modal-footer">
506
- <div class="d-flex align-items-center">
507
- <button type="button" class="btn btn-outline-secondary" id="decreaseQuantity">-</button>
508
- <input type="text" class="form-control text-center" id="quantityInput" value="1" readonly style="width: 50px;"/>
509
- <button type="button" class="btn btn-outline-secondary" id="increaseQuantity">+</button>
 
 
 
 
 
 
510
  </div>
511
 
512
- <div class="modal-footer">
513
- <button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
514
- </div>
515
 
516
  </div>
517
  </div>
 
313
  font-size: 16px;
314
  margin-left: 8px; /* Space between the radio button and the label */
315
  }
316
+
 
 
 
 
 
 
 
 
 
 
317
  .cart-container {
318
  display: flex;
319
  align-items: center;
320
  gap: 10px;
321
  }
322
+ .modal-footer {
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: space-between; /* Space between quantity and Add to Cart button */
326
+ padding: 10px;
327
+ }
328
 
329
+ .modal-footer .d-flex {
330
  display: flex;
331
  align-items: center;
332
+ gap: 10px; /* Space between quantity buttons */
 
 
 
 
 
333
  }
334
 
335
+ .modal-footer .btn {
336
+ height: 40px; /* Set consistent button height */
337
+ padding: 0 15px; /* Adjust padding to fit inside the buttons */
 
 
 
 
338
  }
339
 
340
+ .modal-footer .form-control {
341
+ width: 50px; /* Fixed width for quantity input */
342
+ height: 40px; /* Match the height of buttons */
343
+ text-align: center; /* Center the value inside the input */
 
 
 
 
344
  }
345
+
346
+ .modal-footer .btn-primary {
347
+ background-color: #0FAA39; /* Green background for Add to Cart button */
348
+ border-color: #0FAA39; /* Border color to match button background */
349
+ font-weight: bold; /* Bold text */
350
+ padding: 10px 20px; /* Adjust padding to make the button look better */
351
+ height: 40px; /* Match the height with quantity buttons */
 
 
352
  display: flex;
 
353
  justify-content: center;
354
+ align-items: center;
355
+ width: auto; /* Auto width to adjust to button text */
356
+ }
357
+
358
+ .modal-footer .btn-outline-secondary {
359
+ height: 40px; /* Ensure quantity buttons are the same size */
360
+ width: 40px; /* Make sure the buttons are square */
361
+ }
362
+
363
+ @media (max-width: 576px) {
364
+ /* Responsive adjustments for smaller screens */
365
+ .modal-dialog {
366
+ max-width: 90%; /* Adjust modal width for smaller screens */
367
+ }
368
+
369
+ .modal-footer .btn {
370
+ height: 35px; /* Smaller buttons for small screens */
371
+ }
372
+
373
+ .modal-footer .form-control {
374
+ width: 40px; /* Adjust input size for smaller screens */
375
+ height: 35px;
376
+ }
377
  }
378
+
379
  </style>
380
  </head>
381
  <body>
 
470
  </a>
471
  </div>
472
 
 
 
473
  <!-- Modal for Item Details -->
474
  <div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
475
  <div class="modal-dialog modal-dialog-centered">
 
501
  <span id="modal-section" data-section="" data-category="" style="display: none;"></span>
502
 
503
  </div>
504
+ <!-- Quantity Controls and Add to Cart Button -->
505
+ <div class="modal-footer d-flex align-items-center justify-content-between">
506
+ <!-- Quantity Controls -->
507
+ <div class="d-flex align-items-center gap-2">
508
+ <button type="button" class="btn btn-outline-secondary" id="decreaseQuantity">-</button>
509
+ <input type="text" class="form-control text-center" id="quantityInput" value="1" readonly style="width: 50px;"/>
510
+ <button type="button" class="btn btn-outline-secondary" id="increaseQuantity">+</button>
511
+ </div>
512
+
513
+ <!-- Add to Cart Button -->
514
+ <button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
515
  </div>
516
 
 
 
 
517
 
518
  </div>
519
  </div>