I've made some additions to the theme.php of watercolor theme.
It's now working with the simpleblog plugin. i didn't test without the plugin but it should work just as usual
here is the modified code of the whole header section: (my contribution is between <addition> 1 & 2)
Wish you a nice day
<header>
<!-- ADDITION 1: check if page is in simpleblog.json then know its a blog page -->
<?php
$isBlogPage = false;
$isBlogPost = false;
$blogPostSlug = '';
if (!isset($Wcms->get("pages")->{$Wcms->currentPage}) && $Wcms->currentPage !== 'home' && $Wcms->currentPage !== $Wcms->get("config", "login")) {
$blogDataPath = $Wcms->dataPath . '/simpleblog.json';
if (file_exists($blogDataPath)) {
$blogData = json_decode(file_get_contents($blogDataPath));
if (isset($blogData->posts->{$Wcms->currentPage})) {
$isBlogPost = true;
$blogPostSlug = $Wcms->currentPage;
$isBlogPage = true;
} elseif ($Wcms->currentPage === 'blog') {
$isBlogPage = true;
}
}
}
?>
<!-- END OF ADDITION 1-->
<?php if($Wcms->currentPage === $Wcms->get("config", "defaultPage")): ?>
<div class="header-content container">
<?= newEditableArea("{$Wcms->currentPage}_header", "
<h1>Hi! <span>I'm Watercolor.</span></h1>
<span>This is a detailed watercolor theme by <a href=\"https://steph.tools\">Stephan Stanisic</a>.</span>
<div class=\"header-socials\">
<a href=\"
https://nitter.net/\"><svg viewBox=\"0 0 496 512\"><use xlink:href=\"#fab-twitter\"></use></svg></a>
<a href=\"https://joinmastodon.org\"><svg viewBox=\"0 0 496 512\"><use xlink:href=\"#fab-mastodon\"></use></svg></a>
<a href=\"http://delta.chat\"><svg viewBox=\"0 0 496 512\"><use xlink:href=\"#fas-comment\"></use></svg></a>
</div>
") ?>
</div>
<div class="icon-scroll"></div>
<?php elseif($Wcms->currentPage === $Wcms->get("config", "login")): ?>
<div class="header-content container">
<h1>Login</h1>
</div>
<?php elseif($Wcms->loggedIn): ?>
<div class="header-content">
<?= newEditableArea("{$Wcms->currentPage}_header", "<h1>Page <span>Title.</span></h1>
<span>And a subtitle</span>") ?>
</div>
<!-- ADDITION 2: show header for blog and blog/post -->
<?php elseif($isBlogPost): ?>
<div class="header-content">
<?= $Wcms->block("{$blogPostSlug}_header") ?>
</div>
<?php elseif($Wcms->currentPage === 'blog'): ?>
<div class="header-content">
<?= $Wcms->block("blog_header") ?>
</div>
<!-- END OF ADDITION 2 -->
<?php elseif(isset($Wcms->get("pages")->{$Wcms->currentPage})): ?>
<div class="header-content">
<?= $Wcms->block("{$Wcms->currentPage}_header") ?>
</div>
<?php else: ?>
<div class="header-content">
<?= $Wcms->block("404_header") ?>
</div>
<?php endif; ?>
</header>