Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ If your usecase is development, the docker-compose.yml file will start an NGINX

Once your findingaids are installed, use `docker compose up` to start your development environment.

Header/footer implementation notes
---------------------------------------------------------
The UKLibraries specific implementation of the University branded universal and global headers, and universal footer, are semi-dynamically implemented in this project by copying a static script into `universal_header.mustache` and `universal_footer.mustache` from [UKL_HeaderFooter](https://github.com/uklibraries/UKL_HeaderFooter).

To update the site title, menu items, or to include a custom logo or search block, you must edit the [exploreukConfig.js](https://github.com/uklibraries/UKL_HeaderFooter/blob/main/js/config/sites/exploreuk/exploreukConfig.js) file in the UKL_HeaderFooter repo, and then push the updated file to [lib.uky.edu](https://lib.uky.edu/webparts/ukhdr/prod/js/config/sites/exploreuk/exploreukConfig.js).

See [UKL_HeaderFooter repo](https://github.com/uklibraries/UKL_HeaderFooter) for additional details.

Copyright
---------

Expand Down
1 change: 1 addition & 0 deletions app/assets/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ label {

.nav-tabs {
float: right;
margin: .5rem 0 0;
}

.container-fluid {
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/application.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
{{>universal_header}}
<title>{{title}}{{^title}}Welcome to ExploreUK{{/title}}</title>
{{#css}}
<link rel="stylesheet" href="{{href}}">
Expand Down Expand Up @@ -38,5 +39,6 @@
</div>
{{>footer}}
{{>viewer}}
{{>universal_footer}}
</body>
</html>
3 changes: 1 addition & 2 deletions app/views/layouts/nav.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<div id="hd" class="hd"></div>
<div>
{{> repo}}
{{! > repo}}
{{#requestable}}
<ul class="nav nav-tabs">
<li class="active">
Expand Down
3 changes: 3 additions & 0 deletions app/views/layouts/universal_footer.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- universal header/footer file part 2 start -->
<script src="https://lib.uky.edu/webparts/ukhdr/2024/js/combofootershared.js"></script>
<!-- universal header/footer files part 2 end -->
38 changes: 38 additions & 0 deletions app/views/layouts/universal_header.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- universal header/footer files start -->
<link rel="stylesheet" href="https://lib.uky.edu/webparts/ukhdr/2024/css/global_header_footer.css" media="all">
<link rel="stylesheet" id="ukl-header-styles" href="https://lib.uky.edu/webparts/ukhdr/prod/css/global_header_footer.css" media="all" />
<script
id="ukl-header-script"
type="module"
src="https://lib.uky.edu/webparts/ukhdr/prod/js/universalHeader.js"
onerror="
(() => {
// Remove this script
old_script = document.querySelector('#ukl-header-script');
old_script.remove();

// Use the fallback css
const styles = document.querySelector('#ukl-header-styles');
styles.href='https://cdn.jsdelivr.net/gh/uklibraries/UKL_HeaderFooter@main/css/global_header_footer.css'

// Create a new script and use fallback js
const script = document.createElement('script');
script.id = 'ukl-header-script';
script.type = 'module';
script.src = 'https://cdn.jsdelivr.net/gh/uklibraries/UKL_HeaderFooter@main/js/universalHeader.js';
script.dataset.base_path = 'exploreuk';
document.head.appendChild(script);

// Remove footer script
old_footer=document.querySelector('#ukl-footer-script')
old_footer.remove();

// Create a new footer script and use fallback js
const footer_script = document.createElement('script');
footer_script.src='https://cdn.jsdelivr.net/gh/uklibraries/UKL_HeaderFooter@main/js/comboFooterShared.js';
document.body.appendChild(footer_script);
})();
"
data-base_path="exploreuk"
></script>
<!-- universal header/footer files end -->
Loading