Skip to content

Commit

Permalink
fix: use storytelling without shadowroot, remove temporary style inje…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
silvester-pari committed Mar 21, 2024
1 parent eb355c2 commit 997f603
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
content="Earth Science Collaborative Open Development Environment"
/>
<meta property="twitter:image" content="/earthcode.png" />
<link
rel="stylesheet"
href="https://unpkg.com/@eox/[email protected]/css/main.css"
/>
<!-- Matomo -->
<script>
var _paq = (window._paq = window._paq || []);
Expand Down Expand Up @@ -73,7 +69,10 @@
background-image="https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2023/11/nourishing_commercial_earth_observation/25191087-1-eng-GB/Nourishing_commercial_Earth_observation_pillars.jpg"
></esa-cover>
<main class="u-py-5">
<eox-storytelling markdown-url="./index.md"></eox-storytelling>
<eox-storytelling
markdown-url="./index.md"
no-shadow
></eox-storytelling>
</main>
<esa-footer
title="Want to get notified?"
Expand Down Expand Up @@ -116,6 +115,10 @@
src="https://unpkg.com/@eox/[email protected]"
type="module"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/@eox/[email protected]/css/main.css"
/>
<script>
const menuItems = [
{
Expand Down Expand Up @@ -173,17 +176,6 @@
document.querySelector("esa-cookies").style.display = "block";
}

// TEMP
const style = document.createElement("style");
style.innerHTML = `@import "https://unpkg.com/@eox/[email protected]/css/main.css";`;
const append = setInterval(() => {
const element = document.querySelector("eox-storytelling");
if (element.shadowRoot) {
clearInterval(append);
element.shadowRoot.appendChild(style);
}
}, 10);

// TRACK PAGE SCROLL
function getScrollPercent() {
const h = document.documentElement,
Expand Down

0 comments on commit 997f603

Please sign in to comment.