forked from Eshita-Badhe/QuickAid-First_Aid_Advisor_ChatBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleft.html
More file actions
115 lines (99 loc) · 3.13 KB
/
left.html
File metadata and controls
115 lines (99 loc) · 3.13 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search Nearby Hospital or Clinic</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 400px;
}
h2 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
form {
display: flex;
flex-direction: column;
}
input[type="text"] {
padding: 12px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 10px;
font-size: 16px;
}
button {
padding: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.results {
margin-top: 20px;
}
.results div {
padding: 10px;
border-bottom: 1px solid #eee;
color: #555;
}
.results div:last-child {
border-bottom: none;
}
</style>
</head>
<body>
<div class="container">
<h2>Search Nearby Hospital or Clinic</h2>
<form id="searchForm">
<input type="text" id="location" placeholder="Enter your location..." required>
<button type="submit">Search</button>
</form>
<div class="results" id="results"></div>
</div>
<script>
document.getElementById('searchForm').addEventListener('submit', function(e) {
e.preventDefault();
const location = document.getElementById('location').value;
const resultsDiv = document.getElementById('results');
if (location.trim() === '') {
resultsDiv.innerHTML = '<p>Please enter a valid location.</p>';
return;
}
// This is a placeholder for actual API call
// For example, you can integrate Google Maps API or any other location service
const sampleResults = [
'City Hospital - 1.2 miles away',
'Green Clinic - 2.5 miles away',
'Metro Medical Center - 3.1 miles away'
];
resultsDiv.innerHTML = '';
sampleResults.forEach(result => {
const div = document.createElement('div');
div.textContent = result;
resultsDiv.appendChild(div);
});
});
</script>
</body>
</html>