support new themes
This commit is contained in:
parent
f2d93c7001
commit
187692c5ad
1 changed files with 8 additions and 4 deletions
12
index.js
12
index.js
|
@ -10,7 +10,7 @@ window.onerror = function(error, url) {
|
||||||
warning.style.margin = '16px';
|
warning.style.margin = '16px';
|
||||||
document.body.appendChild(warning);
|
document.body.appendChild(warning);
|
||||||
}
|
}
|
||||||
logo.src = 'source/Ox.UI/themes/classic/png/logo128.png';
|
logo.src = 'source/Ox.UI/themes/oxlight/png/logo128.png';
|
||||||
document.body.style.backgroundColor = 'rgb(224, 224, 224)';
|
document.body.style.backgroundColor = 'rgb(224, 224, 224)';
|
||||||
document.body.style.color = 'rgb(64, 64, 64)';
|
document.body.style.color = 'rgb(64, 64, 64)';
|
||||||
document.body.style.fontFamily = [
|
document.body.style.fontFamily = [
|
||||||
|
@ -68,6 +68,7 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
data: {
|
data: {
|
||||||
downloads: {},
|
downloads: {},
|
||||||
html: {},
|
html: {},
|
||||||
|
legacyThemes: {classic: 'oxlight', modern: 'oxdark'},
|
||||||
pages: [
|
pages: [
|
||||||
{id: 'about', title: 'About'},
|
{id: 'about', title: 'About'},
|
||||||
{id: 'readme', title: 'Readme'},
|
{id: 'readme', title: 'Readme'},
|
||||||
|
@ -80,7 +81,7 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
item: {doc: '', examples: '', readme: ''},
|
item: {doc: '', examples: '', readme: ''},
|
||||||
page: '',
|
page: '',
|
||||||
previousPage: 'about',
|
previousPage: 'about',
|
||||||
theme: 'classic'
|
theme: 'oxlight'
|
||||||
},
|
},
|
||||||
warning: 'Aw, snap! This website requires an up-to-date, '
|
warning: 'Aw, snap! This website requires an up-to-date, '
|
||||||
+ 'HTML5-compliant web browser. '
|
+ 'HTML5-compliant web browser. '
|
||||||
|
@ -167,6 +168,8 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
},
|
},
|
||||||
init: function() {
|
init: function() {
|
||||||
app.user = Ox.extend(app.data.user, app.db());
|
app.user = Ox.extend(app.data.user, app.db());
|
||||||
|
app.user.theme = app.data.legacyThemes[app.user.theme]
|
||||||
|
|| app.user.theme;
|
||||||
app.loadScreen(function() {
|
app.loadScreen(function() {
|
||||||
app.loadData(function() {
|
app.loadData(function() {
|
||||||
Ox.load('UI', {theme: app.user.theme}, app.load);
|
Ox.load('UI', {theme: app.user.theme}, app.load);
|
||||||
|
@ -636,8 +639,9 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
return app.patchButtonGroup(
|
return app.patchButtonGroup(
|
||||||
Ox.ButtonGroup({
|
Ox.ButtonGroup({
|
||||||
buttons: [
|
buttons: [
|
||||||
{id: 'classic', title: 'Light'},
|
{id: 'oxlight', title: 'Light'},
|
||||||
{id: 'modern', title: 'Dark'}
|
{id: 'oxmedium', title: 'Medium'},
|
||||||
|
{id: 'oxdark', title: 'Dark'}
|
||||||
],
|
],
|
||||||
selectable: true,
|
selectable: true,
|
||||||
value: app.user.theme
|
value: app.user.theme
|
||||||
|
|
Loading…
Reference in a new issue