Skip to content
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
28 changes: 14 additions & 14 deletions app/assets/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ label {

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

.container-fluid {
Expand Down Expand Up @@ -166,20 +167,19 @@ a:hover.underline-link {
color:#000000
}
.in-page-alert h2 {
text-transform: uppercase;
font-size: 1.75rem;
font-weight: 900;
margin-top: 0;
color: #0033A0;
line-height: 1.2;
text-transform: uppercase;
font-size: 1.75rem;
font-weight: 900;
margin-top: 0;
color: #0033A0;
line-height: 1.2;
}
.in-page-alert h3 {
text-transform: uppercase;
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 5px;
margin-top: 10px;
color: #0033A0;
line-height: 1.2;

text-transform: uppercase;
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 5px;
margin-top: 10px;
color: #0033A0;
line-height: 1.2;
}
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 lang="en">
<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 -->
37 changes: 37 additions & 0 deletions app/views/layouts/universal_header.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- universal header/footer files start -->
<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