Files
bludit-blowfish/php/sidebar.php
T

40 lines
1.5 KiB
PHP

<aside class="sidebar-container">
<?php
// Compact profile card — shown only while reading an article
// (a single, non-static page), not on the homepage or static pages.
$isArticle = ($WHERE_AM_I === 'page' && isset($page) && !$page->isStatic() && !$url->notFound());
?>
<?php if ($isArticle) : ?>
<div class="sidebar-author">
<span class="sidebar-author-label">Author</span>
<div class="sidebar-author-identity">
<a href="<?php echo Theme::siteUrl() ?>">
<img class="sidebar-author-avatar" src="<?php echo DOMAIN_THEME . 'img/spleenftw.jpeg' ?>" alt="<?php echo blowfish_text($page->username()) ?>" />
</a>
<div class="sidebar-author-name"><?php echo blowfish_text($page->username()) ?></div>
<?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 blowfish_text($_authorBio) ?></p>
<?php endif ?>
</div>
</div>
<?php endif ?>
<?php
// Plugins are rendered in a fixed order (see index.php):
// Blog/About > Search > Navigation > Category > … > Hit Counter (bottom)
// On the homepage the navigation is redundant (posts are already listed),
// and the search box lives under the hero, so show only about/categories/counters.
if ($WHERE_AM_I === 'home') {
echo $sidebarHomeHtml;
} else {
echo $sidebarFullHtml;
}
?>
</aside>