Skip to content

Commit 18ef851

Browse files
authored
Update index.html
1 parent 8bd8061 commit 18ef851

1 file changed

Lines changed: 21 additions & 26 deletions

File tree

index.html

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,25 @@
1212
color: #3c2f2f;
1313
}
1414

15+
/* === BANNIÈRE === */
1516
header {
16-
background: #f8d7c2;
17-
text-align: center;
18-
padding: 2em 1em;
17+
width: 100%;
18+
height: 300px; /* hauteur modifiable */
19+
background: url("https://i.ibb.co/d4SBmsZw/banner.jpg") center/cover no-repeat;
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
position: relative;
1924
}
2025

21-
header h1 { font-size: 2.5em; margin: 0; }
22-
header p { font-style: italic; margin: 0.5em 0 0; }
26+
/* si tu veux un léger fondu noir par-dessus (optionnel, sinon supprime ce bloc)
27+
header::after {
28+
content: "";
29+
position: absolute;
30+
inset: 0;
31+
background: rgba(0,0,0,0.2);
32+
}
33+
*/
2334

2435
nav {
2536
background: #ffefe2;
@@ -75,7 +86,7 @@
7586
}
7687

7788
.review {
78-
flex: 0 0 100%; /* IMPORTANT : chaque review prend 100% du conteneur */
89+
flex: 0 0 100%;
7990
box-sizing: border-box;
8091
background: #fff3ec;
8192
border-radius: 15px;
@@ -143,21 +154,17 @@
143154
font-size: 0.9em;
144155
}
145156

146-
.logo { width: 150px; height: auto; }
147-
148-
/* responsive small screens : réduire hauteur */
157+
/* responsive small screens */
149158
@media (max-width:420px){
159+
header { height: 200px; }
150160
.review-container { height: 320px; }
151161
.review p { font-size: 0.95em; padding: 0 6px; }
152162
}
153163
</style>
154164
</head>
155165
<body>
156-
<header>
157-
<img src="https://i.ibb.co/Sw8vbn7P/image0.jpg" alt="image0" class="logo">
158-
<h1>SCake</h1>
159-
<p>Pâtisserie artisanale faite maison</p>
160-
</header>
166+
<!-- BANNIÈRE -->
167+
<header></header>
161168

162169
<nav>
163170
<a href="#accueil">Accueil</a>
@@ -203,7 +210,6 @@ <h2>Passer une commande</h2>
203210
</div>
204211
</section>
205212

206-
<!-- SECTION AVIS CLIENTS AVEC PHOTOS ET CARROUSEL -->
207213
<section id="avis">
208214
<h2>Avis clients</h2>
209215
<div class="review-container" id="reviewContainer">
@@ -221,11 +227,8 @@ <h2>Avis clients</h2>
221227
<p>Un vrai régal ! SCake a su parfaitement reproduire le design que l'on voulait pour notre crumble. Merci !</p>
222228
<strong>— Centre socioculturel Pont-Êvêque</strong>
223229
</div>
224-
225-
<!-- tu peux ajouter d'autres .review ici -->
226230
</div>
227231

228-
<!-- controls -->
229232
<div class="carousel-controls">
230233
<button id="prevBtn" aria-label="Précédent"></button>
231234
<button id="nextBtn" aria-label="Suivant"></button>
@@ -260,7 +263,6 @@ <h2>Contact</h2>
260263
let intervalId = null;
261264
const delay = 4000;
262265

263-
// handle zero or one review: cacher boutons/dots et stopper auto-scroll
264266
function updateUIForCount() {
265267
if (total <= 1) {
266268
prevBtn.style.display = 'none';
@@ -275,11 +277,8 @@ <h2>Contact</h2>
275277
}
276278
}
277279

278-
// set width/positioning robustly
279280
function layout() {
280-
// each .review already flex: 0 0 100%; but ensure transform resets
281281
reviewsEl.style.transform = `translateX(-${index * 100}%)`;
282-
// rebuild dots
283282
dotsContainer.innerHTML = '';
284283
for (let i=0;i<total;i++){
285284
const d = document.createElement('div');
@@ -324,18 +323,14 @@ <h2>Contact</h2>
324323
if (total > 1) startAuto();
325324
}
326325

327-
// events
328326
prevBtn.addEventListener('click', prev);
329327
nextBtn.addEventListener('click', next);
330328

331-
// pause on hover
332329
reviewContainer.addEventListener('mouseenter', stopAuto);
333330
reviewContainer.addEventListener('mouseleave', ()=> { if (total>1) startAuto(); });
334331

335-
// recalc on resize (keeps visual correct)
336332
window.addEventListener('resize', ()=> { reviewsEl.style.transition = 'none'; layout(); setTimeout(()=> reviewsEl.style.transition = '', 50); });
337333

338-
// init
339334
total = reviewEls.length;
340335
index = 0;
341336
updateUIForCount();

0 commit comments

Comments
 (0)