forked from mansiruhil13/Bobble-AI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nearby.html
358 lines (326 loc) · 15.6 KB
/
nearby.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
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="src/css/navbar.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<!-- Added Favicon -->
<link rel="shortcut icon" href="ambulance.png" type="image/x-icon" />
<title>Find Nearby Hospital</title>
<div class="gtranslate_wrapper"></div>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
background-color: #f7f7f7;
}
h1 {
text-align: center;
margin-bottom: 10px;
}
h2 {
text-align: center;
font-size: 18px;
color: #555;
margin-bottom: 30px;
}
.main_container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 20px;
}
.search-container {
text-align: center;
margin-bottom: 20px;
}
.button {
background-color: #259ee9;
border: none;
border-radius: 5px;
color: white;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #00BFFF;
}
#searchInput {
width: 300px;
padding: 10px;
font-size: 16px;
border: 1px solid #ddd;
border-radius: 4px;
}
.hospital-card {
background-color: #e7f3fe;
padding: 10px;
border-radius: 8px;
text-align: center;
transition: transform 0.3s ease, box-shadow 0.3s ease;
font-size: large;
}
.hospital-card:hover {
transform: scale(1.05);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
color: rgb(178, 233, 233);
}
.hospital-card img {
width: 100%;
height: 180px;
object-fit: cover;
border-radius: 8px;
}
.hospital-card a {
display: block;
margin: 10px 0 5px 0;
text-decoration: none;
color: #050505;
font-weight: bold;
font-size: 16px;
}
.hospital-card p {
color: #676262;
}
.dark-mode .logo img {
filter: brightness(10);
/* Inverts the color to make it white */
}
.dark-mode h1,
.dark-mode h2 {
color: #e7f3fe;
}
</style>
</head>
<body>
<!-- pre loader -->
<div id="preloader">
<div class="wrapper">
<div class="box-wrap">
<div class="box one"></div>
<div class="box two"></div>
<div class="box three"></div>
<div class="box four"></div>
<div class="box five"></div>
<div class="box six"></div>
</div>
</div>
</div>
<div class="container" id="container">
<div class="logo">
<div class="brand-name">
<span class="letter red" style="--letter-index: 1;">A</span>
<span class="letter red" style="--letter-index: 2;">m</span>
<span class="letter red" style="--letter-index: 3;">b</span>
<span class="letter red" style="--letter-index: 4;">u</span>
<span class="letter" style="--letter-index: 5;">F</span>
<span class="letter" style="--letter-index: 6;">l</span>
<span class="letter" style="--letter-index: 7;">o</span>
<span class="letter" style="--letter-index: 8;">w</span>
</div>
<img src="images/logo2-w.webp" alt="Ambulance Monitoring System Logo" style="width: 80px; height: auto" />
</div>
<nav class="menu">
<ul>
<li>
<a href="#container" style="color: #333;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.34314 11.5858L12 5.92893M12 5.92893L17.6568 11.5858M12 5.92893V18.0711"
stroke="currentColor">
</path>
</svg>
</a>
</li>
<li>
<a href="index.html" id="home-link" class="menu_links" data-link="Home">
<span>Home</span>
</a>
</li>
<li>
<a href="features.html" id="features-link" class="menu_links" data-link="Features">
<span>Features</span></a>
</li>
<li>
<a href="team.html" id="team-link" class="menu_links" data-link="Team">
<span>Team</span></a>
</li>
<li>
<a href="contact.html" id="contact-link" class="menu_links" data-link="Contact">
<span>Contact</span></a>
</li>
<li>
<a href="Feedback.html" id="feedback-link" class="menu_links" data-link="Feedback">
<span>Feedback</span></a>
</li>
<li>
<a href="nearby.html" id="nearby-link" class="menu_links" data-link="Nearby">
<span>Nearby</span></a>
</li>
</ul>
</nav>
</div>
<a href="chatbot.html">
<div class="fixed bottom-0 right-2 chatbot-container">
<button class="chatbot-button group">
<img class="h-20" src="chatbot.gif" alt="chatbot" />
<span class="tooltip-text">
Welcome to AmbuFlow!<br />
How can I help You?
</span>
</button>
</div>
</a>
<button class="light-dark-btn dark-mode-toggle" id="dark-mode-button">
<i class="fa-solid fa-moon"></i>
</button>
<script>
// Select the button by its ID
const darkModeButton = document.getElementById('dark-mode-button');
// Add an event listener for the 'click' event
darkModeButton.addEventListener('click', () => {
// Toggle the 'dark-mode' class on the body element
document.body.classList.toggle('dark-mode');
// Save the dark mode preference in localStorage
if (document.body.classList.contains('dark-mode')) {
localStorage.setItem('theme', 'dark');
} else {
localStorage.setItem('theme', 'light');
}
});
// Check localStorage for saved theme preference on page load
document.addEventListener('DOMContentLoaded', () => {
if (localStorage.getItem('theme') === 'dark') {
document.body.classList.add('dark-mode');
}
});
</script>
<h1>Find Nearby Hospital</h1>
<h2>Track or call an ambulance and check nearby hospitals for emergency services</h2>
<div class="search-container">
<input type="text" id="searchInput" placeholder="Search hospitals by name or location...">
</div>
<div class="main_container" id="hospitalContainer">
<!-- Hospital cards will be dynamically added here -->
</div>
<script>
// Hospital data
const hospitals = [
{
name: "AIIMS Delhi",
location: "Ansari Nagar, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipP9JGi6pake5Zae72zMqWgYhakGZTnP1KMkEoMI=w408-h306-k-no",
link: "https://www.google.com/maps/place/All+India+Institute+Of+Medical+Sciences+Delhi/@28.5671821,77.2074702,17z/data=!3m1!4b1!4m6!3m5!1s0x390ce26f903969d7:0x8367180c6de2ecc2!8m2!3d28.5671774!4d77.2100451!16s%2Fm%2F0lq5p3v?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Fortis Escorts Heart Institute",
location: "Okhla Road, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipO_LJoTauSAwR0RaSEco9DpYYfVjcBL6oMwZlGM=w480-h240-k-no",
link: "https://www.google.com/maps/place/Fortis+Escorts+Heart+Institute/@28.5605979,77.2714045,17z/data=!3m1!4b1!4m6!3m5!1s0x390ce392b869bbaf:0x865db71ba6f271b2!8m2!3d28.5605932!4d77.2739794!16s%2Fg%2F1tyzxc62?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Max Super Speciality Hospital",
location: "Saket, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipMHbDvRM2SnP15JEFiHHU3BkbeMyILB4Fe_9vb_=w408-h272-k-no",
link: "https://www.google.com/maps/place/Max+Super+Speciality+Hospital,+Saket+(Max+Saket)/@28.5275537,77.2094197,17z/data=!3m1!4b1!4m6!3m5!1s0x390ce1f427d4c5fb:0x582d47bbf4970bc1!8m2!3d28.527549!4d77.2119946!16s%2Fm%2F0nhgv9_?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "BLK Super Speciality Hospital",
location: "Pusa Road, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipOOE3FO4yP5Th80bikVNoZbSmhNUgZz8baujSsJ=w427-h240-k-no",
link: "https://www.google.com/maps/place/BLK-Max+Super+Speciality+Hospital+Delhi/@28.6433081,77.1771302,17z/data=!3m1!4b1!4m6!3m5!1s0x390d029633b6af21:0x9a67323b63bcc188!8m2!3d28.6433034!4d77.1797051!16s%2Fg%2F1tfzvwkd?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Sir Ganga Ram Hospital",
location: "Rajinder Nagar, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipPge4AJnRsJww6qZfswWAL9LBfd1iDCBM-hpCzW=w408-h544-k-no",
link: "https://www.google.com/maps/place/SIR+GANGA+RAM+HOSPITAL,+Sir+Ganga+Ram+Hospital+Marg,+Old+Rajinder+Nagar,+New+Rajinder+Nagar,+Delhi,+110060/@28.6385473,77.1894559,17z/data=!3m1!4b1!4m6!3m5!1s0x390d02a17c4ab835:0xdee61a9d767b964b!8m2!3d28.6384582!4d77.1895559!16s%2Fg%2F11bytpc110?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Apollo Hospitals Delhi",
location: "Karol Bagh, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipNUO3hhiOSgCnWYou3qHm0SQTlKaM0wIfiG_OaU=w408-h270-k-no",
link: "#",
phone: "+911345678901"
},
{
name: "Holy Family Hospital",
location: "Okhla, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipMpQ-20kn_yH0AtOS1fl7o9fhVcdPZIs4ncO5fU=w408-h306-k-no",
link: "https://www.google.com/maps/place/Holy+Family+Hospital/@28.5618161,77.2751113,17z/data=!4m15!1m8!3m7!1s0x390ce3929e6d3319:0xcd2355b56b80d9cf!2sHoly+Family+Hospital!8m2!3d28.5618161!4d77.2751113!10e5!16s%2Fm%2F0n46sgy!3m5!1s0x390ce3929e6d3319:0xcd2355b56b80d9cf!8m2!3d28.5618161!4d77.2751113!16s%2Fm%2F0n46sgy?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Safdarjung Hospital",
location: "Safdarjung Enclave, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipNrfGkAU1lF3dJVwnJZpLFNrRbzmksWyRDJmvwy=w408-h489-k-no",
link: "https://www.google.com/maps/place/Safdarjung+Hospital+New+Emergency+Block/@28.5686945,77.2069167,17z/data=!3m1!4b1!4m6!3m5!1s0x390ce3c788fcae8f:0x2db4a8bddc6eae25!8m2!3d28.5686945!4d77.2069167!16s%2Fg%2F11f66b854r?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
},
{
name: "Moolchand Medcity",
location: "Lajpat Nagar, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipO3wxKBu2OTky8xeC5ML8UrgN-ddnaxTqyKuHzr=w408-h368-k-no",
link: "https://www.google.com/maps/place/Moolchand+Hospital/@28.566167,77.2331993,17z/data=!4m10!1m2!2m1!1smoolchand+medcity!3m6!1s0x390ce3c849a0fecd:0x309c4e9de4e2aff3!8m2!3d28.566167!4d77.235388!15sChFtb29sY2hhbmQgbWVkY2l0eZIBEHByaXZhdGVfaG9zcGl0YWzgAQA!16s%2Fg%2F11j0045tc5?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Deen Dayal Upadhyay Hospital",
location: "Hari Nagar, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipOwiTt3QQ-u0vkOmn0njbkwESBmspr82g_wF4Er=w427-h240-k-no",
link: "https://www.google.com/maps/place/Deen+Dayal+Upadhyay+Hospital/@28.628017,77.1122963,17z/data=!3m1!4b1!4m6!3m5!1s0x390cfd309eebed77:0xc8559980f0b50535!8m2!3d28.628017!4d77.1122963!16s%2Fg%2F1tf1m64n?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Artemis Hospitals",
location: "Dwarka, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipO4FfTa6lmb3Hncw3WgwGt-4n-4qcv6NDMVeUfh=w408-h306-k-no",
link: "https://www.google.com/maps/place/Artemis+Hospitals+Dwarka/@28.5709273,77.0593246,17z/data=!3m1!4b1!4m6!3m5!1s0x390d1b03c0000001:0x3eb1330d284a7209!8m2!3d28.5709273!4d77.0593246!16s%2Fg%2F11g_yrth5?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
},
{
name: "Venkateshwar Hospital",
location: "Sector 18A, Dwarka, New Delhi",
image: "https://lh5.googleusercontent.com/p/AF1QipPfqqxb8Yu1rfBbEWDzom0Gb1mfY7R8zohuCym1=w408-h544-k-no",
link: "https://www.google.com/maps/place/Venkateshwar+Hospital/@28.5885973,77.0380428,17z/data=!3m1!4b1!4m6!3m5!1s0x390d1ac3e8a4b27b:0x218f945a11993663!8m2!3d28.5885973!4d77.0380428!16s%2Fg%2F11b7y83nv6?entry=ttu&g_ep=EgoyMDI0MTAwOC4wIKXMDSoASAFQAw%3D%3D",
phone: "+911345678901"
}
];
function createHospitalCard(hospital) {
return `
<div class="hospital-card">
<a href="${hospital.link}" target="_blank">
<img src="${hospital.image}" alt="${hospital.name}">
</a>
<a href="${hospital.link}" target="_blank">${hospital.name}</a>
<p>Location: ${hospital.location}</p>
<button class="button" onclick="window.location.href='tel:${hospital.phone}'">Call Now</button>
</div>
`;
}
function renderHospitals(hospitalsToRender) {
const container = document.getElementById('hospitalContainer');
container.innerHTML = hospitalsToRender.map(createHospitalCard).join('');
}
function filterHospitals(searchTerm) {
return hospitals.filter(hospital =>
hospital.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
hospital.location.toLowerCase().includes(searchTerm.toLowerCase())
);
}
document.getElementById('searchInput').addEventListener('input', function (e) {
const searchTerm = e.target.value;
const filteredHospitals = filterHospitals(searchTerm);
renderHospitals(filteredHospitals);
});
// Initial render
renderHospitals(hospitals);
</script>
</body>
</html>