Skip to content

Commit

Permalink
🦄 add theme setting
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Mar 15, 2017
1 parent 5b3432e commit da7fd30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/tale/controller/admin/ThemeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public String index(Request request) {
}
themes.add(themeDto);
try {
String themePath = "/templates/themes/" + f.getName();
TaleLoader.loadTheme(themePath);
Blade.$().embedServer().addStatic("/templates/themes/" + f.getName() + "/screenshot.png");
} catch (Exception e){}
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/templates/themes/default/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ <h3 class="panel-title">基本设置</h3>
<div class="form-group">
<label class="col-md-3 control-label">主题LOGO</label>
<div class="col-md-9">
<input type="text" class="form-control" name="theme_option_logo_url" value="${options.theme_option_logo_url ?! ''}"
placeholder="请输入主题LOGO外链">
<input type="text" class="form-control" name="theme_option_logo_url" value="${options.theme_option_logo_url ?! theme_url('/static/img/logo.png')}"
placeholder="请输入主题LOGO外链"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">主题作者</label>
<div class="col-md-9">
<input type="text" class="form-control" name="theme_option_author" value="${options.theme_option_author ?! ''}" placeholder="您的博客昵称">
<input type="text" class="form-control" name="theme_option_author" value="${options.theme_option_author ?! 'biezhi'}" placeholder="您的博客昵称">
</div>
</div>
<div class="clearfix pull-right">
Expand All @@ -33,6 +33,7 @@ <h3 class="panel-title">基本设置</h3>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-6">
<div class="panel panel-color panel-inverse">
<div class="panel-heading">
Expand Down

0 comments on commit da7fd30

Please sign in to comment.