Skip to content

Commit 9c015fe

Browse files
authored
fix icon fallbacks (#1056)
1 parent 7dc1221 commit 9c015fe

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/lib/components/images/CommitteeIcon.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
export let useMono = false;
1111
1212
const FALLBACK = {
13-
mono: "https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/d_sektionen/full/bw.svg",
13+
mono: "https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/dsek/bw.svg",
1414
color:
15-
"https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/d_sektionen/full/color.svg",
15+
"https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/dsek/color.svg",
1616
};
1717
1818
/** Fallback to D-sektionen icon if the committee icon is not found */
@@ -21,7 +21,8 @@
2121
(event) => {
2222
if (
2323
event.target instanceof HTMLImageElement &&
24-
(imageUrl != FALLBACK.color || imageUrl != FALLBACK.mono)
24+
event.target.src != FALLBACK.color &&
25+
event.target.src != FALLBACK.mono
2526
) {
2627
event.target.src = imageUrl;
2728
}

src/lib/components/images/CommitteeSymbol.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
{#if differentDarkLight}
2020
<object
21-
data="https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/d_sektionen/symbol/d.svg"
21+
data="https://raw.githubusercontent.com/Dsek-LTH/grafik/refs/heads/main/guild/dsek/symbol/symbol_rosa.svg"
2222
type="“image/svg"
2323
title="{committee.name} symbol"
2424
class="relative aspect-square"
@@ -36,7 +36,7 @@
3636
</object>
3737
{:else}
3838
<object
39-
data="https://raw.githubusercontent.com/Dsek-LTH/grafik/main/guild/d_sektionen/symbol/d.svg"
39+
data="https://raw.githubusercontent.com/Dsek-LTH/grafik/refs/heads/main/guild/dsek/symbol/symbol_rosa.svg"
4040
type="“image/svg"
4141
title="{committee.name} symbol"
4242
class="aspect-square"

0 commit comments

Comments
 (0)