nuage de tags sur la liste, suppression dropdown navbar, rôles/droits sur le profil

This commit is contained in:
Cedric Abonnel
2026-05-12 20:07:33 +02:00
parent 1d2e3d9a24
commit 6e438835f8
3470 changed files with 97124 additions and 109 deletions
+32 -1
View File
@@ -85,7 +85,7 @@ ob_start();
} else {
$prevHref = '/page/' . rawurlencode($prevCursor);
}
?>
?>
<a class="pagination-btn" href="<?= htmlspecialchars($prevHref) ?>">← Plus récents</a>
<?php endif; ?>
<?php if ($nextCursor !== null): ?>
@@ -95,6 +95,37 @@ ob_start();
</nav>
<?php endif; ?>
<?php
$_tagCats = array_filter(
$allCats ?? [],
static fn ($cat) => isLoggedIn() || !in_array($cat, $privateCats ?? [], true),
ARRAY_FILTER_USE_KEY
);
arsort($_tagCats);
if (!empty($_tagCats)):
$_minCount = min($_tagCats);
$_maxCount = max($_tagCats);
?>
<nav class="tag-cloud mt-5" aria-label="Catégories">
<?php foreach ($_tagCats as $_catName => $_catCount):
$_size = $_minCount === $_maxCount
? 1.1
: round(0.8 + ($_catCount - $_minCount) / ($_maxCount - $_minCount) * 0.9, 2);
$_active = ($filterCat === $_catName);
?>
<a href="/?cat=<?= rawurlencode($_catName) ?>"
class="tag-cloud-item<?= $_active ? ' active' : '' ?>"
style="font-size:<?= $_size ?>em">
<?= htmlspecialchars($_catName) ?>
<sup class="tag-count"><?= $_catCount ?></sup>
</a>
<?php endforeach; ?>
<?php if ($filterCat !== ''): ?>
<a href="/" class="tag-cloud-reset">× tout afficher</a>
<?php endif; ?>
</nav>
<?php endif; ?>
<?php
$content = ob_get_clean();
$title = 'varlog';