adds header image by default

Closes #1
This commit is contained in:
buttle 2021-10-13 14:50:01 +02:00
parent 931e674e11
commit d7aa820113
2 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,22 @@
<!-- arc-hive header-image insert begins -->
<?php
$img_src = null;
$img_src = $this->getHelperPluginManager()->get('headerImage')->getImage();
if (!$img_src) {
$img_src = $this->assetUrl('img/default-ARC-HIVE-hero-image.jpg');
}
?>
<style>
.arc-page-header-img {
content: url("<?= $img_src ?>");
}
</style>
<?php
?>
<!-- arc-hive header-image insert ends -->
<main class="">
<a href="<?php echo $site->url(); ?>" class="site-brand arc-hive-off">
<?php if ($this->themeSetting('logo')): ?>

View File

@ -5,9 +5,12 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
?>
<!-- arc-hive page header-image insert begins -->
<?php
/*
$img_src has already been set at view/common/header-default.phtml
We override it here because a page may have it's own header image
*/
$img_src = null;
$img_src = $this->getHelperPluginManager()->get('headerImage')->getImage($page);
if (!$img_src) {
@ -21,7 +24,6 @@ $img_src = null;
</style>
<?php
?>
<!-- arc-hive page header-image insert ends -->
<?php