factorisation: site_lang, posts_per_page, site_license, contact dynamique
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user