Skip to content

Commit b78f987

Browse files
committed
fix images
1 parent 7c1f0c9 commit b78f987

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

src/hardware.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
Here's an overview of the GameCube's motherboard, with the some important components labeled:
2323

24-
<img src="/images/gc-motherboard.png" width="80%">
24+
<img src="images/gc-motherboard.png" width="80%">
2525
<div class="caption">
2626
Image by Rodrigo Copetti,
2727
<a href="resources.html#gamecube-architecture---a-pratical-analysis">Gamecube Architecture - A Pratical Analysis</a>
2828
</div>
2929

3030
And here's a diagram of the architecture:
3131

32-
<img src="/images/arch-diagram.png" width=100%>
32+
<img src="images/arch-diagram.png" width=100%>
3333
<div class="caption">
3434
Image by Rodrigo Copetti,
3535
<a href="resources.html#gamecube-architecture---a-pratical-analysis">Gamecube Architecture - A Pratical Analysis</a>

src/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Nintendo GameCube is a console released in 2001/2002 and is the successor to
44
belongs to the sixth generation of consoles, together with others like Sony's Playstation 2 and
55
Microsoft's Xbox.
66

7-
<img src="/images/gamecube.png" width="80%">
7+
<img src="images/gamecube.png" width="80%">
88

99
While the GameCube is frequentely overshadowed by it's big brother, the Nintendo Wii, it is a very
1010
charming console, powerful for it's time.

theme/custom.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1+
function checkImage(imageSrc, good, bad) {
2+
var img = new Image();
3+
img.onload = good;
4+
img.onerror = bad;
5+
img.src = imageSrc;
6+
}
7+
8+
19
const header = document.getElementsByClassName("menu-title")[0];
210
const title = header.childNodes[0];
311

12+
let depth = 0;
13+
const logoPath = "images/gc.png";
414
const logo = document.createElement("img");
5-
logo.setAttribute("src", "/images/gc.png");
615
logo.setAttribute("class", "gc-logo");
16+
logo.onerror = function () {
17+
depth++;
18+
if (depth > 3) {
19+
return;
20+
}
21+
22+
logo.src = "../".repeat(depth) + logoPath;
23+
}
24+
25+
logo.src = logoPath;
726

827
const div = document.createElement("div");
9-
div.setAttribute("class", "title")
28+
div.setAttribute("class", "title");
1029
div.append(logo);
1130
div.append(title);
1231

0 commit comments

Comments
 (0)