-
Notifications
You must be signed in to change notification settings - Fork 1
/
Aenon.js
322 lines (251 loc) · 8.93 KB
/
Aenon.js
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
let Data=[
{
image:'https://www.kindmeal.my/photos/item/0/362-3914-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Alfalfa Salad Inari"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3912-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Quinoa-Brown Rice Kimbap"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3913-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Quinoa-Brown Rice Tuna Inari"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3911-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Quinoa-Brown Rice Tuna Kimbap"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3915-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Steam Wholemeal Dumpling"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-4148-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Seaweed Fish Brown Rice Porridge"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-4147-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Seaweed Tomato Mee Hoon"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-4145-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"AENON Assam Laksa"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3924-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"AENON Veggie Wrap"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-4144-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Almond Buckwheat Soba"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-4143-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Healthy Steamboat"
},
{
image:'https://www.kindmeal.my/photos/item/0/335-4327-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Roasted Chicken Rice "
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3921-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Red Bean Soup "
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3925-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Banana Almond Frappe "
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3908-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Bean Curd Barley Soup "
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3928-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Misai Kucing Tea "
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3927-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Flower Tea"
},
{
image:'https://www.kindmeal.my/photos/item/0/362-3929-m.jpg',
Name:"AENON The Health Kitchen",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Red Jujube Longan Wolfberry Tea"
}
]
let mai= document.getElementById("mai")
let func=()=>{
mai.innerText="No deals available at the moment."
mai.style.width='20%';
mai.style.margin="auto";
mai.style.display="block"
mai.style.marginBottom='80px'
let ov= document.getElementById("ov")
ov.style.borderBottom= "0px solid rgb(181, 177, 177)"
let md=document.getElementById("md")
md.style.borderBottom= "2px solid #04be5a"
md.style.paddingBottom= "5px"
let fm= document.getElementById("fm")
fm.style.borderBottom= "0px"
let lc= document.getElementById("lct")
lct.style.borderBottom= "0px"
}
function func0(){
window.location.href="Aenon.html"
}
function func1(){
let fm=document.getElementById("fm")
fm.style.borderBottom= "2px solid #04be5a"
fm.style.paddingBottom= "5px"
let md=document.getElementById("md")
md.style.borderBottom= "0px"
let lct= document.getElementById("lct")
lct.style.borderBottom= "0px"
let ov= document.getElementById("ov")
ov.style.borderBottom= "0px solid rgb(181, 177, 177)"
let cont=document.getElementById("cont2")
display(Data)
function display(Data){
mai.innerHTML=null
Data.map(function(ele){
let div = document.createElement("div");
div.style.boxShadow = "rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px";
let image = document.createElement("img");
image.src=ele.image
image.style.width="100%"
image.style.borderRadius="10px 10px 0 0"
image.addEventListener("click",function(){
togglePopup()
dis(ele)
di()
})
let details=document.createElement('h4')
details.style.fontWeight="500"
details.style.paddingLeft="10px"
details.style.paddingRight="10px"
details.innerText=ele.Details
if(ele.Details==undefined){
details.innerText=null
details.style.display="none"
}
let address=document.createElement('h5')
address.innerText=ele.Address
address.style.fontWeight="400"
address.style.color="grey"
address.style.paddingLeft="10px"
address.style.marginTop='-20px';
let name=document.createElement('h4')
name.innerText=ele.Name
name.style.marginLeft='10px';
name.style.fontWeight="400";
div.append(image,details,name,address)
mai.append(div);
})
}
mai.style.display="grid"
mai.style.gridTemplateColumns="repeat(3,1fr)"
mai.style.rowGap="40px"
mai.style.columnGap="40px"
mai.style.width="68%"
mai.style.margin="auto"
}
function func2(){
let ov= document.getElementById("ov")
ov.style.borderBottom= "0px"
let md=document.getElementById("md")
md.style.borderBottom= "0px"
let fm= document.getElementById("fm")
fm.style.borderBottom= "0px"
let lct= document.getElementById("lct")
lct.style.paddingBottom= "5px"
lct.style.borderBottom= "2px solid #04be5a"
mai.innerHTML=null
let div2 = document.createElement("div");
let name = document.createElement("h2");
name.innerText="AENON The Health Kitchen"
name.style.fontWeight="400"
let address=document.createElement('h4')
address.innerText="1, Jalan 4/93, Taman Miharja, Jalan Cheras, 55200 Kuala Lumpur, Wilayah Persekutuan, Malaysia"
address.style.marginTop="-20px"
address.style.fontWeight="400"
let phone=document.createElement('h4')
phone.innerText="03 - 9201 0972"
phone.style.marginTop="-20px"
phone.style.fontWeight="400"
let hours=document.createElement('h4')
hours.innerText="Sun - Thu: 11am - 3pm & 6pm - 9pm; Fri - Sat: Closed"
hours.style.marginTop="-20px"
hours.style.fontWeight="400"
let iframe= document.createElement("iframe");
iframe.id="frame"
iframe.style.height="395px"
iframe.style.width="450px"
iframe.src="https://maps.google.com/maps?q=AENON%20The%20Health%20Kitchen&t=&z=13&ie=UTF8&iwloc=&output=embed";
let add=document.createElement("h3")
add.innerText="Address"
add.style.fontWeight="400"
let ph=document.createElement("h3")
ph.innerText="Phone"
ph.style.fontWeight="400"
let oh=document.createElement("h3")
oh.innerText="Opening Hours"
oh.style.fontWeight="400"
let div1=document.createElement("div")
let a=document.createElement("a")
a.innerText="View Full Location Map »"
a.href="https://www.google.com/maps?ll=3.122992,101.721118&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=436133840961807936"
a.style.textDecoration="none"
a.style.color="blue"
let div=document.createElement("div")
div.style.display="flex"
div.style.boxShadow="rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px";
div.style.paddingLeft="20px"
div.style.height="400px"
div1.append(iframe)
div2.append(name,add,address,oh,hours,ph,phone,a,div1)
div.append(div2,div1)
mai.append(div);
mai.style.width='70%';
mai.style.margin="auto";
mai.style.marginTop="-80px"
mai.style.marginBottom="80px"
mai.style.display="grid"
mai.style.gridTemplateColumns="repeat(1,1fr)"
mai.style.rowGap="0px"
mai.style.columnGap="0px"
}