factorisation: site_lang, posts_per_page, site_license, contact dynamique

This commit is contained in:
Cedric Abonnel
2026-05-13 00:23:09 +02:00
parent ff47161721
commit 26c0a03e71
11 changed files with 133 additions and 27 deletions
+20 -1
View File
@@ -20,9 +20,28 @@ $_initials = mb_strtoupper(mb_substr($_apName, 0, 1, 'UTF-8'), 'UTF-8');
<?= htmlspecialchars(parse_url($_apUrl, PHP_URL_HOST) ?: $_apUrl) ?> ↗
</a>
<?php endif; ?>
<a href="/liens/<?= rawurlencode($_apSlug) ?>" class="author-profile-link">Mes liens →</a>
</div>
<?php if ($_apBio !== ''): ?>
<p class="author-profile-bio"><?= nl2br(htmlspecialchars($_apBio)) ?></p>
<div class="author-bio-wrap">
<p class="author-profile-bio bio-clamped" id="author-bio"><?= nl2br(htmlspecialchars($_apBio)) ?></p>
<button class="bio-toggle" id="bio-toggle" hidden>plus</button>
</div>
<script>
(function(){
var bio = document.getElementById('author-bio');
var btn = document.getElementById('bio-toggle');
requestAnimationFrame(function() {
if (bio.scrollHeight > bio.clientHeight + 2) { btn.hidden = false; }
});
btn.addEventListener('click', function() {
var exp = btn.getAttribute('aria-expanded') === 'true';
bio.classList.toggle('bio-clamped', exp);
btn.textContent = exp ? 'plus' : 'moins';
btn.setAttribute('aria-expanded', exp ? 'false' : 'true');
});
})();
</script>
<?php endif; ?>
</div>