nuage de tags sur la liste, suppression dropdown navbar, rôles/droits sur le profil
This commit is contained in:
+32
-1
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user