adds default header image

This commit is contained in:
buttle 2021-05-31 15:17:12 +02:00
parent dc1f2565c1
commit 1da5e9f4ea
4 changed files with 40 additions and 16 deletions
README.md
asset/img
view
common/cross-site-search
omeka/site/page

View file

@ -1,10 +1,21 @@
# Foundation S
This is an Omeka S theme based on ZURB Foundation Sites. It currently comes with a default stylesheet for prototyping as well as 3 other style options.
This is an Omeka S theme based on [Omeka Foundation S theme].
## Installation
For basic out-of-the-box use of the theme, follow the [Omeka S User Manual instructions for installing themes](https://omeka.org/s/docs/user-manual/sites/site_theme/#installing-themes).
For basic out-of-the-box use of the theme, follow the [Omeka S User Manual instructions for installing themes](https://omeka.org/s/docs/user-manual/sites/site_theme/#installing-themes).
```
cd themes
https://git.hangar.org/arcHIVE-tech/Arc-hive-omeka-theme/archive/main.zip
unzip main.zip
mv arc-hive-omeka-theme archive
```
## Omeka Foundation S theme notes
For more advanced use, such as customizing the theme with Sass, you'll need to install the tools with [NodeJS](https://nodejs.org/en/) (0.12 or greater). Navigate to your theme directory and run `npm install`.
@ -56,7 +67,7 @@ Foundation S comes with the Default theme, as well as 3 other customized stylesh
// Sea Foam Settings
$topbar-background: $primary-color;
$thumbnail-border: 4px solid $secondary-color;
$thumbnail-shadow: none;
$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
@ -72,10 +83,10 @@ header a {
}
```
Much of the customizability within the theme lies in managing its settings variables. ZURB Foundation's default global variables from their original `_settings.scss` all sit in `_globals-default.scss`. Many of these variables are used throughout the rest of `_settings.scss`, so it was necessary to separate them out into their own file if the theme writer wants to set their own global variables. Here all the overrides live in `_globals-seafoam.scss`, and so all overridden values will be appropriately updated for use throughout the rest of `_settings.scss`.
Much of the customizability within the theme lies in managing its settings variables. ZURB Foundation's default global variables from their original `_settings.scss` all sit in `_globals-default.scss`. Many of these variables are used throughout the rest of `_settings.scss`, so it was necessary to separate them out into their own file if the theme writer wants to set their own global variables. Here all the overrides live in `_globals-seafoam.scss`, and so all overridden values will be appropriately updated for use throughout the rest of `_settings.scss`.
Any non-global setting variable overrides should come after the import for `_settings.scss` and before their usagee in the rule files, `_foundation-core.scss`, and `_omeka.scss`.
Any non-global setting variable overrides should come after the import for `_settings.scss` and before their usagee in the rule files, `_foundation-core.scss`, and `_omeka.scss`.
ZURB Foundation's default style rules are all managed in `_foundation-core.scss`. All style rules specific to Omeka S are contained within `_omeka.scss`.
After all those imports come all style rules specific to the theme.
After all those imports come all style rules specific to the theme.

Binary file not shown.

After

(image error) Size: 241 KiB

View file

@ -3,11 +3,16 @@ $fulltextSearch = $this->params()->fromQuery('fulltext_search');
$hasResults = false;
?>
<!-- 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,16 +21,22 @@ if ($img_src) {
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
<script>
<?php
if ($this->site->title() != "Collections") {
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
} else {
$_html = $this->site->title();
}
</style>
<?php } ?>
?>
$("#archive_page_title").html('<?php echo $_html ?>');
</script>
<!-- arc-hive insert ends -->
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
<div class="results">
<?php
if ($responseSitePages && $responseSitePages->getTotalResults()):

View file

@ -5,8 +5,10 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
?>
<!-- arc-hive insert begins -->
<?php
// set header images
$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('headerImage')->getImage($page);
if ($img_src) {
?>
@ -24,7 +26,6 @@ if ($img_src) {
}
</style>
<?php } ?>
<script>
<?php
if ($this->site->title() != "Collections") {
@ -35,6 +36,7 @@ if ($img_src) {
?>
$("#archive_page_title").html('<?php echo $_html ?>');
</script>
<!-- arc-hive insert ends -->
<?php /*
echo $page->id();