-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
251 lines (220 loc) · 13 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Mahavir Kirana, Ghoti">
<meta name="keywords" content="HTML, CSS, JQuey, Bootstrap">
<meta name="author" content="Yash Kumat">
<link rel="icon" href="kirana.png">
<meta property="og:url" content="https://yashkumat.github.io/MahavirKirana/" />
<meta property="og:image" content="https://3.imimg.com/data3/FK/BD/MY-8614816/kirana-bags-250x250-250x250.jpg">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1024">
<meta property="og:image:height" content="1024">
<style>
.body{
margin: 0;
padding: 0;
}
.whatsapp-ico{
fill: white;
width: 40px;
height: 40px;
padding: 3px;
background-color: #4dc247;
border-radius: 50%;
position: fixed;
bottom: 20px;
right : 20px;
z-index: 10;
}
.underline{
display: block;
width: 25% !important;
height: 5px;
border-radius: 2.5px;
background-color: #5bccf6;
margin: auto;
}
.yellow{
color: #fcde67;
}
.blue{
color: #5bccf6;
}
.black{
color: #030e12;
}
.yellow-bg{
background-color: #fcde67;
}
.blue-bg{
background-color: #5bccf6;
}
</style>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2-bootstrap-theme/0.1.0-beta.10/select2-bootstrap.min.css" integrity="sha512-kq3FES+RuuGoBW3a9R2ELYKRywUEQv0wvPTItv3DSGqjpbNtGWVdvT8qwdKkqvPzT93jp8tSF4+oN4IeTEIlQA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Mahavir Kirana, Ghoti</title>
</head>
<body class="yellow-bg">
<div class="row text-center">
<div id="google_translate_element"></div>
</div>
<div class="row">
<div class="col-12 d-flex justify-content-between px-lg-5 px-sm-2 py-1">
<a href="tel:8888119713" class="black text-decoration-none"><b>Suyash Kumat</b> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-phone"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg></a>
<a href="tel:9822119713" class="black text-decoration-none"><b>Sanjay Kumat</b> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-phone"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg></a>
</div>
</div>
<div class="row m-3">
<div class="col-12 text-center display-3 fw-600">
Mahavir Kirana
</div>
<div class="underline"></div>
</div>
<div class="mobile-slider d-sm-block d-md-none">
<div id="carouselExampleSlidesOnly" class="carousel slide" data-bs-ride="carousel" data-bs-interval="3000">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="spices.jpg" class="" height="275" alt="...">
</div>
<div class="carousel-item">
<img src="pulses.jpg" class="" height="275" alt="...">
</div>
<div class="carousel-item">
<img src="dryfruits.jpg" class="" height="275" alt="...">
</div>
<div class="carousel-item">
<img src="daily_essentails.jpg" class="" height="275" alt="...">
</div>
</div>
</div>
</div>
<div class="container">
<div class="row pt-3 pb-2 rounded-2">
<div class="col-sm-12">
<div class="h5">Add Items</div>
</div>
<div class="col-sm-6">
<label for="item"><b>Item</b></label>
<select class="form-control form-control-sm" id="item" name="item">
</select>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-4">
<label for="quantity"><b>Quantity</b></label>
<input type="text" class="form-control" name="quantity" id="quantity" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required>
</div>
<div class="col-6">
<label for="measure"><b>Measure</b></label>
<select class="form-control form-control-sm" id="measure" name="measure">
</select>
</div>
<div class="col-2 d-flex align-items-end p-1">
<button onclick="addItemToCart()" class="btn btn-sm" style="background-color: #5bccf6;"><i class="fa fa-plus"></i></button>
</div>
</div>
</div>
</div>
<hr style="color: #5bccf6;">
<div class="row mt-3">
<div class="col-12">
<div class="h5">
List
</div>
</div>
<div class="col-12">
<table class="table table-bordered table-striped table-hover" style="border: #5bccf6;background-color:white;" width="100">
<thead>
<tr>
<th scope="col" width="45%">Item</th>
<th scope="col" width="45%">Quantity</th>
<th scope="col" width="10%">Delete</th>
</tr>
</thead>
<tbody id="item_body">
<input type="hidden" name="item_flag" id="item_flag" value="0">
</tbody>
</table>
<div class="btn text-wrap" onclick="whatsappOrder()" id="whatsappOrderButton" style="display: none; background-color: #5bccf6;">WhatsApp Order</div>
</div>
</div>
</div>
<a class="mb-4" href="https://wa.me/+918888119713/"><svg viewBox="0 0 32 32" class="whatsapp-ico"><path d=" M19.11 17.205c-.372 0-1.088 1.39-1.518 1.39a.63.63 0 0 1-.315-.1c-.802-.402-1.504-.817-2.163-1.447-.545-.516-1.146-1.29-1.46-1.963a.426.426 0 0 1-.073-.215c0-.33.99-.945.99-1.49 0-.143-.73-2.09-.832-2.335-.143-.372-.214-.487-.6-.487-.187 0-.36-.043-.53-.043-.302 0-.53.115-.746.315-.688.645-1.032 1.318-1.06 2.264v.114c-.015.99.472 1.977 1.017 2.78 1.23 1.82 2.506 3.41 4.554 4.34.616.287 2.035.888 2.722.888.817 0 2.15-.515 2.478-1.318.13-.33.244-.73.244-1.088 0-.058 0-.144-.03-.215-.1-.172-2.434-1.39-2.678-1.39zm-2.908 7.593c-1.747 0-3.48-.53-4.942-1.49L7.793 24.41l1.132-3.337a8.955 8.955 0 0 1-1.72-5.272c0-4.955 4.04-8.995 8.997-8.995S25.2 10.845 25.2 15.8c0 4.958-4.04 8.998-8.998 8.998zm0-19.798c-5.96 0-10.8 4.842-10.8 10.8 0 1.964.53 3.898 1.546 5.574L5 27.176l5.974-1.92a10.807 10.807 0 0 0 16.03-9.455c0-5.958-4.842-10.8-10.802-10.8z" fill-rule="evenodd"></path></svg></a>
<center><small class="my-4">Made with <span class="text-danger">♥</span> by <a href="mailto:[email protected]">Yash Kumat</a></small></center>
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
<script>
$(document).ready(function() {
$('#item').select2({
theme: "bootstrap"
});
$('#measure').select2({
theme: "bootstrap"
});
});
var message = "";
var items = [['Kanda-lasun Masala', 2], ['Lavang',3], ['Elichi',3], ['Chawli',2], ['Kaboli chana',2], ['Wheat',1], ['Tea',2], ['Coffee',2], ['Papad',4], ['Maggi',4], ['Bournvita',5], ['Khajur',2], ['Moong Dal',1], ['Tur Dal',1], ['Shabudana',1], ['Shengdana',1], ['Sugar',1], ['Rava',1], ['Bhagar',1], ['Masoor Dal',1], ['Moong Dal',1], ['Chana Dal',1], ['Vatana Dal',1], ['Moong',1], ['Mooth',1], ['Masoor',1], ['Chana',1], ['Vatana',1], ['Sawstik Poha',4], ['Poha',1], ['Parachute',5], ['Agarbatti',4], ['Shengdana Oil',6], ['Soyabeen Oil',6], ['Sunflower Oil',6], ['Fair n Lovely',4], ['Jeera',2], ['Mohari',2], ['Haldi',2], ['Mirchi',2], ['Wheel',4], ['Geeta',7], ['Gopi',7], ['Harpic',5], ['Lizol',5], ['Dove',4], ['Clinic Plus',5], ['Kopra',1], ['Kharik',2], ['Badam',2], ['Kaju',2], ['Kismish',2], ['Rice',1], ['Bajra',1], ['Wheat',1] ];
var measures = ['Kilogram', 'Gram', 'Tola', 'Packet', 'Bottle', 'liter', 'Box'];
measure = document.getElementById('measure');
item = document.getElementById('item');
items = items.sort();
for (var i = 0; i<items.length; i++){
var opt = document.createElement('option');
opt.value = i;
opt.innerHTML = items[i][0];
item.appendChild(opt);
}
for (var i = 0; i<measures.length; i++){
var opt = document.createElement('option');
opt.value = i;
opt.innerHTML = measures[i];
measure.appendChild(opt);
}
function addItemToCart(){
var item = document.getElementById('item').value;
var measure = $('#measure').val();
var quantity = $('#quantity').val();
if(quantity == ""){
alert("Quantity is empty");
return false;
}
var item_flag = $("#item_flag").val();
item_flag = parseInt(item_flag) + parseInt(1);
if(item_flag > 0){
$('#whatsappOrderButton').css('display','block');
}
$("#item_flag").val(item_flag);
var tr = '<tr id="item'+ item_flag +'"><td>'+items[item][0]+'</td><td>'+quantity+" "+measures[measure]+"</td><td><button onclick='deleteItemRow("+item_flag+")' class='btn btn-sm' style='background-color: #5bccf6;'><svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-trash-2'><polyline points='3 6 5 6 21 6'></polyline><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'></path><line x1='10' y1='11' x2='10' y2='17'></line><line x1='14' y1='11' x2='14' y2='17'></line></svg></button></td></tr>";
$('#item_body').append(tr);
$('#quantity').val('');
}
function deleteItemRow(div_id){
$('#item'+div_id).remove();
}
function whatsappOrder(){
var item_flag = $('#item_flag').val();
$("table > tbody > tr").each(function () {
message += ($(this).find('td').eq(0).text() + " " + $(this).find('td').eq(1).text()) + '%0A';
});
window.location = "https://wa.me/+918888119713/?text="+message;
}
$('#item').on('change', function() {
var measure_id = items[this.value][1] - 1;
$('#measure option[value='+measure_id+']').prop('selected', 'selected').change();
});
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{pageLanguage: 'en'},
'google_translate_element'
);
}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>
</html>