recovers header image on item and media pages

This commit is contained in:
buttle 2021-07-20 11:49:59 +02:00
parent 364d45d7fe
commit 80d30b5369
3 changed files with 30 additions and 40 deletions

View File

@ -93,7 +93,7 @@ endif;
<!-- </div> --> <!-- </div> -->
</content> </content>
<script> <script>
$(document).foundation(); //$(document).foundation();
</script> </script>
</body> </body>

View File

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

View File

@ -3,33 +3,28 @@ $translate = $this->plugin('translate');
?> ?>
<?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?> <?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?>
<!-- arc-hive insert begins --> <!-- arc-hive page header-image insert begins -->
<?php <?php
//$site->pages(); $img_src = null;
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site); $img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
if (!$img_src) { if (!$img_src) {
$img_src = '/themes/archive/asset/img/default-header-image.jpg'; $img_src = $this->assetUrl('img/ARC-HIVE-logo.svg');
} }
if ($this->site->title() == "Collections") { ?>
$image_height = "300px"; <style>
} else { .arc-page-header-img {
$image_height = "200px"; content: url("<?= $img_src ?>");
} }
</style>
<?php
?> ?>
<style>
#archive_header_img {
background: url("<?= $img_src ?>") no-repeat;
width: 100%;
height: <?= $image_height ?>;
}
</style>
<script> <script>
<?php <?php
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>'; $_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
?> ?>
$("#archive_page_title").html('<?php echo $_html ?>'); $("#archive_page_title").html('<?php echo $_html ?>');
</script> </script>
<!-- arc-hive insert ends --> <!-- arc-hive page header-image insert ends -->
<div class="resource-title"> <div class="resource-title">