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,8 +6,6 @@ $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';

View File

@ -7,11 +7,14 @@ $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 {
@ -20,16 +23,8 @@ if ($img_src) {
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<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,11 +3,14 @@ $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 {
@ -16,14 +19,6 @@ if ($img_src) {
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<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,10 +7,12 @@ $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 {
@ -19,13 +21,6 @@ if ($img_src) {
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<script>
<?php
if ($this->site->title() != "Collections") {