-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
276 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title><%= title %> - AED Locations</title> | ||
<!-- Leaflet CSS --> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"> | ||
<style> | ||
#map { | ||
height: 80vh; | ||
width: 100%; | ||
} | ||
.container { | ||
padding: 20px; | ||
} | ||
.popup-content img { | ||
max-width: 200px; | ||
margin-top: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>AED Locations in Penang</h1> | ||
<div id="map"></div> | ||
</div> | ||
|
||
<!-- Leaflet JS --> | ||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script> | ||
<script> | ||
// Initialize the map | ||
const map = L.map('map').setView([5.4164, 100.3327], 12); // Penang coordinates | ||
// Add OpenStreetMap tiles | ||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | ||
}).addTo(map); | ||
// Fetch AED data from your API | ||
fetch('/api/aed/all') | ||
.then(response => response.json()) | ||
.then(data => { | ||
data.forEach(aed => { | ||
// Convert coordinates from strings to numbers | ||
const lat = parseFloat(aed.coordinates[0]); | ||
const lng = parseFloat(aed.coordinates[1]); | ||
// Create popup content including images if available | ||
let popupContent = ` | ||
<div class="popup-content"> | ||
<strong>${aed.name}</strong><br> | ||
Address: ${aed.address}<br> | ||
`; | ||
// Add images if available | ||
if (aed.images_url && aed.images_url.length > 0) { | ||
popupContent += `<img src="${aed.images_url[0]}" alt="Location image">`; | ||
} | ||
popupContent += '</div>'; | ||
// Create marker for each AED location | ||
L.marker([lat, lng]) | ||
.bindPopup(popupContent) | ||
.addTo(map); | ||
}); | ||
}) | ||
.catch(error => console.error('Error loading AED data:', error)); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title><%= title %> - How to Use an AED</title> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> | ||
<style> | ||
.hero-section { | ||
background: linear-gradient(135deg, #1e88e5, #1565c0); | ||
color: white; | ||
padding: 80px 0 20px 0; | ||
} | ||
.content-section { | ||
padding: 40px 0; | ||
} | ||
.step-card { | ||
border-left: 4px solid #1e88e5; | ||
margin-bottom: 20px; | ||
padding: 20px; | ||
background: #fff; | ||
border-radius: 5px; | ||
box-shadow: 0 2px 4px rgba(0,0,0,0.1); | ||
} | ||
.step-number { | ||
color: #1e88e5; | ||
font-size: 1.2rem; | ||
font-weight: bold; | ||
margin-bottom: 10px; | ||
} | ||
.important-tips { | ||
background: #f8f9fa; | ||
padding: 20px; | ||
border-radius: 5px; | ||
margin-top: 30px; | ||
} | ||
.icon-large { | ||
font-size: 2rem; | ||
color: #1e88e5; | ||
margin-bottom: 1rem; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- Navigation --> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> | ||
<div class="container"> | ||
<a class="navbar-brand" href="/"><i class="bi bi-heart-pulse"></i> <%= title %></a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav ms-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="/public/main">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="/public/pages/contact">Contact</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<!-- Hero Section --> | ||
<section class="hero-section"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-12 text-center animate__animated animate__fadeInDown"> | ||
<h1 class="display-4 fw-bold mb-4">How to Use an AED</h1> | ||
<p class="lead">A Step-by-Step Guide for Emergency Situations</p> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<!-- Content Section --> | ||
<section class="content-section"> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-lg-8 animate__animated animate__fadeIn"> | ||
<!-- Step 1 --> | ||
<div class="step-card"> | ||
<div class="step-number"><i class="bi bi-telephone-fill"></i> Step 1: Call Emergency Services</div> | ||
<p>Before using the AED, ensure someone has called emergency services or do it yourself if you are alone.</p> | ||
</div> | ||
|
||
<!-- Step 2 --> | ||
<div class="step-card"> | ||
<div class="step-number"><i class="bi bi-shield-check"></i> Step 2: Check the Scene</div> | ||
<p>Ensure the environment is safe for both you and the victim. Make sure the area is free of hazards (e.g., water, traffic).</p> | ||
</div> | ||
|
||
<!-- Step 3 --> | ||
<div class="step-card"> | ||
<div class="step-number"><i class="bi bi-person-check"></i> Step 3: Check the Victim</div> | ||
<ul> | ||
<li>Assess the victim's responsiveness by tapping them and shouting, "Are you okay?"</li> | ||
<li>If the victim is unresponsive and not breathing or only gasping, proceed to the next steps.</li> | ||
</ul> | ||
</div> | ||
|
||
<!-- Additional steps continue with the same pattern --> | ||
|
||
<!-- Important Tips Section --> | ||
<div class="important-tips"> | ||
<h4 class="mb-4"><i class="bi bi-exclamation-triangle"></i> Important Tips</h4> | ||
<ul> | ||
<li>Do not use the AED in water or while the victim is in water.</li> | ||
<li>Make sure the pads do not touch each other.</li> | ||
<li>If there are signs of life, place the victim in the recovery position and monitor them.</li> | ||
</ul> | ||
</div> | ||
|
||
<!-- Training Section --> | ||
<div class="step-card mt-4"> | ||
<h4><i class="bi bi-mortarboard"></i> Training</h4> | ||
<p>While AEDs are designed for public use, taking a CPR and AED training course can greatly enhance your confidence and effectiveness in an emergency situation. Organizations such as the American Heart Association or Red Cross offer classes that teach these skills.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<!-- Footer --> | ||
<footer class="bg-dark text-white py-4 mt-5"> | ||
<div class="container text-center"> | ||
<p class="mb-0">© 2024 <%= title %>. All rights reserved.</p> | ||
</div> | ||
</footer> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters