feat: remplacer les étoiles par les réactions dans le hero article
This commit is contained in:
+24
-31
@@ -314,17 +314,32 @@ a:hover {
|
||||
.hero-btn--danger:hover { background: rgba(180,30,30,.65); }
|
||||
|
||||
/* Score de notation dans le hero */
|
||||
.hero-rating-score {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: rgba(255,255,255,.88);
|
||||
.hero-reactions {
|
||||
display: flex;
|
||||
gap: .4rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Étoiles sur fond sombre */
|
||||
.star-rating--hero label { color: rgba(255,255,255,.4); font-size: 1.1rem; }
|
||||
.star-rating--hero input:checked ~ label,
|
||||
.star-rating--hero label:hover,
|
||||
.star-rating--hero label:hover ~ label { color: #f5c842; }
|
||||
.hero-reaction-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .3rem;
|
||||
background: rgba(255,255,255,.15);
|
||||
border: 1px solid rgba(255,255,255,.35);
|
||||
border-radius: 100px;
|
||||
padding: .25rem .7rem;
|
||||
color: #fff;
|
||||
font-size: .875rem;
|
||||
cursor: pointer;
|
||||
transition: background .15s, border-color .15s;
|
||||
}
|
||||
|
||||
.hero-reaction-btn:hover,
|
||||
.hero-reaction-btn--active {
|
||||
background: rgba(255,255,255,.32);
|
||||
border-color: rgba(255,255,255,.7);
|
||||
}
|
||||
|
||||
.card-cover {
|
||||
position: relative;
|
||||
@@ -1172,28 +1187,6 @@ footer.mt-5 { margin-top: 0 !important; }
|
||||
}
|
||||
|
||||
/* ─── Widget étoiles ──────────────────────── */
|
||||
.star-rating {
|
||||
display: inline-flex;
|
||||
flex-direction: row-reverse;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.star-rating input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.star-rating label {
|
||||
font-size: 1.4rem;
|
||||
color: #ccc;
|
||||
cursor: pointer;
|
||||
transition: color 0.1s;
|
||||
}
|
||||
|
||||
.star-rating input:checked ~ label,
|
||||
.star-rating label:hover,
|
||||
.star-rating label:hover ~ label {
|
||||
color: #f5a623;
|
||||
}
|
||||
|
||||
/* ─── Barre de recherche (navbar) ────────── */
|
||||
.search-form {
|
||||
|
||||
@@ -26,14 +26,18 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
if (!json.ok) { form.submit(); return; }
|
||||
|
||||
var nowActive = json.active;
|
||||
btn.classList.toggle('btn-primary', nowActive);
|
||||
btn.classList.toggle('btn-outline-secondary', !nowActive);
|
||||
if (badge) {
|
||||
badge.classList.toggle('bg-light', nowActive);
|
||||
badge.classList.toggle('text-primary', nowActive);
|
||||
badge.classList.toggle('bg-secondary', !nowActive);
|
||||
badge.textContent = json.count;
|
||||
if (btn.classList.contains('hero-reaction-btn')) {
|
||||
btn.classList.toggle('hero-reaction-btn--active', nowActive);
|
||||
} else {
|
||||
btn.classList.toggle('btn-primary', nowActive);
|
||||
btn.classList.toggle('btn-outline-secondary', !nowActive);
|
||||
if (badge) {
|
||||
badge.classList.toggle('bg-light', nowActive);
|
||||
badge.classList.toggle('text-primary', nowActive);
|
||||
badge.classList.toggle('bg-secondary', !nowActive);
|
||||
}
|
||||
}
|
||||
if (badge) { badge.textContent = json.count; }
|
||||
})
|
||||
.catch(function () { form.submit(); });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user