👽 细节修改

pull/1/head
RYAN0UP_ 2018-04-14 18:06:03 +08:00
parent dba3a5b153
commit 1905b6eb73
23 changed files with 316 additions and 170 deletions

View File

@ -12,6 +12,7 @@
## 目录
- [Introduction 简介](#Introduction-简介)
- [Quickstart 快速开始](#Quickstart-快速开始)
- [Demo 演示](#Demo-演示)
- [Download 下载](#Download-下载)
- [Docs 文档](#Docs-文档)
@ -26,6 +27,14 @@ Fast,simple,powerful blog system powered by Java.
**Halo** [ˈheɪloʊ],意为光环。当然,你也可以当成拼音读(哈喽)。<br>
轻快简洁功能强大使用Java开发的博客系统。
## Quickstart 快速开始
```bash
git clone https://github.com/ruibaby/halo.git
cd halo
mvn clean package
```
## Demo 演示
[界面预览](PREVIEW.md)

View File

@ -316,6 +316,25 @@ public class HaloUtil {
return false;
}
/**
*
* @param dir dir
* @return boolean
*/
public static boolean removeDir(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i=0; i<children.length; i++) {
boolean success = removeDir(new File(dir, children[i]));
if (!success) {
return false;
}
}
}
// 目录此时为空,可以删除
return dir.delete();
}
/**
*
* @return

View File

@ -64,7 +64,7 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @return freemarker
* @return
*/
@GetMapping
public String index(Model model){
@ -76,9 +76,9 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @param page page
* @param size size
* @return freemarker
* @param page
* @param size
* @return /themes/{theme}/index
*/
@GetMapping(value = "page/{page}")
public String index(Model model,
@ -124,8 +124,8 @@ public class IndexController extends BaseController{
/**
* ajax
*
* @param page page
* @return list
* @param page page
* @return List<Post></>
*/
@GetMapping(value = "next")
@ResponseBody
@ -147,9 +147,9 @@ public class IndexController extends BaseController{
/**
*
*
* @param postId postId
* @param postUrl
* @param model model
* @return String
* @return /themes/{theme}/post
*/
@GetMapping(value = {"archives/{postUrl}","post/{postUrl}","article/{postUrl}"})
public String getPost(@PathVariable String postUrl, Model model){
@ -207,8 +207,9 @@ public class IndexController extends BaseController{
/**
*
* @param postId postId
* @return page
*
* @param postId postId
* @return List<Comment></>
*/
@GetMapping(value = "/getComment/{postId}",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
@ -227,7 +228,7 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @return string
* @return /themes/{theme}/about
*/
@GetMapping(value = "/about")
public String about(Model model){
@ -243,7 +244,7 @@ public class IndexController extends BaseController{
/**
*
*
* @return String
* @return /themes/{theme}/gallery
*/
@GetMapping(value = "/gallery")
public String gallery(Model model){
@ -258,7 +259,8 @@ public class IndexController extends BaseController{
/**
*
*
* @return string
* @param model model
* @return /themes/{theme}/links
*/
@GetMapping(value = "/links")
public String links(Model model){
@ -297,7 +299,7 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @return string
* @return /themes/{theme}/tags
*/
@GetMapping(value = "/tags")
public String tags(Model model){
@ -347,7 +349,7 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @return string
* @return
*/
@GetMapping(value = "/archives")
public String archives(Model model){
@ -358,8 +360,8 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @param page page
* @return string
* @param page page
* @return /themes/{theme}/archives
*/
@GetMapping(value = "/archives/page/{page}")
public String archives(Model model,
@ -404,9 +406,9 @@ public class IndexController extends BaseController{
*
*
* @param model model
* @param year year
* @param month month
* @return string
* @param year year
* @param month month
* @return /themes/{theme}/archives
*/
@GetMapping(value = "/archives/{year}/{month}")
public String archives(Model model,
@ -488,14 +490,19 @@ public class IndexController extends BaseController{
/**
*
*
* @param comment comment
* @return string
* @param comment comment
* @param post post
* @param request request
* @return truefalse
*/
@PostMapping(value = "/newComment")
@ResponseBody
public boolean newComment(@ModelAttribute("comment") Comment comment,
@ModelAttribute("post") Post post,
HttpServletRequest request){
if(""==comment.getCommentAuthor() || "".equals(comment.getCommentAuthor())){
comment.setCommentAuthor("小猪佩琪");
}
comment.setCommentAuthorEmail(comment.getCommentAuthorEmail().toLowerCase());
comment.setPost(post);
comment.setCommentDate(new Date());

View File

@ -54,7 +54,8 @@ public class InstallController {
/**
*
*
* @return string
* @param model model
* @return
*/
@GetMapping
public String install(Model model){
@ -75,7 +76,14 @@ public class InstallController {
/**
*
*
* @return boolean
* @param siteTitle
* @param siteUrl
* @param userName
* @param userDisplayName
* @param userEmail
* @param userPwd
* @param request request
* @return truefalse
*/
@PostMapping(value = "/do")
@ResponseBody

View File

@ -58,7 +58,9 @@ public class AdminController extends BaseController{
/**
*
*
* @return freemarker
* @param model model
* @param session session
* @return admin/admin_index
*/
@GetMapping(value = {"","/index"})
public String index(Model model,HttpSession session){
@ -93,7 +95,8 @@ public class AdminController extends BaseController{
/**
*
*
* @return freemarker
* @param session session
* @return admin/admin_login
*/
@GetMapping(value = "/login")
public String login(HttpSession session){
@ -108,10 +111,10 @@ public class AdminController extends BaseController{
/**
*
*
* @param loginName loginName
* @param loginPwd loginPwd
* @param session session
* @return String
* @param loginName
* @param loginPwd loginPwd
* @param session session session
* @return String
*/
@PostMapping(value = "/getLogin")
@ResponseBody
@ -158,7 +161,7 @@ public class AdminController extends BaseController{
* 退 session
*
* @param session session
* @return string
* @return /admin/login
*/
@GetMapping(value = "/logOut")
public String logOut(HttpSession session){
@ -172,10 +175,10 @@ public class AdminController extends BaseController{
/**
*
*
* @param model model
* @param page page
* @param size size
* @return string
* @param model model model
* @param page page
* @param size size
* @return admin/widget/_logs-all
*/
@GetMapping(value = "/logs")
public String logs(Model model,
@ -191,7 +194,7 @@ public class AdminController extends BaseController{
/**
*
*
* @return return
* @return /admin
*/
@GetMapping(value = "/logs/clear")
public String logsClear(){
@ -207,7 +210,7 @@ public class AdminController extends BaseController{
*
*
* @param model model
* @return string
* @return admin/admin_halo
*/
@GetMapping(value = "/halo")
public String halo(Model model){

View File

@ -58,7 +58,7 @@ public class AttachmentController {
* upload
*
* @param model model
* @return String
* @return admin/admin_attachment
*/
@GetMapping
public String attachments(Model model,
@ -78,8 +78,8 @@ public class AttachmentController {
*
*
* @param model model
* @param page page
* @return string
* @param page page
* @return admin/widget/_attachment-select
*/
@GetMapping(value = "/select")
public String selectAttachment(Model model,
@ -100,7 +100,9 @@ public class AttachmentController {
/**
*
*
* @param file file
* @param file
* @param request request
* @return Map
*/
@PostMapping(value = "/upload",produces = { "application/json;charset=UTF-8" })
@ResponseBody
@ -164,8 +166,9 @@ public class AttachmentController {
/**
*
*
* @param attachId attachId
* @return string
* @param model model
* @param attachId
* @return admin/widget/_attachment-detail
*/
@GetMapping(value = "/attachment")
public String attachmentDetail(Model model,@PathParam("attachId") Long attachId){
@ -180,8 +183,9 @@ public class AttachmentController {
/**
*
*
* @param attachId attachId
* @return string
* @param attachId
* @param request request
* @return truefalse
*/
@GetMapping(value = "/remove")
@ResponseBody

View File

@ -33,7 +33,7 @@ public class BackupController {
*
*
* @param model model
* @return return
* @return admin/admin_backup
*/
@GetMapping
public String backup(Model model){
@ -46,7 +46,7 @@ public class BackupController {
/**
*
*
* @return return
* @return /admin/backup
*/
@GetMapping(value = "/backupDb")
public String backupDatabase(){
@ -74,7 +74,7 @@ public class BackupController {
/**
* markdown
*
* @return return
* @return /admin/backup
*/
@GetMapping(value = "/backupPost")
public String backupPosts(){

View File

@ -31,7 +31,7 @@ public class CategoryController {
* category
*
* @param model model
* @return freemarker
* @return admin/admin_category
*/
@GetMapping
public String categories(Model model){
@ -47,7 +47,7 @@ public class CategoryController {
* /
*
* @param category category
* @return freemarker
* @return /admin/category
*/
@PostMapping(value = "/save")
public String saveCategory(@ModelAttribute Category category){
@ -62,8 +62,8 @@ public class CategoryController {
/**
*
*
* @param cateUrl cateUrl
* @return string
* @param cateUrl
* @return truefalse
*/
@GetMapping(value = "/checkUrl")
@ResponseBody
@ -80,7 +80,7 @@ public class CategoryController {
*
*
* @param cateId cateId
* @return freemarker
* @return /admin/category
*/
@GetMapping(value = "/remove")
public String removeCategory(@PathParam("cateId") Long cateId){
@ -98,7 +98,7 @@ public class CategoryController {
*
* @param cateId cateId
* @param model model
* @return String
* @return admin/admin_category
*/
@GetMapping(value = "/edit")
public String toEditCategory(Model model,@PathParam("cateId") Long cateId){

View File

@ -56,10 +56,10 @@ public class CommentController extends BaseController{
*
*
* @param model model
* @param status status
* @param page page
* @param size size
* @return string
* @param status status
* @param page page
* @param size size
* @return admin/admin_comment
*/
@GetMapping
public String comments(Model model,
@ -83,8 +83,9 @@ public class CommentController extends BaseController{
/**
*
*
* @param commentId commentId
* @return string
* @param commentId
* @param session session
* @return /admin/comments
*/
@GetMapping(value = "/throw")
public String moveToTrash(@PathParam("commentId") Long commentId,
@ -101,9 +102,10 @@ public class CommentController extends BaseController{
/**
*
*
* @param commentId commentId
* @param status status
* @return string
* @param commentId
* @param status
* @param session session
* @return /admin/comments
*/
@GetMapping("/revert")
public String moveToPublish(@PathParam("commentId") Long commentId,
@ -141,10 +143,10 @@ public class CommentController extends BaseController{
/**
*
*
* @param commentId commentId
* @param status status
* @param session session
* @return string
* @param commentId commentId
* @param status status
* @param session session session
* @return string /admin/comments
*/
@GetMapping("/remove")
public String moveToAway(@PathParam("commentId") Long commentId,
@ -165,7 +167,7 @@ public class CommentController extends BaseController{
*
* @param commentId
* @param commentContent
* @return string
* @return /admin/comments
*/
@PostMapping("/reply")
public String replyComment(@RequestParam("commentId") Long commentId,

View File

@ -30,7 +30,7 @@ public class MenuController {
*
*
* @param model model
* @return string
* @return /admin/admin_menu
*/
@GetMapping
public String menus(Model model){
@ -46,7 +46,7 @@ public class MenuController {
* /
*
* @param menu menu
* @return string
* @return /admin/menus
*/
@PostMapping(value = "/save")
public String saveMenu(@ModelAttribute Menu menu){
@ -60,9 +60,10 @@ public class MenuController {
/**
*
* @param id id
*
* @param menuId
* @param model model
* @return string
* @return /admin/admin_menu
*/
@GetMapping(value = "/edit")
public String updateMenu(@RequestParam("menuId") Long menuId,Model model){
@ -78,8 +79,9 @@ public class MenuController {
/**
*
* @param menuId menuId
* @return String
*
* @param menuId
* @return /admin/menus
*/
@GetMapping(value = "/remove")
public String removeMenu(@PathParam("menuId") Long menuId){

View File

@ -26,7 +26,8 @@ public class OptionController {
/**
* option
*
* @return freemarker
* @param model model
* @return admin/admin_option
*/
@GetMapping
public String options(Model model){
@ -39,6 +40,7 @@ public class OptionController {
*
*
* @param options options
* @return truefalse
*/
@PostMapping(value = "/save")
@ResponseBody

View File

@ -40,7 +40,7 @@ public class PageController {
*
*
* @param model model
* @return string
* @return admin/admin_page
*/
@GetMapping
public String pages(Model model){
@ -51,8 +51,8 @@ public class PageController {
/**
*
*
* @param map ModelMap
* @return String
* @param model model
* @return admin/admin_page_link
*/
@GetMapping(value = "/links")
public String links(Model model){
@ -69,8 +69,8 @@ public class PageController {
*
*
* @param model model
* @param linkId linkId
* @return String
* @param linkId linkId
* @return String admin/admin_page_link
*/
@GetMapping("/links/edit")
public String toEditLink(Model model,@PathParam("linkId") Long linkId){
@ -87,8 +87,8 @@ public class PageController {
/**
* /
*
* @param link Link
* @return freemarker
* @param link Link
* @return /admin/page/links
*/
@PostMapping(value = "/links/save")
public String saveLink(@ModelAttribute Link link){
@ -104,8 +104,8 @@ public class PageController {
/**
*
*
* @param linkId linkId
* @return String
* @param linkId
* @return /admin/page/links
*/
@GetMapping(value = "/links/remove")
public String removeLink(@PathParam("linkId") Long linkId){
@ -121,7 +121,10 @@ public class PageController {
/**
*
*
* @return String
* @param model model
* @param page
* @param size
* @return admin/admin_page_gallery
*/
@GetMapping(value = "/galleries")
public String gallery(Model model,
@ -139,7 +142,7 @@ public class PageController {
*
*
* @param gallery gallery
* @return string
* @return /admin/page/gallery
*/
@PostMapping(value = "/gallery/save")
public String saveGallery(@ModelAttribute Gallery gallery){
@ -158,8 +161,8 @@ public class PageController {
*
*
* @param model model
* @param galleryId galleryId
* @return string
* @param galleryId
* @return admin/widget/_gallery-detail
*/
@GetMapping(value = "/gallery")
public String gallery(Model model,@PathParam("galleryId") Long galleryId){
@ -173,8 +176,8 @@ public class PageController {
/**
*
*
* @param galleryId galleryId
* @return string
* @param galleryId
* @return truefalse
*/
@GetMapping(value = "/gallery/remove")
@ResponseBody

View File

@ -54,10 +54,10 @@ public class PostController extends BaseController{
/**
*
*
* @param model Model
* @param page Page
* @param size Size
* @return String
* @param model model
* @param page
* @param size
* @return admin/admin_post
*/
@GetMapping
public String posts(Model model,
@ -83,10 +83,10 @@ public class PostController extends BaseController{
*
*
* @param model Model
* @param keyword keyword
* @param page page
* @param size size
* @return freemarker
* @param keyword keyword
* @param page page
* @param size size
* @return admin/admin_post
*/
@PostMapping(value="/search")
public String searchPost(Model model,
@ -107,9 +107,9 @@ public class PostController extends BaseController{
/**
*
*
* @param postId postId
* @param postId
* @param model model
* @return freemarker
* @return /themes/{theme}/post
*/
@GetMapping(value = "/view")
public String viewPost(@PathParam("postId") Long postId,Model model){
@ -123,7 +123,8 @@ public class PostController extends BaseController{
/**
*
*
* @return freemarker
* @param model model
* @return admin/admin_editor
*/
@GetMapping(value = "/new")
public String newPost(Model model){
@ -144,7 +145,10 @@ public class PostController extends BaseController{
/**
*
*
* @param post Post
* @param post Post
* @param cateList
* @param tagList
* @param session session
*/
@PostMapping(value = "/new/push")
@ResponseBody
@ -178,8 +182,8 @@ public class PostController extends BaseController{
/**
*
*
* @param postId postId
* @return String
* @param postId
* @return /admin/posts
*/
@GetMapping("/throw")
public String moveToTrash(@RequestParam("postId") Long postId){
@ -195,8 +199,8 @@ public class PostController extends BaseController{
/**
*
*
* @param postId postId
* @return String
* @param postId
* @return /admin/posts
*/
@GetMapping("/revert")
public String moveToPublish(@RequestParam("postId") Long postId,
@ -213,8 +217,8 @@ public class PostController extends BaseController{
/**
*
*
* @param postId postId
* @return
* @param postId
* @return /admin/posts
*/
@GetMapping(value = "/remove")
public String removePost(@PathParam("postId") Long postId){
@ -231,9 +235,9 @@ public class PostController extends BaseController{
/**
*
*
* @param postId postId
* @param model Model
* @return String
* @param postId
* @param model model
* @return admin/admin_editor
*/
@GetMapping(value = "/edit")
public String editPost(@PathParam("postId") Long postId, Model model){
@ -254,8 +258,8 @@ public class PostController extends BaseController{
/**
*
*
* @param postSummary postSummary
* @return string
* @param postSummary
* @return truefalse
*/
@GetMapping(value = "/updateSummary")
@ResponseBody
@ -272,8 +276,8 @@ public class PostController extends BaseController{
/**
*
*
* @param postUrl postUrl
* @return String
* @param postUrl
* @return truefalse
*/
@GetMapping(value = "/checkUrl")
@ResponseBody

View File

@ -30,7 +30,7 @@ public class TagController {
*
*
* @param model model
* @return string
* @return admin/admin_tag
*/
@GetMapping
public String tags(Model model){
@ -46,7 +46,7 @@ public class TagController {
* /
*
* @param tag tag
* @return string
* @return /admin/tag
*/
@PostMapping(value = "/save")
public String saveTag(@ModelAttribute Tag tag){
@ -61,8 +61,8 @@ public class TagController {
/**
*
*
* @param tagUrl tagUrl
* @return string
* @param tagUrl
* @return truefalse
*/
@GetMapping(value = "/checkUrl")
@ResponseBody
@ -78,8 +78,8 @@ public class TagController {
/**
*
*
* @param tagId tagId
* @return string
* @param tagId
* @return /admin/tag
*/
@GetMapping(value = "/remove")
public String removeTag(@PathParam("tagId") Long tagId){
@ -96,8 +96,8 @@ public class TagController {
*
*
* @param model model
* @param tagId tagId
* @return string
* @param tagId
* @return admin/admin_tag
*/
@GetMapping(value = "/edit")
public String toEditTag(Model model,@PathParam("tagId") Long tagId){

View File

@ -43,7 +43,8 @@ public class ThemeController extends BaseController{
/**
*
*
* @return String
* @param model model
* @return admin/admin_theme
*/
@GetMapping
public String themes(Model model){
@ -59,7 +60,9 @@ public class ThemeController extends BaseController{
/**
*
*
* @param siteTheme siteTheme
* @param siteTheme
* @param request request
* @return truefalse
*/
@GetMapping(value = "/set")
@ResponseBody
@ -85,8 +88,8 @@ public class ThemeController extends BaseController{
/**
*
*
* @param file file
* @return String
* @param file
* @return boolean truefalse
*/
@RequestMapping(value = "/upload", method = RequestMethod.POST)
@ResponseBody
@ -108,14 +111,34 @@ public class ThemeController extends BaseController{
HaloConst.THEMES = HaloUtil.getThemes();
return true;
}else{
log.error("上传失败,没有选择文件");
log.error("上传主题失败,没有选择文件");
}
}catch (Exception e){
log.error("上传失败:{0}",e.getMessage());
log.error("上传主题失败:{0}",e.getMessage());
}
return false;
}
/**
*
*
* @param themeName
* @return string /admin/themes
*/
@GetMapping(value = "/remove")
public String removeTheme(@RequestParam("themeName") String themeName){
try{
File basePath = new File(ResourceUtils.getURL("classpath:").getPath());
File themePath = new File(basePath.getAbsolutePath(),"templates/themes/"+themeName);
HaloUtil.removeDir(themePath);
HaloConst.THEMES.clear();
HaloConst.THEMES = HaloUtil.getThemes();
}catch (Exception e){
log.error("删除主题失败:{0}",e.getMessage());
}
return "redirect:/admin/themes";
}
/**
*
*
@ -132,7 +155,8 @@ public class ThemeController extends BaseController{
/**
*
*
* @return string
* @param model model
* @return admin/admin_theme-editor
*/
@GetMapping(value = "/editor")
public String editor(Model model){
@ -146,7 +170,8 @@ public class ThemeController extends BaseController{
/**
*
*
* @return string
* @param tplName
* @return
*/
@GetMapping(value = "/getTpl",produces = "text/text;charset=UTF-8")
@ResponseBody
@ -167,9 +192,9 @@ public class ThemeController extends BaseController{
/**
*
*
* @param tplName tplName
* @param tplContent tplContent
* @return string
* @param tplName
* @param tplContent
* @return boolean truefalse
*/
@PostMapping(value = "/editor/save")
@ResponseBody

View File

@ -29,7 +29,8 @@ public class UserController {
/**
*
*
* @return string
* @param model model
* @return admin/admin_profile
*/
@GetMapping
public String profile(Model model){
@ -43,7 +44,8 @@ public class UserController {
*
*
* @param user user
* @return String
* @param session session
* @return truefalse
*/
@PostMapping(value = "save")
@ResponseBody
@ -65,9 +67,11 @@ public class UserController {
/**
*
*
* @param beforePass
* @param beforePass
* @param newPass
* @return String
* @param userId
* @param session session
* @return truefalse
*/
@PostMapping(value = "changePass")
@ResponseBody

View File

@ -112,7 +112,7 @@
<#if tags??>
<option value="">选择添加</option>
<#list tags as tag>
<option value="${tag.tagName}">${tag.tagName}</option>
<option value="${tag.tagName}">${tag.tagName}(${tag.posts?size})</option>
</#list>
<#else>
<option>暂无标签</option>

View File

@ -58,6 +58,9 @@
background: #3c8dbc;
color: #fff;
}
.btn-delete:hover{
color: red;
}
</style>
<section class="content-header">
<h1 style="display: inline-block;">主题设置</h1>
@ -85,7 +88,9 @@
<#list themes as theme>
<div class="col-md-3">
<div class="box box-solid">
<div class="box-body theme-thumbnail" style="background-image: url(/${theme.themeName?if_exists}/screenshot.png)"></div>
<div class="box-body theme-thumbnail" style="background-image: url(/${theme.themeName?if_exists}/screenshot.png)">
<div class="pull-right btn-delete" style="display: none" onclick="modelShow('/admin/themes/remove?themeName=${theme.themeName}')"><i class="fa fa-times fa-lg" aria-hidden="true"></i></div>
</div>
<div class="box-footer">
<span class="theme-title">${theme.themeName?if_exists?upper_case}</span>
<#if theme.hasOptions==true>
@ -112,6 +117,25 @@
</#if>
</div>
</section>
<!-- 删除确认弹出层 -->
<div class="modal fade" id="removeThemeModal">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body">
<p id="message">你确定要删除该主题?</p>
</div>
<div class="modal-footer">
<input type="hidden" id="url"/>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<a onclick="removeIt()" class="btn btn-danger" data-dismiss="modal">确定</a>
</div>
</div>
</div>
</div>
<script src="/static/plugins/toast/js/jquery.toast.min.js"></script>
<script src="/static/plugins/layer/layer.js"></script>
<script type="application/javascript">
@ -203,6 +227,20 @@
scrollbar: false
});
}
$('.theme-thumbnail').mouseover(function () {
$(this).children('.btn-delete').show();
});
$('.theme-thumbnail').mouseleave(function () {
$(this).children('.btn-delete').hide();
});
function modelShow(url) {
$('#url').val(url);
$('#removeThemeModal').modal();
}
function removeIt(){
var url=$.trim($("#url").val());
window.location.href=url;
}
</script>
</div>
<#include "module/_footer.ftl">

View File

@ -1,11 +1,17 @@
<#if (options.comment_system!)=='valine'>
<#include "../../../common/comment/_valine_comment.ftl">
<#elseif (options.comment_system!)=='disqus'>
<#include "../../../common/comment/_disqus_comment.ftl">
<#elseif (options.comment_system!)=='livere'>
<#include "../../../common/comment/_livere_comment.ftl">
<#elseif (options.comment_system!)=='changyan'>
<#include "../../../common/comment/_changyan_comment.ftl">
<#elseif (options.comment_system!)=='native'>
<#switch options.comment_system>
<#case "native">
<#include "../../../common/comment/_native_comment.ftl">
</#if>
<#break >
<#case "valine">
<#include "../../../common/comment/_valine_comment.ftl">
<#break >
<#case "disqus">
<#include "../../../common/comment/_disqus_comment.ftl">
<#break >
<#case "livere">
<#include "../../../common/comment/_livere_comment.ftl">
<#break >
<#case "changyan">
<#include "../../../common/comment/_changyan_comment.ftl">
<#break >
</#switch>

View File

@ -20,10 +20,12 @@
<span class="date">${post.postDate?string("yyyy-MM-dd")}</span>
<i class="fa fa-comment-o"></i>
<a href="/post/${post.postUrl}#comment_widget">Comments</a>
<i class="fa fa-tag"></i>
<a href="/tags/App" class="tag">&nbsp;App</a>
<a href="/tags/Evernote" class="tag">&nbsp;Evernote</a>
<a href="/tags/Mac" class="tag">&nbsp;Mac</a>
<if post.tags??>
<i class="fa fa-tag"></i>
<#list post.tags as tag>
<a href="/tags/${tag.tagUrl}" class="tag">&nbsp;${tag.tagName}</a>
</#list>
</if>
</div>
</div>
</div>

View File

@ -6,7 +6,7 @@
<a href="/">${options.site_title?default("ANATOLE")}</a>
</h3>
<div class="description">
<p>${user.userDesc?default("A other farbox theme")}</p>
<p>${user.userDesc?default("A other Halo theme")}</p>
</div>
</div>
</div>

View File

@ -22,10 +22,12 @@
<span class="date">${post.postDate?string("yyyy-MM-dd")}</span>
<i class="fa fa-comment-o"></i>
<a href="/post/${post.postUrl}#comment_widget">Comments</a>
<i class="fa fa-tag"></i>
<a href="/tags/App" class="tag">&nbsp;App</a>
<a href="/tags/Evernote" class="tag">&nbsp;Evernote</a>
<a href="/tags/Mac" class="tag">&nbsp;Mac</a>
<if post.tags??>
<i class="fa fa-tag"></i>
<#list post.tags as tag>
<a href="/tags/${tag.tagUrl}" class="tag">&nbsp;${tag.tagName}</a>
</#list>
</if>
</div>
</div>
</div>

View File

@ -1,11 +1,17 @@
<#if (options.comment_system!)=='valine'>
<#include "../../../common/comment/_valine_comment.ftl">
<#elseif (options.comment_system!)=='disqus'>
<#include "../../../common/comment/_disqus_comment.ftl">
<#elseif (options.comment_system!)=='livere'>
<#include "../../../common/comment/_livere_comment.ftl">
<#elseif (options.comment_system!)=='changyan'>
<#include "../../../common/comment/_changyan_comment.ftl">
<#elseif (options.comment_system!)=='native'>
<#include "../../../common/comment/_native_comment.ftl">
</#if>
<#switch options.comment_system>
<#case "native">
<#include "../../../common/comment/_native_comment.ftl">
<#break >
<#case "valine">
<#include "../../../common/comment/_valine_comment.ftl">
<#break >
<#case "disqus">
<#include "../../../common/comment/_disqus_comment.ftl">
<#break >
<#case "livere">
<#include "../../../common/comment/_livere_comment.ftl">
<#break >
<#case "changyan">
<#include "../../../common/comment/_changyan_comment.ftl">
<#break >
</#switch>