Skip to content

Commit

Permalink
Ajoutez le nombre de membres
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebf committed Apr 16, 2024
1 parent 491bd2d commit f385136
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions annuaire.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ <h1>Découvrez les coopératives tech</h1>
docs = lunrIndex.search(normalizeStr(q));
}

let found = false;
let count = 0;
for (let doc of docs) {
const el = members.querySelector(`a[href="${doc.ref}"]`);
if (el) {
el.classList.add('result');
found = true;
count++;
}
}

label.querySelector("span").innerText = found ? `Nos coopératives pour "${q}"` : `Pas de résultats pour "${q}"`;
label.querySelector("span").innerText = count > 0 ? `Nos ${count} coopératives pour "${q}"` : `Pas de résultats pour "${q}"`;
label.style.display = "block";
}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>Réfléchir aux enjeux tech sous un angle coopératif</h3>
</div>
<section class="grey">
<div class="container">
<div class="section-header"><h2>Découvrez nos membres</h2></div>
<div class="section-header"><h2>Découvrez nos {{site.members|size}} membres</h2></div>
<ul id="home-members">
{% for member in site.members %}
<li><a href="{{member.url|prepend:site.baseurl}}" style="background-image: url({{member.logo}});{% if member.accent_color %}background-color: {{member.accent_color}}{% endif %}" title="{{member.title}}"></a></li>
Expand Down

0 comments on commit f385136

Please sign in to comment.