moving searchbar to homepage

This commit is contained in:
spleenftw committed 2026-05-29 14:47:51 +02:00
1 parent e10bd1c82a
commit 3846811164
4 files changed
+150 -51

No files matched your search

+22
View File
@@ -11,6 +11,28 @@
<!-- Navbar -->
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
<?php
// Split the siteSidebar plugins into "search" and "everything else".
// This lets us relocate the search box under the hero on the homepage
// (Popeye-style) while keeping the other plugins in the right sidebar.
// Mirrors Bludit's own Theme::plugins() loop, but captures the output.
global $plugins;
$sidebarSearchHtml = '';
$sidebarOtherHtml = '';
if (isset($plugins['siteSidebar'])) {
foreach ($plugins['siteSidebar'] as $plugin) {
$out = $plugin->siteSidebar();
if (strpos($out, 'plugin-search') !== false) {
$sidebarSearchHtml .= $out;
} else {
$sidebarOtherHtml .= $out;
}
}
}
// The hero (and the relocated search) only appear on the blog front page.
$heroVisible = ($WHERE_AM_I === 'home' && Paginator::currentPage() == 1);
?>
<!-- Content -->
<div class="container">
<div class="row">