fix: file pathes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>infinifi</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -17,8 +17,8 @@
|
||||
<input id="volume-slider" type="range" min="0" max="100" step="1" />
|
||||
</div>
|
||||
</main>
|
||||
<img class="cat" src="/images/cat-0.png"></img>
|
||||
<img class="eeping-cat" src="/images/eeping-cat.png"></img>
|
||||
<img class="cat" src="./images/cat-0.png"></img>
|
||||
<img class="eeping-cat" src="./images/eeping-cat.png"></img>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<canvas id="bg"></canvas>
|
||||
|
||||
<script type="text/javascript" src="/bg.js"></script>
|
||||
<script type="text/javascript" src="/script.js"></script>
|
||||
<script type="text/javascript" src="./bg.js"></script>
|
||||
<script type="text/javascript" src="./script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,8 +2,8 @@ const playBtn = document.getElementById("play-btn");
|
||||
const catImg = document.getElementsByClassName("cat")[0];
|
||||
const volumeSlider = document.getElementById("volume-slider");
|
||||
const currentVolumeLabel = document.getElementById("current-volume-label");
|
||||
const clickAudio = new Audio("/audio/click.wav");
|
||||
const clickReleaseAudio = new Audio("/audio/click-release.wav");
|
||||
const clickAudio = new Audio("./audio/click.wav");
|
||||
const clickReleaseAudio = new Audio("./audio/click-release.wav");
|
||||
|
||||
const CROSSFADE_DURATION_MS = 5000;
|
||||
const CROSSFADE_INTERVAL_MS = 20;
|
||||
@@ -17,7 +17,7 @@ let currentVolume = 0;
|
||||
|
||||
function playAudio() {
|
||||
// add a random query parameter at the end to prevent browser caching
|
||||
currentAudio = new Audio(`/current.mp3?t=${Date.now()}`);
|
||||
currentAudio = new Audio(`./current.mp3?t=${Date.now()}`);
|
||||
currentAudio.onplay = () => {
|
||||
isPlaying = true;
|
||||
playBtn.innerText = "pause";
|
||||
@@ -93,7 +93,7 @@ function animateCat() {
|
||||
} else {
|
||||
current += 1;
|
||||
}
|
||||
catImg.src = `/images/cat-${current}.png`;
|
||||
catImg.src = `./images/cat-${current}.png`;
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user