This commit is contained in:
Julian Lam
2018-07-03 15:47:28 -04:00
parent e8a3c23d42
commit cb8e62cd7c
2 changed files with 3 additions and 3 deletions

View File

@@ -104,9 +104,9 @@ Themes.get = function (callback) {
// Minor adjustments for API output
configObj.type = 'local';
if (configObj.screenshot) {
configObj.screenshot_url = 'css/previews/' + encodeURIComponent(configObj.id);
configObj.screenshot_url = nconf.get('relative_path') + '/css/previews/' + encodeURIComponent(configObj.id);
} else {
configObj.screenshot_url = 'assets/images/themes/default.png';
configObj.screenshot_url = nconf.get('relative_path') + '/assets/images/themes/default.png';
}
next(null, configObj);
} catch (err) {

View File

@@ -1,7 +1,7 @@
<!-- BEGIN themes -->
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" data-type="{themes.type}" data-theme="{themes.id}"<!-- IF themes.css --> data-css="{themes.css}"<!-- ENDIF themes.css -->>
<div class="theme-card mdl-card mdl-shadow--2dp">
<div class="mdl-card__title mdl-card--expand" style="background-image: url('{relative_path}/{themes.screenshot_url}');"></div>
<div class="mdl-card__title mdl-card--expand" style="background-image: url('{themes.screenshot_url}');"></div>
<div class="mdl-card__supporting-text">
<h2 class="mdl-card__title-text">{themes.name}</h2>
<p>