mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-10 14:12:02 +00:00
Vuefy theme stylesheets
This commit is contained in:
parent
6385e1b463
commit
7eec9dcb96
@ -2759,6 +2759,7 @@
|
||||
<div id="progress" style="display:none">
|
||||
<div id="progressbar"><span id="progresspercent" ach-tooltip="Percentage until Infinity">0%</span></div>
|
||||
</div>
|
||||
<link v-if="model.player.options.theme" type="text/css" rel="stylesheet" :href="themeCss">
|
||||
</div>
|
||||
</body>
|
||||
<div class="videocontainer">
|
||||
|
@ -36,27 +36,6 @@ var Theme = function Theme(name, colors) {
|
||||
|
||||
Chart.defaults.global.defaultFontColor = colors.chartFont;
|
||||
normalDimChart.data.datasets[0].borderColor = colors.chartBorder;
|
||||
|
||||
stripThemeCss();
|
||||
if (!this.isDefault())
|
||||
attachThemeCss();
|
||||
|
||||
function stripThemeCss() {
|
||||
document.querySelectorAll("link").forEach( function(e) {
|
||||
if (e.href.includes("theme")) e.remove();
|
||||
});
|
||||
}
|
||||
|
||||
function attachThemeCss() {
|
||||
let head = document.head;
|
||||
let link = document.createElement('link');
|
||||
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = "stylesheets/theme-" + name + ".css";
|
||||
|
||||
head.appendChild(link);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -43,6 +43,11 @@ ui = new Vue({
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
themeCss: function() {
|
||||
return "stylesheets/theme-"+ this.model.player.options.theme +".css";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user