Skip to content

Commit

Permalink
localises banner image
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyRogers committed Oct 17, 2024
1 parent 64547e4 commit fa886c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file added public/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<script defer="defer" src="//ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.4/js/script.js"></script>
<link rel="stylesheet" href="https://assets.emblstatic.net/vf/v2.4.12/assets/ebi-header-footer/ebi-header-footer.css" type="text/css" media="all" />

<section class="vf-hero vf-hero--1200 | vf-u-fullbleed" style="--vf-hero--bg-image: url(https://www.ebi.ac.uk/metagenomics/proteins/static/img/banner.94dfddd7aebb.jpg);">
<section class="vf-hero vf-hero--1200 | vf-u-fullbleed" id="hero">
<div class="vf-hero__content | vf-box | vf-stack vf-stack--400">
<p class="vf-hero__kicker"><a href="https://ebi.ac.uk">EMBL-EBI</a> | Deciphon</p>
<p class="vf-hero__kicker"><span class="vf-badge vf-badge--primary">alpha</span></p>
Expand All @@ -46,6 +46,13 @@ <h2 class="vf-hero__heading">Deciphon</h2>
</div>
</section>

<script>
window.onload = function() {
const rootUrl = window.location.origin;
document.documentElement.style.setProperty("--vf-hero--bg-image", `url(${rootUrl}/banner.jpg)`);
}
</script>

<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

Expand Down

0 comments on commit fa886c5

Please sign in to comment.