Skip to content

Commit c69817a

Browse files
committed
Fix assets src
1 parent 5c1b466 commit c69817a

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

assets/author-reveal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// Function to load the YAML file
2828
async function loadAuthorData() {
2929
try {
30-
const response = await fetch('../../authors.yml');
30+
const response = await fetch('/authors.yml');
3131
const yamlText = await response.text();
3232
window.authorData = jsyaml.load(yamlText);
3333
initializeAuthors();

assets/logo-animation.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
video.playsInline = true;
1111
video.loop = false;
1212
video.playbackRate = 1.0;
13+
14+
// Get base URL from an existing resource we know works
15+
const baseUrl = logoImg.src.substring(0, logoImg.src.lastIndexOf('/assets/'));
16+
1317
const source = document.createElement("source");
14-
source.src = "../../assets/logo_movie.mp4";
18+
source.src = baseUrl + "/assets/logo_movie.mp4";
1519
source.type = "video/mp4";
1620
video.appendChild(source);
1721

assets/mini-title.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="mini-title-content">
44
<div class="mini-title-logo-wrapper">
55
<a href="https://research.arcadiascience.com/">
6-
<img src="../../assets/logo_white.png" alt="Logo">
6+
<img class="logo-white" src="" alt="Logo">
77
</a>
88
</div>
99
<p></p>
@@ -21,6 +21,14 @@
2121
const navbar = document.querySelector('#quarto-header');
2222
let prevRatio = {appear: 1, disappear: 1};
2323

24+
// Get base URL from an existing resource we know works (navbar logo)
25+
const navbarLogo = document.querySelector('.navbar-logo');
26+
if (navbarLogo) {
27+
const baseUrl = navbarLogo.src.substring(0, navbarLogo.src.lastIndexOf('/assets/'));
28+
const logoPath = baseUrl + '/assets/logo_white.png';
29+
template.content.querySelector('.logo-white').src = logoPath;
30+
}
31+
2432
if (template && titleBanner && abstract && navbar) {
2533
// Add the mini title to the document body
2634
const miniTitleContent = document.importNode(template.content, true);

0 commit comments

Comments
 (0)