feat: update hero visibility logic to show on all paginated home pages and prevent duplication in navbar
This commit is contained in:
1 parent
306a852c3e
commit
e52422aa90
3 files changed
+6
-6
No files matched your search
@@ -104,8 +104,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// The hero (and the relocated search) only appear on the blog front page.
|
||||
$heroVisible = ($WHERE_AM_I === 'home' && Paginator::currentPage() == 1);
|
||||
// The hero (and the relocated search) appear on every paginated home page.
|
||||
$heroVisible = ($WHERE_AM_I === 'home');
|
||||
// Reuse the values pre-computed before <body> (avoids calling $page->content() twice).
|
||||
$isArticlePage = $blowditIsArticle;
|
||||
$hasHeadings = $blowditHasHeadings;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Shown only on the blog front page (first paginated page).
|
||||
// Drop your avatar at img/spleenftw.jpeg (change the filename below to reuse).
|
||||
$profileImage = DOMAIN_THEME . 'img/spleenftw.jpeg';
|
||||
$showProfile = ($WHERE_AM_I === 'home' && Paginator::currentPage() == 1);
|
||||
$showProfile = ($WHERE_AM_I === 'home');
|
||||
?>
|
||||
<?php if ($showProfile) : ?>
|
||||
<header class="profile text-center">
|
||||
|
||||
+3
-3
@@ -25,9 +25,9 @@
|
||||
|
||||
<?php
|
||||
// The homepage hero (home.php) already shows the social row in
|
||||
// its central block, so hide the navbar copy there to avoid
|
||||
// duplication. Show it on every other view.
|
||||
$heroVisible = ($WHERE_AM_I === 'home' && Paginator::currentPage() == 1);
|
||||
// its central block on every paginated home page, so hide the
|
||||
// navbar copy there to avoid duplication. Show it elsewhere.
|
||||
$heroVisible = ($WHERE_AM_I === 'home');
|
||||
?>
|
||||
<?php if (!$heroVisible) : ?>
|
||||
<!-- Social Networks (SVG icons live in img/<network>.svg) -->
|
||||
|
||||
Reference in new issue
Block a user