-
Notifications
You must be signed in to change notification settings - Fork 1
/
directory.js
319 lines (250 loc) · 12.4 KB
/
directory.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
let Data=[
{
Name: "AENON The Health Kitchen",
Details:"AENON Health Kitchen, a hygienic restaurant that provides simple, palatable, wholesome & healthy food at affordable prices. We are dedicated in offering an extraordinary dining experience and providing consumers the opportunity to learn on healthy lifestyle. Health is a choice, not a chance! 爱能健康厨房是一间讲究卫生的餐馆,以实惠的价格提供顾客简单、美味以及全面的营养食物。 务必让顾客体验别开生面的用餐享受,并给与顾客们有机会去学习健康生活。 健康是一种选择,不是机遇!",
Address:"1, Jalan 4/93, Taman Miharja, Jalan Cheras, 55200 Kuala Lumpur, Wilayah Persekutuan",
Phone:"03 - 9201 0972",
Place:"Kuala Lumpur",
Openinghours:"Sun - Thu: 11am - 3pm & 6pm - 9pm; Fri - Sat: Closed",
iframe:"https://maps.google.com/maps?q=AENON%20The%20Health%20Kitchen&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:"https://www.google.com/maps/place/NEWSTART+Health+Kitchen/@3.122992,101.721118,13z/data=!4m5!3m4!1s0x0:0x60d756ae90e2640!8m2!3d3.1229922!4d101.7211181?hl=en-US"
},
{
Name: "Alam N-Ion",
Details:"We serve delicious home-cooked vegetarian meals, crafted with the healthiest ingredients and plenty of love. We also sell natural, handmade clay and wooden Buddhist crafts, health supplements, and homemade beauty products.",
Address:"15, Jalan 12/144A, Taman Bukit Cheras , 56000 Kuala Lumpur, Wilayah Persekutuan",
Phone:"019-275 9973",
Place:"Kuala Lumpur",
Openinghours:"Fri - Wed: 9am - 4pm; Thu: Closed",
iframe:"https://maps.google.com/maps?q=Alam%20N-Ion&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:"https://www.google.com/maps?ll=3.070303,101.748772&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=13763812646354419310"
},
{
Name: "Annalakshmi Vegetarian Restaurant",
Address:"114-116, Jalan Berhala, Brickfields, Kuala Lumpur, 50470, Wilayah Persekutuan",
Phone:"03-22723799, 03-22843799",
Openinghours:"Tue-Sun 11am-3pm, 6:30-10pm.",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=114-116,%20Jalan%20Berhala,%20Brickfields,%20Kuala%20Lumpur,%2050470,%20Wilayah%20Persekutuan&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:"https://maps.google.com/maps?ll=3.127736,101.687725&z=13&t=m&hl=en-US&gl=US&mapclient=embed&q=114-116%2C%20Jalan%20Berhala%2C%20Brickfields%2C%20Kuala%20Lumpur%2C%2050470%2C%20Wilayah%20Persekutuan"
},
{
Name: "Ba Xian Vegetarian Court",
Address:"12,14,14-1, Persiaran Mergatua, Kepong Baru, Kuala Lumpur, 52100, Wilayah Persekutuan",
Phone:"03-62778052",
Openinghours:"Daily 10am-10pm.",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=Ba%20Xian%20Vegetarian%20Court&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:"https://maps.google.com/maps?ll=3.207832,101.64&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=15009245907692054618"
},
{
Name: "Bakti Woodlands Vegetarian Food Cafe",
Details:"We serve delicious home-cooked vegetarian meals, crafted with the healthiest ingredients and plenty of love. We also sell natural, handmade clay and wooden Buddhist crafts, health supplements, and homemade beauty products.",
Address:"55 Leboh Ampang (at near Masjid Jamek LRT station), Kuala Lumpur, 50100, Wilayah Persekutuan",
Phone:"03-20342399",
Openinghours:"Mon-Sun 7:30am-9:30pm",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=Bakti%20Woodlands%20Vegetarian%20Food%20Cafe&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:'https://www.google.com/maps?ll=3.148978,101.697389&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=15985928874165623125'
},
{
Name: "Berjaya Cafe",
Details:"Berjaya Cafe, the epitome for the vegetarian lovers that brings the opulence, style, and is entwined with the gastronomic taste from the best chef’s in town. With the current trend of lifestyle that focuses not only on health and well-being, our Berjaya Cafe brings you the ambiance of a contemporary dining restaurant overlooking the skyline and magnificent city view of Kuala Lumpur. We also took measures to serve our guests with an edible selection of freshly picked ingredients. Choose from our variety spread of vegetarian cuisine, we can assure our guests will savour only the best in vegetarian gastronomic experience",
Address:"Level 14 West, Berjaya Times Square Hotel, No. 1, Jalan Imbi, Bukit Bintang, 55100 Kuala Lumpur, Wilayah Persekutuan",
Phone:"03-21178000",
Openinghours:"Daily: 6:30am - 9:00pm",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=Berjaya%20Cafe&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:'https://www.google.com/maps/place/Berjaya+Cafe+(Vegetarian+buffet)/@3.14185,101.709883,13z/data=!4m5!3m4!1s0x0:0x8399954bb0afc71d!8m2!3d3.1418504!4d101.7098827?hl=en-US'
},
{
Name: "Beyond Veggie - Nexus South Branch",
Details:"A refreshing Meatless Dining Concept from Secret Recipe Cakes & Café Group. Extensive Menu range inspired by all fresh and natural products with a selection of natural products and ingredients with no colouring or preservatives, no MSG, just healthy and delicious choices! Beyond Veggie by Secret Recipe was shortlisted Best Healthy Eats in the Time Out KL Food Awards 2013 and 2014.",
Address:"Unit G-8, Ground Floor, Nexus, No. 7, Jalan Kerinchi, 59200 Kuala Lumpur, Wilayah Persekutuan",
Phone:"+603-2242 1473",
Openinghours:"Mon-Sun, 10am-10pm",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=Beyond%20Veggie%20-%20Nexus%20South%20Branch&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:'https://www.google.com/maps?ll=3.10968,101.665381&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=15694143907822039583'
},
{
Name: "Beyond Veggie - TTDI Branch",
Details:"A refreshing Meatless Dining Concept from Secret Recipe Cakes & Café Group. Extensive Menu range inspired by all fresh and natural products with a selection of natural products and ingredients with no colouring or preservatives, no MSG, just healthy and delicious choices! Beyond Veggie by Secret Recipe was shortlisted Best Healthy Eats in the Time Out KL Food Awards 2013 and 2014.",
Address:"Lot 54, Ground Floor, Jalan Tun Mohd. Fuad 1, Taman Tun Dr Ismail, 600000 Kuala Lumpur, Wilayah Persekutuan",
Phone:"+603-7722 1142",
Openinghours:"Mon-Sun, 10am-10pm",
Place:"Kuala Lumpur",
iframe:"https://maps.google.com/maps?q=Beyond%20Veggie&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:'https://maps.google.com/maps?ll=5.323137,100.281916&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=10840763283693185226'
},
{
Name: "Biogreen Kepong Bukit Maluri",
Address:"No. 9 Jalan Burung Tiung, Taman Bukit Maluri, 52100 Kepong, Wilayah Persekutuan",
Phone:"03-6270 1284",
Openinghours:"Mon-Sat: 10am - 7.30pm",
Place:"Selangor",
iframe:"https://maps.google.com/maps?q=Biogreen%20Kepong%20Bukit%20Maluri&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:"https://www.google.com/maps?ll=3.213133,101.642308&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=2208954499060531361"
},
{
Name: "Blue Boy Vegetarian Food Centre",
Address:"6001 Blue Boy Mansion, Jalan Tong Shin (at Jalan Pudu Lama), Kuala Lumpur, 55100, Wilayah Persekutuan",
Phone:"03-21449011",
Openinghours:"Mon-Sun 8:00am-6:00pm",
Place:"Selangor",
iframe:"https://maps.google.com/maps?q=Blue%20Boy%20Vegetarian%20Food%20Centre&t=&z=13&ie=UTF8&iwloc=&output=embed",
link:'https://www.google.com/maps?ll=3.144797,101.70617&z=13&t=m&hl=en-US&gl=US&mapclient=embed&cid=5774480725711790334'
}
]
let results=110;
let per_page=10;
let showButns=(results,per_page)=>{
let buttons_div=document.getElementById("buttonss")
let buttons=Math.ceil(results/per_page)
for(let i=1;i<buttons;i++){
let button=document.createElement("button")
button.innerText=i;
button.style.backgroundColor="transparent"
button.style.border="0px"
button.style.color="#057ff1"
button.onclick=function(){
pagination(i);
}
buttons_div.append(button)
}
}
showButns(results,per_page)
// let pagination=(page_no)=>{
// }
let showButns1=(results,per_page)=>{
let buttons_div=document.getElementById("buttonss1")
let buttons=Math.ceil(results/per_page)
for(let i=1;i<buttons;i++){
let button=document.createElement("button")
button.innerText=i;
button.style.backgroundColor="transparent"
button.style.border="0px"
button.style.color="#057ff1"
button.onclick=function(){
pagination(i);
}
buttons_div.append(button)
}
}
showButns1(results,per_page)
let arr=JSON.parse(localStorage.getItem("dats"))||[]
let cont=document.getElementById("cont")
display(Data)
function display(Data){
document.getElementById("cont").innerHTML=null
Data.map(function(ele){
let div = document.createElement("div");
div.id="div"
let name = document.createElement("h2");
name.innerText=ele.Name
name.id="name"
name.addEventListener("click",function(){
displayed(ele)
})
name.style.cursor="pointer"
let details=document.createElement('h4')
details.innerText=ele.Details
if(ele.Details==undefined){
details.innerText=null
details.style.display="none"
}
details.id="details"
let address=document.createElement('h4')
address.innerText=ele.Address
address.id="address"
let phone=document.createElement('h4')
phone.innerText=ele.Phone
phone.id="phone"
let hours=document.createElement('h4')
hours.innerText=ele.Openinghours
hours.id="hours"
let iframe= document.createElement("iframe");
iframe.id="frame"
iframe.src=ele.iframe;
let add=document.createElement("h3")
add.innerText="Address"
add.id="add"
let ph=document.createElement("h3")
ph.innerText="Phone"
ph.id="ph"
let oh=document.createElement("h3")
oh.innerText="Opening Hours"
oh.id="oh"
let div1=document.createElement("div")
div1.id="div1"
let visit=document.createElement("a")
visit.innerText="Visit Website"
visit.href='Aenon.html'
visit.id="visit"
let directions =document.createElement("a")
directions.innerText="Get Directions"
directions.href=ele.link
directions.id="directions"
let nearby=document.createElement("a")
nearby.innerText="Nearby Shops"
nearby.href="nearshops.html"
nearby.id="nearby"
div1.append(visit,directions,nearby)
div.append(name,details,add,address,ph,phone,oh,hours,iframe,div1)
document.getElementById("cont").append(div);
})
}
function displayed(ele){
localStorage.setItem("dats",JSON.stringify(ele))
window.location.href="nearshops.html"
}
let func1=()=>{
let Datas = Data;
let value = document.getElementById("select").value
if(value == "All"){
display(Data)
return
}
let fData = Datas.filter((ele)=>{
return ele.Place == value
})
display(fData)
}
function func(){
let buttons_div1=document.getElementById("buttonss")
let buttons_div2=document.getElementById("buttonss1")
let value = document.getElementById("search").value;
let cont=document.getElementById("cont")
let Data1 = Data;
if(value == ""){
display(Data)
return
}
let New_Data = Data1.filter((ele)=>{
return ele.Name == value
})
buttons_div1.style.display="none";
buttons_div2.style.display="none";
cont.style.marginTop="50px"
display(New_Data)
}
let tab1=document.getElementById("tab1");
tab1.addEventListener("click",show);
function show(){
window.location.href="directory.html"
}
let tab2=document.getElementById("tab2");
tab2.addEventListener("click",show1);
function show1(){
window.location.href="Featured Restaurants.html"
}
let tab3=document.getElementById("tab3");
tab3.addEventListener("click",show2);
function show2(){
window.location.href="Food Menu.html"
}
let tab4=document.getElementById("tab4");
tab4.addEventListener("click",show3);
function show3(){
window.location.href="Food Map.html"
}