Skip to content

Commit

Permalink
[BUGFIX] solved missing background images
Browse files Browse the repository at this point in the history
  • Loading branch information
laaledesiempre committed Mar 9, 2024
1 parent aae5ccf commit 0a8908a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<!-- When hosting on an actual web server the CSP should be more restrictive. (hash for script-src) -->

<link rel="preload" href="style.css" integrity="sha256-EKoGpTmF1bLrWpKFOUphVpXP96W45f+F9oXfETYQc+s=" as="style">
<link rel="preload" href="dist/pesterchum.js" integrity="sha256-99zYUvyLChILKNGDQ3IAvF842VYkSKUhNGh7T2azLTw=" as="script"> <!-- integrity hash with babel :3 -->
<link rel="preload" href="dist/pesterchum.js" integrity="sha256-7WNhL2rvHee8hBRQI4A/Rcq8+m9Ki181WcUYuefd5jc=" as="script"> <!-- integrity hash with babel :3 -->

<link rel="icon" href="favicon.ico">
<link rel="canonical" href="https://pesterchum.online">
<link rel="stylesheet" integrity="sha256-EKoGpTmF1bLrWpKFOUphVpXP96W45f+F9oXfETYQc+s=" href="style.css">
<script src="dist/pesterchum.js" integrity="sha256-99zYUvyLChILKNGDQ3IAvF842VYkSKUhNGh7T2azLTw=" defer></script>
<script src="dist/pesterchum.js" integrity="sha256-7WNhL2rvHee8hBRQI4A/Rcq8+m9Ki181WcUYuefd5jc=" defer></script>

<title>Pesterchum Online</title>
</head>
Expand Down
7 changes: 6 additions & 1 deletion src/pesterchum.js
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,11 @@ class BackgroundImage {
backgroundImage.forEach(e => {
e.src = this.path
})
backgroundImageWrapper.style.display = 'flex'
if (customTheme.colors.background) {
backgroundImageWrapper.style.display = 'flex'
} else {
backgroundImageWrapper.style.display = 'none'
}
}
}
// Theme factory
Expand Down Expand Up @@ -1683,6 +1687,7 @@ class ColorScheme {
Background.instances[this.colors.background].changeBackground()
} else {
customTheme.colors.background = null
document.querySelector('#background-image-wrapper').style.display = 'none'
backgroundImageWrapper.style.display = 'none'
}

Expand Down

0 comments on commit 0a8908a

Please sign in to comment.