mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Implement simpler solution for dynamic theme loading
This commit is contained in:
parent
a424bbfcae
commit
4ddbe59556
5 changed files with 913 additions and 813 deletions
1704
embed/bindata.go
1704
embed/bindata.go
File diff suppressed because one or more lines are too long
|
@ -15,6 +15,19 @@
|
||||||
<link rel="icon" type="image/png" href="/favicon-32x32.png?v=2" sizes="32x32" />
|
<link rel="icon" type="image/png" href="/favicon-32x32.png?v=2" sizes="32x32" />
|
||||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||||
<link rel="stylesheet" href="{{rootURL}}assets/documize.css">
|
<link rel="stylesheet" href="{{rootURL}}assets/documize.css">
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.assetMapping = {
|
||||||
|
app: '{{rootURL}}assets/documize.js',
|
||||||
|
vendor: '{{rootURL}}assets/vendor.js',
|
||||||
|
themedefault: '{{rootURL}}assets/documuze.css',
|
||||||
|
themeconference: '{{rootURL}}assets/theme-conference.css',
|
||||||
|
themeforest: '{{rootURL}}assets/theme-forest.css',
|
||||||
|
themebrave: '{{rootURL}}assets/theme-brave.css',
|
||||||
|
themeharvest: '{{rootURL}}assets/theme-harvest.css',
|
||||||
|
themesunflower: '{{rootURL}}assets/theme-sunflower.css',
|
||||||
|
themesilver: '{{rootURL}}assets/theme-silver.css',
|
||||||
|
};
|
||||||
|
</script>
|
||||||
{{content-for 'head-footer'}}
|
{{content-for 'head-footer'}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -127,7 +127,7 @@ export default Service.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let file = this.get('assetMap').resolve(`assets/theme-${theme}.css`);
|
let file = window.assetMapping[`theme${theme}`]
|
||||||
$('head').append(`<link id="theme-link" rel="stylesheet" href="${file}">`);
|
$('head').append(`<link id="theme-link" rel="stylesheet" href="${file}">`);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,6 @@ module.exports = function (environment) {
|
||||||
apiNamespace: '',
|
apiNamespace: '',
|
||||||
contentSecurityPolicyHeader: 'Content-Security-Policy-Report-Only',
|
contentSecurityPolicyHeader: 'Content-Security-Policy-Report-Only',
|
||||||
|
|
||||||
// ember-cli-ifa
|
|
||||||
ifa: {
|
|
||||||
enabled: true,
|
|
||||||
inline: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
EmberENV: {
|
EmberENV: {
|
||||||
FEATURES: {}
|
FEATURES: {}
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
"ember-cli-eslint": "^4.2.3",
|
"ember-cli-eslint": "^4.2.3",
|
||||||
"ember-cli-htmlbars": "^3.0.0",
|
"ember-cli-htmlbars": "^3.0.0",
|
||||||
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
|
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
|
||||||
"ember-cli-ifa": "^0.7.0",
|
|
||||||
"ember-cli-inject-live-reload": "^1.8.2",
|
"ember-cli-inject-live-reload": "^1.8.2",
|
||||||
"ember-cli-mirage": "^0.4.10",
|
"ember-cli-mirage": "^0.4.10",
|
||||||
"ember-cli-sass": "7.1.4",
|
"ember-cli-sass": "7.1.4",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue