fixes item and media page headers

This commit is contained in:
buttle 2021-05-31 15:26:34 +02:00
parent 1da5e9f4ea
commit 78606bad26
4 changed files with 43 additions and 60 deletions

View File

@ -6,21 +6,19 @@ $hasResults = false;
<!-- arc-hive insert begins -->
<?php
//$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
if (!$img_src) {
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
}
?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<script>
<?php

View File

@ -7,29 +7,24 @@ $itemMedia = $item->media();
$showLayout = $this->themeSetting('show_layout');
?>
<!-- arc-hive insert begins -->
<?php
$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
if ($img_src) {
if (!$img_src) {
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
}
?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<script>
/*
<?php
if ($this->site->title() != "Collections") {
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
@ -38,8 +33,8 @@ if ($img_src) {
}
?>
$("#archive_page_title").html('<?php echo $_html ?>');
*/
</script>
<!-- arc-hive insert ends -->
<div class="resource-title">

View File

@ -3,27 +3,22 @@ $translate = $this->plugin('translate');
?>
<?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?>
<!-- arc-hive insert begins -->
<?php
$site->pages();
//$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
if ($img_src) {
if (!$img_src) {
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
}
?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<script>
<?php
@ -35,7 +30,7 @@ if ($img_src) {
?>
$("#archive_page_title").html('<?php echo $_html ?>');
</script>
<!-- arc-hive insert ends -->
<div class="resource-title">

View File

@ -7,25 +7,20 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
<!-- arc-hive insert begins -->
<?php
$site->pages();
//$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('headerImage')->getImage($page);
if ($img_src) {
if (!$img_src) {
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
}
?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<script>
<?php
if ($this->site->title() != "Collections") {