mirror of
https://github.com/slorelee/wimbuilder2.git
synced 2025-05-06 18:25:51 +08:00
support themes
This commit is contained in:
parent
2035554662
commit
558ca8bb3c
@ -21,6 +21,7 @@
|
||||
<link rel="stylesheet" href="assets/css/switch.css" />
|
||||
<link rel="stylesheet" href="assets/htakit/css/uikit-tab.css" />
|
||||
<link rel="stylesheet" href="assets/css/alert.css" />
|
||||
<link rel="stylesheet" href="assets/css/themes.css" />
|
||||
</head>
|
||||
|
||||
<body onbeforeunload="window_beforeunload()">
|
||||
@ -80,6 +81,10 @@ if ($IE_VER == '0') {
|
||||
<script src="config.js"></script>
|
||||
<script src="auto_config.js"></script>
|
||||
|
||||
<div id="theme_div">
|
||||
<canvas id="theme_canvas"></canvas>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="file" style="display:none" id="$f" /> <!-- gobal OpenFileDialog element -->
|
||||
</div>
|
||||
@ -468,5 +473,6 @@ if ($IE_VER == '9+') {
|
||||
<script src="assets/js/page_build.js"></script>
|
||||
<script src="assets/js/menu_click.js"></script>
|
||||
<script src="assets/js/init.js"></script>
|
||||
<script src="assets/themes/themes.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
3
assets/css/themes.css
Normal file
3
assets/css/themes.css
Normal file
@ -0,0 +1,3 @@
|
||||
#theme_div {
|
||||
display: none;
|
||||
}
|
2
assets/themes/loader.js
Normal file
2
assets/themes/loader.js
Normal file
@ -0,0 +1,2 @@
|
||||
// load_theme('default');
|
||||
|
21
assets/themes/themes.js
Normal file
21
assets/themes/themes.js
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
function load_theme_css(theme) {
|
||||
$("<link>").attr({ rel: "stylesheet",
|
||||
type: "text/css",
|
||||
href: "assets/themes/" + theme + "/" + theme + ".css"
|
||||
}).appendTo("head");
|
||||
}
|
||||
|
||||
function load_theme(theme) {
|
||||
load_theme_css(theme);
|
||||
document.write('<script src="assets/themes/' + theme + '/' + theme + '.js"></script>');
|
||||
}
|
||||
|
||||
function themes_loader() {
|
||||
var file = 'assets/themes/loader.js';
|
||||
if (fso.FileExists(file)) {
|
||||
document.write('<script src="' + file + '"></script>');
|
||||
}
|
||||
}
|
||||
|
||||
themes_loader();
|
Loading…
x
Reference in New Issue
Block a user