-
Notifications
You must be signed in to change notification settings - Fork 0
/
store.js
127 lines (94 loc) · 3.75 KB
/
store.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
document.getElementsByClassName("one")[0].addEventListener("click",gaurgaon)
document.getElementsByClassName("one")[1].addEventListener("click",newdelhi1)
document.getElementsByClassName("one")[2].addEventListener("click",noida1)
document.getElementsByClassName("one")[3].addEventListener("click",chandigarh1)
let parent=document.getElementById("badlav")
gaurgaon()
function gaurgaon(){
parent.innerHTML=gaurgaon1();}
function newdelhi1(){
parent.innerHTML=newdelhi();}
function noida1(){
parent.innerHTML=noida();}
function chandigarh1(){
parent.innerHTML=chandigarh();}
function gaurgaon1(){
return `
<div>
<img src="https://mamaearth.in/static/MapIcons/location.svg" alt="">
<h3>Shop Number B-8, Ground Floor, Ardee Mall Sec-52, Gurgaon, Haryana, 122011</h3>
<img src=" https://mamaearth.in/static/MapIcons/timeWatch.svg" alt="">
<h3>11:00 AM - 11:00 PM</h3>
<img src=" https://mamaearth.in/static/MapIcons/call.svg" alt="">
<h3>0124-448-8102</h3>
<img src="https://mamaearth.in/static/MapIcons/email.svg" alt="">
<h3>ggn.ardee@mamaearth.in</h3>
</div>
`
}
function newdelhi(){
return`
<div>
<img src="https://mamaearth.in/static/MapIcons/location.svg" alt="">
<h3>Shop No -3, 15, U.B Bunglow Road, Jawahar Nagar, New Delhi, Delhi, 110007</h3>
<img src=" https://mamaearth.in/static/MapIcons/call.svg" alt="">
<h3>011-4106-3565</h3>
<img src="https://mamaearth.in/static/MapIcons/email.svg" alt="">
<h3>del.kamlanagar1@mamaearth.in</h3>
</div>`
}
function noida(){
return `
<div>
<img src="https://mamaearth.in/static/MapIcons/location.svg" alt="">
<h3>Unit No - 3K7A, Second Floor, Noida, Uttar Pradesh, 201304</h3>
<h3>11:00 AM - 12:00 AM</h3>
<img src="https://mamaearth.in/static/MapIcons/email.svg" alt="">
<h3>noida.moi@mamaearth.in</h3>
</div> `
}
function chandigarh(){
return ` <div>
<img src="https://mamaearth.in/static/MapIcons/location.svg" alt="">
<h3>Unit No -KS2A, Second Floor, Plot No.178-178A, Industrial & Business Park, Phase-I, Chandigarh, Punjab, 160002</h3>
<img src="https://mamaearth.in/static/MapIcons/email.svg" alt="">
<h3>chd.elante@mamaearth.in</h3>
</div>`
}
// let key="5697d8eb3f7d877be3e26fc91dfe841f";
let iframe=document.getElementById("gmap_canvas")
// async function (){
// try{
// let info=document.getElementById("one").value
// let res=await fetch(`https://api.openweathermap.org/data/2.5/weather?q=${info}&appid=${key}`);
// let data=await res.json()
// // console.log(data)
// // console.log("data:",data)
// }
// catch(err){
// console.log("err:",err)
// }
// }
// let key="5697d8eb3f7d877be3e26fc91dfe841f";
// let iframe=document.getElementById("gmap_canvas")
// async function getweather(){
// try{
// let city=document.getElementById("one").value
// let res=await fetch(`https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${key}`);
// let data=await res.json()
// merge(data)
// // console.log("data:",data)
// }
// catch(err){
// console.log("err:",err)
// }
// }
// function merge(data){
// console.log("data:",data)
// // cont.innerHTML=null
// let name=document.createElement("p")
// name.innerText=data.name
let d=document.querySelectorAll("one")
for(var i=0;i<d.length;i++){
}
iframe.src=`https://maps.google.com/maps?q=${d[i]}}&t=&z=13&ie=UTF8&iwloc=&output=embed`