mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-12-22 17:26:13 +08:00
Loader: Inject assets CSS
This commit is contained in:
parent
a921b38e3e
commit
b3ed655e44
@ -37,6 +37,10 @@ var assets = {
|
||||
"debug.css",
|
||||
"songbg.css"
|
||||
],
|
||||
"assetsCss": [
|
||||
"fonts/fonts.css",
|
||||
"img/img.css"
|
||||
],
|
||||
"img": [
|
||||
"title-screen.png",
|
||||
"notes.png",
|
||||
|
@ -40,6 +40,12 @@ class Loader{
|
||||
stylesheet.href = "/src/css/" + name + queryString
|
||||
document.head.appendChild(stylesheet)
|
||||
})
|
||||
assets.assetsCss.forEach(name => {
|
||||
var stylesheet = document.createElement("link")
|
||||
stylesheet.rel = "stylesheet"
|
||||
stylesheet.href = gameConfig.assets_baseurl + name + queryString
|
||||
document.head.appendChild(stylesheet)
|
||||
})
|
||||
var checkStyles = () => {
|
||||
if(document.styleSheets.length >= cssCount){
|
||||
resolve()
|
||||
|
@ -8,9 +8,7 @@
|
||||
<meta name="description" content="パソコンとスマホのブラウザ向けの太鼓の達人シミュレータ 🥁 Taiko no Tatsujin rhythm game simulator for desktop and mobile browsers">
|
||||
|
||||
<link rel="stylesheet" href="/src/css/loader.css?{{version.commit_short}}">
|
||||
<link rel="stylesheet" href="{{config.assets_baseurl}}fonts/fonts.css?{{version.commit_short}}">
|
||||
<link rel="stylesheet" href="{{config.assets_baseurl}}img/img.css?{{version.commit_short}}">
|
||||
|
||||
|
||||
<script src="/src/js/assets.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/strings.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/pageevents.js?{{version.commit_short}}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user