-
Notifications
You must be signed in to change notification settings - Fork 0
/
purplecane.js
321 lines (251 loc) · 9.51 KB
/
purplecane.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
let Data=[
{
image:'https://www.kindmeal.my/photos/item/0/126-6630-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"BRAISED LIONS MANE MUSHROOM WITH SWEET & SOUR PASSION FRUIT SAUCE"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6631-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"HANDMADE NOODEL WITH MINCED MUSHROOM"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6536-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Handmade Noodle Soup With Mixed Vegetables 烏龍蔬食茶湯麺"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6634-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"HEALTHY HERBAL ASSORTED MUSHROOM"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6553-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Long Jing Green Tea Rice 普洱糙米飯"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6537-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Long Jing Lei Cha Rice 雨過天青套餐(龍井擂 茶飯)"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6633-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"MINI VEGETABLE HOT SPOT"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6632-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"STIR FRIED 4 SEASON VEGETABLE WITH MINCED PICKLES."
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6629-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"STIR FRIED KING TRUMPET MUSHROOM WITH BASIL"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6534-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Vegetable Hot Pot With Dong Ding Oolong Tea Soup 乌龙蔬食茶汤煲"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6531-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Braised Assorted Vegetable With Lotus (Shui Xian) 水仙六根素净菓"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6532-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Homemade Braised Beancurd In Pumpkin Tea Sauce 龍井南瓜燴豆腐"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6533-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Mixed Vegetable Curry Pot 荔红咖喱蔬菜煲"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6551-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Sautéed Macadamia Nut With Celery And Tie Guan Yin Tea 鐵觀音夏果伴芹香"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6539-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Sautéed Macadamia Nut With Celery And Tie Guan Yin Tea 鐵觀音夏果伴芹香"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6535-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Stir Fried Abalone Mushroom With Dry Chili And Tea 宮保鮑魚菇"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6550-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Stir Fried Green Bean With Minced Pickles And Tea 菜蒲桂豆苗"
},
{
image:'https://www.kindmeal.my/photos/item/0/126-6552-m.jpg',
Name:"Purple Cane Tea Cuisine",
Address:"Kuala Lumpur, Wilayah Persekutuan",
Details:"Stir Fried Lotus Root And Water Chestnut With 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="purplecane.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="Purple Cane (Shaw Parade)"
name.style.fontWeight="400"
let address=document.createElement('h4')
address.innerText="Lot GL-02, Ground Floor, Shaw Parade, Changkat Thambi Dollah, 55100 Kuala Lumpur, Wilayah Persekutuan, Malaysia"
address.style.marginTop="-20px"
address.style.fontWeight="400"
let phone=document.createElement('h4')
phone.innerText="+603-2145 3090"
phone.style.marginTop="-20px"
phone.style.fontWeight="400"
let hours=document.createElement('h4')
hours.innerText="Daily: 10am - 10pm"
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=Purple%20Cane&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://maps.google.com/?q=Purple+Cane+Tea+Cuisine+%E7%B4%AB%E8%97%A4%E8%8C%B6%E5%8E%9F@3.1398398631077170,101.7122398316860200"
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"
}