🎨 改变部分代码结构,统一Favicon设置

pull/33/merge
ruibaby 2018-08-16 10:36:06 +08:00
parent 32779b6e0d
commit c3bd63311a
16 changed files with 42 additions and 24 deletions

View File

@ -231,7 +231,7 @@ public class BackupController {
content.put("fileName", file.getName()); content.put("fileName", file.getName());
content.put("createAt", HaloUtils.getCreateTime(srcPath)); content.put("createAt", HaloUtils.getCreateTime(srcPath));
content.put("size", HaloUtils.parseSize(file.length())); content.put("size", HaloUtils.parseSize(file.length()));
mailService.sendAttachMail(user.getUserEmail(), "有新的备份!", content, "common/mail/mail_attach.ftl", srcPath); mailService.sendAttachMail(user.getUserEmail(), "有新的备份!", content, "common/mail_template/mail_attach.ftl", srcPath);
} catch (Exception e) { } catch (Exception e) {
log.error("邮件服务器未配置:{}", e.getMessage()); log.error("邮件服务器未配置:{}", e.getMessage());
} }

View File

@ -235,7 +235,7 @@ public class CommentController extends BaseController {
map.put("replyContent", commentContent); map.put("replyContent", commentContent);
map.put("blogUrl", HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp())); map.put("blogUrl", HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()));
mailService.sendTemplateMail( mailService.sendTemplateMail(
lastComment.getCommentAuthorEmail(), "您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "的评论有了新回复", map, "common/mail/mail_reply.ftl"); lastComment.getCommentAuthorEmail(), "您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "的评论有了新回复", map, "common/mail_template/mail_reply.ftl");
} }
} }
} }
@ -276,7 +276,7 @@ public class CommentController extends BaseController {
map.put("author", user.getUserDisplayName()); map.put("author", user.getUserDisplayName());
mailService.sendTemplateMail( mailService.sendTemplateMail(
comment.getCommentAuthorEmail(), comment.getCommentAuthorEmail(),
"您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "的评论已审核通过!", map, "common/mail/mail_passed.ftl"); "您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "的评论已审核通过!", map, "common/mail_template/mail_passed.ftl");
} }
} catch (Exception e) { } catch (Exception e) {
log.error("邮件服务器未配置:{}", e.getMessage()); log.error("邮件服务器未配置:{}", e.getMessage());

View File

@ -46,7 +46,7 @@ public class CommonController implements ErrorController {
*/ */
@GetMapping(value = "/404") @GetMapping(value = "/404")
public String fourZeroFour() { public String fourZeroFour() {
return "common/404"; return "common/error/404";
} }
/** /**
@ -57,7 +57,7 @@ public class CommonController implements ErrorController {
*/ */
@GetMapping(value = "/500") @GetMapping(value = "/500")
public String fiveZeroZero() { public String fiveZeroZero() {
return "common/500"; return "common/error/500";
} }
/** /**

View File

@ -175,7 +175,7 @@ public class FrontCommentController {
} }
map.put("visitor", comment.getCommentAuthor()); map.put("visitor", comment.getCommentAuthor());
map.put("commentContent", comment.getCommentContent()); map.put("commentContent", comment.getCommentContent());
mailService.sendTemplateMail(userService.findUser().getUserEmail(), "有新的评论", map, "common/mail/mail_admin.ftl"); mailService.sendTemplateMail(userService.findUser().getUserEmail(), "有新的评论", map, "common/mail_template/mail_admin.ftl");
} catch (Exception e) { } catch (Exception e) {
log.error("邮件服务器未配置:{}", e.getMessage()); log.error("邮件服务器未配置:{}", e.getMessage());
} }
@ -216,7 +216,7 @@ public class FrontCommentController {
map.put("replyContent", comment.getCommentContent()); map.put("replyContent", comment.getCommentContent());
map.put("blogUrl", HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp())); map.put("blogUrl", HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()));
mailService.sendTemplateMail( mailService.sendTemplateMail(
lastComment.getCommentAuthorEmail(), "您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_TITLE.getProp()) + "的评论有了新回复", map, "common/mail/mail_reply.ftl"); lastComment.getCommentAuthorEmail(), "您在" + HaloConst.OPTIONS.get(BlogPropertiesEnum.BLOG_TITLE.getProp()) + "的评论有了新回复", map, "common/mail_template/mail_reply.ftl");
} }
} }
} }

View File

@ -88,6 +88,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label for="blogFavicon" class="col-lg-2 col-sm-4 control-label">Favicon</label>
<div class="col-lg-4 col-sm-8">
<div class="input-group">
<input type="text" class="form-control selectData" id="blogFavicon" name="blog_favicon" value="${options.blog_favicon?if_exists}">
<span class="input-group-btn">
<button class="btn btn-default " type="button" onclick="openAttach('blogFavicon')">选择</button>
</span>
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="blogFooterInfo" class="col-lg-2 col-sm-4 control-label">页脚信息: <label for="blogFooterInfo" class="col-lg-2 col-sm-4 control-label">页脚信息:
<span data-toggle="tooltip" data-placement="top" title="支持HTML" style="cursor: pointer"> <span data-toggle="tooltip" data-placement="top" title="支持HTML" style="cursor: pointer">

View File

@ -0,0 +1,16 @@
<!-- 统计代码 -->
<#macro statistics>
${options.statistics_code?if_exists}
</#macro>
<!-- 页脚信息 -->
<#macro footer_info>
${options.blog_footer_info?if_exists}
</#macro>
<!-- favicon -->
<#macro favicon>
<#if options.blog_favicon??>
<link rel="shortcut icon" type="images/x-icon" href="${options.blog_favicon}">
</#if>
</#macro>

View File

@ -1,3 +1,4 @@
<#include "../../common/macro/common_macro.ftl">
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head> <head>
@ -41,6 +42,6 @@
<script src="anatole/source/plugins/gallery/js/jquery.min.js"></script> <script src="anatole/source/plugins/gallery/js/jquery.min.js"></script>
<script src="anatole/source/plugins/gallery/js/skel.min.js"></script> <script src="anatole/source/plugins/gallery/js/skel.min.js"></script>
<script src="anatole/source/plugins/gallery/js/main.js"></script> <script src="anatole/source/plugins/gallery/js/main.js"></script>
${options.statistics_code?if_exists} <@statistics></@statistics>
</body> </body>
</html> </html>

View File

@ -1,3 +1,4 @@
<#include "../../../common/macro/common_macro.ftl">
<#macro head title="" keywords="" description=""> <#macro head title="" keywords="" description="">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -13,7 +14,7 @@
<meta name="author" content="${user.userDisplayName?if_exists}" /> <meta name="author" content="${user.userDisplayName?if_exists}" />
<meta name="keywords" content="${keywords?default("Anatole")}"/> <meta name="keywords" content="${keywords?default("Anatole")}"/>
<meta name="description" content="${description?default("Anatole")}" /> <meta name="description" content="${description?default("Anatole")}" />
<link rel="shortcut icon" href="${options.anatole_style_favicon?default("/anatole/source/images/favicon.png")}" type="image/x-icon" /> <@favicon></@favicon>
<link href="/anatole/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/> <link href="/anatole/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
<link rel="stylesheet" href="/anatole/source/css/blog_basic.min.css?version=88107691fe"> <link rel="stylesheet" href="/anatole/source/css/blog_basic.min.css?version=88107691fe">
<link href="/anatole/source/css/style.min.css" type="text/css" rel="stylesheet" /> <link href="/anatole/source/css/style.min.css" type="text/css" rel="stylesheet" />
@ -75,7 +76,7 @@
xhr.send(); xhr.send();
</#if> </#if>
</script> </script>
${options.statistics_code?if_exists} <@statistics></@statistics>
</body> </body>
</html> </html>
</#macro> </#macro>

View File

@ -116,17 +116,6 @@
<div class="tab-pane" id="style"> <div class="tab-pane" id="style">
<form method="post" class="form-horizontal" id="anatoleStyleOptions"> <form method="post" class="form-horizontal" id="anatoleStyleOptions">
<div class="box-body"> <div class="box-body">
<div class="form-group">
<label for="anatoleStyleFavicon" class="col-sm-4 control-label">Favicon</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="anatoleStyleFavicon" name="anatole_style_favicon" value="${options.anatole_style_favicon?default("/anatole/source/images/favicon.png")}" >
<span class="input-group-btn">
<button class="btn btn-default btn-flat" type="button" onclick="openAttach('anatoleStyleFavicon')">选择</button>
</span>
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="anatoleStyleRightIcon" class="col-sm-4 control-label">右上角图标:</label> <label for="anatoleStyleRightIcon" class="col-sm-4 control-label">右上角图标:</label>
<div class="col-sm-8"> <div class="col-sm-8">

View File

@ -23,8 +23,8 @@
<a href="https://github.com/ruibaby/halo" target="_blank">Proudly published with Halo&#65281;</a> <a href="https://github.com/ruibaby/halo" target="_blank">Proudly published with Halo&#65281;</a>
</div> </div>
<div class="footer_text"> <div class="footer_text">
${options.blog_footer_info?if_exists} <@footer_info></@footer_info>
</div> </div>
</a> </a>
</div> </div>
</div> </div>