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
| <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
.slider {
width: 100%;
height: 100vh;
overflow: hidden;
position: relative;
}
.slider-item {
width: 100%;
height: 100vh;
display: none;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.5s ease;
}
.slider-item.active {
display: block;
opacity: 1;
}
.slider-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
text-align: center;
opacity: 0;
transition: opacity 0.5s ease;
}
.slider-item.active .slider-content {
opacity: 1;
}
.slider-logo {
position: absolute;
top: 10%;
left: 50%;
transform: translateX(-50%);
width: 200px; /* Ajustez la taille du logo selon vos besoins */
height: auto;
z-index: 999;
opacity: 0;
transition: opacity 0.5s ease;
}
.slider-item.active .slider-logo {
opacity: 1;
}
/* Media queries pour les appareils mobiles et tablettes */
@media only screen and (max-width: 767px) {
.slider-item {
background-image: url('media/M1.jpg');
}
.slider-item:nth-child(2) {
background-image: url('media/M2.jpg');
}
.slider-item:nth-child(3) {
background-image: url('media/M3.jpg');
}
.slider-item:nth-child(4) {
background-image: url('media/M4.jpg');
}
.slider-item:nth-child(5) {
background-image: url('media/M5.jpg');
}
.slider-item:nth-child(6) {
background-image: url('media/M6.jpg');
}
}
/* Style pour le bouton au milieu bas */
.slider-button {
position: absolute;
text-align : center;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
padding: 10px 20px;
background-color: #fff;
color: #000;
font-size: 1.2rem;
text-transform: uppercase;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}
.slider-button:hover {
background-color: #000;
color: #fff;
}
</style>
<script src="js/slider.js"></script>
<script src="js/language_fr.js"></script>
</head>
<body>
<div class="slider">
<div class="slider-item active" style="background-image: url('media/working-1.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title1">Placing Food Security<br>at The Heart of<br>Human Development.</h1>
<p id="description1"></p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023 </div>
</div>
<div class="slider-item" style="background-image: url('media/stockholminitiative-cover2.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title2">Indexing Food Security<br>Integrating New Metrics</h1>
<p id="description2">Time to Iintegate sustainability, climate change resilience,<br>gender equality, good governance, transparency</p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023 </div>
</div>
<div class="slider-item" style="background-image: url('media/stockholminitiative-cover3.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title3">Climate Change Challenges</h1>
<p id="description3">Focusing on Community-based Solutions
in facing Climate Change-induced disruptions</p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023 </div>
</div>
<div class="slider-item" style="background-image: url('media/stockholminitiative-cover4.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title4">Advocating for<br>Gender equality</h1>
<p id="description4">In all policy decisions at bilateral and multilateral levels<br>In all research programs<br>In all teaching and training curricula.</p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023 </div>
</div>
<div class="slider-item" style="background-image: url('media/stockholminitiative-cover5.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title5">Promoting private Initiatives</h1>
<p id="description5"></p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023</div>
</div>
<div class="slider-item" style="background-image: url('media/stockholminitiative-cover6.jpg');">
<div class="slider-logo">
<img src="media/logo-dark.svg" alt="Logo">
</div>
<div class="slider-content">
<h1 id="title6">Teaching Agriculture</h1>
<p id="description6"></p>
</div>
<div class="slider-button">FULL WEBSITE COMMING ON MONDAY 5 OCTOBER 2023 </div>
</div>
</div>
<script>
var sliderItems = document.querySelectorAll('.slider-item');
var currentSlide = 0;
var slideInterval = setInterval(nextSlide, 5000);
function nextSlide() {
var current = sliderItems[currentSlide];
current.classList.remove('active');
current.style.zIndex = 1;
current.style.opacity = 0;
currentSlide = (currentSlide + 1) % sliderItems.length;
var next = sliderItems[currentSlide];
next.classList.add('active');
next.style.zIndex = 4;
next.style.opacity = 1;
}
</script>
</body>
</html> |
Partager