Refactor author bio display in sidebar to prioritize description over slogan

This commit is contained in:
interlope committed 2026-06-01 21:30:38 +02:00
1 parent 824cd6ffa0
commit f82ed4619f
2 files changed
+7 -3

No files matched your search

-1
View File
@@ -20,7 +20,6 @@
<div class="metadata mb-4">
<span><i class="bi bi-calendar3"></i><?php echo $page->date(); ?></span>
<span><i class="bi bi-clock-history"></i><?php echo $L->get('Reading time') . ': ' . $page->readingTime() ?></span>
<span><i class="bi bi-person"></i><?php echo $L->get('Author') . ': ' . htmlspecialchars($page->username()) ?></span>
</div>
<?php endif ?>
+7 -2
View File
@@ -14,8 +14,13 @@
</a>
<div>
<div class="sidebar-author-name"><?php echo htmlspecialchars($page->username(), ENT_QUOTES, 'UTF-8') ?></div>
<?php if ($site->slogan()) : ?>
<p class="sidebar-author-bio"><?php echo htmlspecialchars($site->slogan(), ENT_QUOTES, 'UTF-8') ?></p>
<?php
// Bio: set in Bludit Admin → Settings → General → Description
// Falls back to Slogan if Description is empty.
$_authorBio = $site->description() ?: $site->slogan();
?>
<?php if ($_authorBio) : ?>
<p class="sidebar-author-bio"><?php echo htmlspecialchars($_authorBio, ENT_QUOTES, 'UTF-8') ?></p>
<?php endif ?>
</div>
</div>