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