-
Notifications
You must be signed in to change notification settings - Fork 6
/
content.html
79 lines (74 loc) · 2.8 KB
/
content.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Photo Banner</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<style>
.banner {
position: relative;
width: 100%;
height: 80vh; /* Set the height to 80% of the viewport height */
}
.banner img {
width: 100%;
height: 100%;
object-fit: cover;
}
.banner-text {
position: absolute;
bottom: 20px;
left: 20px;
color: white;
font-size: 1.5rem;
background-color: rgba(0, 0, 0, 0.5); /* Adding a semi-transparent background for better visibility */
padding: 10px 20px;
text-align: left;
}
</style>
</head>
<body>
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel" data-interval="false">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="banner">
<img src="assets/1.webp" alt="First slide">
<div class="banner-text">Somali refugee Abdi (centre) and his family were among 25,000 refugees displaced from their homes in Kenya's Dadaab Refugee Complex by flooding in November 2023.</div>
</div>
</div>
<div class="carousel-item">
<div class="banner">
<img src="assets/2.webp" alt="Second slide">
<div class="banner-text">The climate crisis is no longer a distant threat. It’s happening right now, and those forced to flee conflict are being hit the hardest.</div>
</div>
</div>
<div class="carousel-item">
<div class="banner">
<img src="assets/3.jpg" alt="Third slide">
<div class="banner-text">Flooded Beletweyne Town (2024-May-20)</div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script>
// Function to automatically move to the next slide every 5 seconds
$(document).ready(function(){
setInterval(function(){
$('#carouselExampleControls').carousel('next');
}, 5000);
});
</script>
</body>
</html>