From edefe092f4ebd6c09f45ded00c46d7fbe70353ac Mon Sep 17 00:00:00 2001 From: RYAN0UP_ Date: Sun, 6 May 2018 19:57:07 +0800 Subject: [PATCH] :alien: 0.0.2 --- bin/halo.sh | 2 +- pom.xml | 2 +- .../ryanc/halo/repository/PostRepository.java | 23 +++++- .../cc/ryanc/halo/service/PostService.java | 19 +++++ .../halo/service/impl/PostServiceImpl.java | 25 +++++++ .../web/controller/admin/PageController.java | 2 +- .../front/CategoriesController.java | 52 ++++++++++++- .../web/controller/front/IndexController.java | 14 ++++ .../web/controller/front/TagsController.java | 2 +- src/main/resources/application.yaml | 2 +- .../resources/templates/admin/admin_page.ftl | 2 +- .../templates/admin/admin_page_gallery.ftl | 2 +- .../admin/widget/_gallery-detail.ftl | 15 +++- .../themes/anatole/{tags.ftl => tag.ftl} | 0 .../material/_partial/Paradox-search.ftl | 30 +------- .../material/_partial/sidebar-navigation.ftl | 2 +- .../_widget/comment/changyan/common.ejs | 4 - .../_widget/comment/changyan/enter.ejs | 10 --- .../_widget/comment/changyan/main.ejs | 9 --- .../_widget/comment/disqus/common.ejs | 2 - .../material/_widget/comment/disqus/enter.ejs | 10 --- .../material/_widget/comment/disqus/main.ejs | 18 ----- .../_widget/comment/disqus_click/common.ejs | 1 - .../_widget/comment/disqus_click/enter.ejs | 10 --- .../_widget/comment/disqus_click/main.ejs | 73 ------------------- .../_widget/comment/gitalk/common.ejs | 1 - .../material/_widget/comment/gitalk/enter.ejs | 10 --- .../material/_widget/comment/gitalk/main.ejs | 19 ----- .../_widget/comment/gitment/common.ejs | 1 - .../_widget/comment/gitment/enter.ejs | 24 ------ .../material/_widget/comment/gitment/main.ejs | 2 - .../_widget/comment/livere/common.ejs | 0 .../material/_widget/comment/livere/enter.ejs | 10 --- .../material/_widget/comment/livere/main.ejs | 12 --- .../_widget/comment/valine/common.ejs | 0 .../material/_widget/comment/valine/enter.ejs | 2 - .../material/_widget/comment/valine/main.ejs | 21 ------ .../themes/material/_widget/page-links.ftl | 10 ++- .../material/_widget/search-local-js.ftl | 1 + .../templates/themes/material/archives.ftl | 5 -- .../templates/themes/material/category.ftl | 22 ++++++ .../templates/themes/material/tag.ftl | 22 ++++++ 42 files changed, 200 insertions(+), 293 deletions(-) rename src/main/resources/templates/themes/anatole/{tags.ftl => tag.ftl} (100%) delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/changyan/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/changyan/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/changyan/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus_click/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus_click/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/disqus_click/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitalk/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitalk/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitalk/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitment/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitment/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/gitment/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/livere/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/livere/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/livere/main.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/valine/common.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/valine/enter.ejs delete mode 100644 src/main/resources/templates/themes/material/_widget/comment/valine/main.ejs create mode 100644 src/main/resources/templates/themes/material/category.ftl create mode 100644 src/main/resources/templates/themes/material/tag.ftl diff --git a/bin/halo.sh b/bin/halo.sh index 427704ed2..4defc72e2 100644 --- a/bin/halo.sh +++ b/bin/halo.sh @@ -1,5 +1,5 @@ #!/bin/bash -APP_NAME=halo-0.0.1.jar +APP_NAME=halo-0.0.2.jar usage() { echo "用法: sh halo.sh [start(启动)|stop(停止)|restart(重启)|status(状态)]" diff --git a/pom.xml b/pom.xml index 73c3fa8ec..bf28c35dd 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 cc.ryanc halo - 0.0.1 + 0.0.2 halo diff --git a/src/main/java/cc/ryanc/halo/repository/PostRepository.java b/src/main/java/cc/ryanc/halo/repository/PostRepository.java index 0ad49275a..b864530aa 100644 --- a/src/main/java/cc/ryanc/halo/repository/PostRepository.java +++ b/src/main/java/cc/ryanc/halo/repository/PostRepository.java @@ -147,14 +147,33 @@ public interface PostRepository extends JpaRepository{ @Query(value = "select * from halo_post where post_status=0 and post_type='post' and year(post_date)=:year and month(post_date)=:month order by post_date desc",countQuery = "select count(*) from halo_post where post_status=0 and year(post_date)=:year and month(post_date)=:month",nativeQuery = true) Page findPostByYearAndMonth(@Param("year") String year,@Param("month") String month,Pageable pageable); - List findPostByCategories(Category category); + /** + * 根据分类目录查询文章 + * + * @param category category + * @param pageable pageable + * @return Page + */ + Page findPostByCategories(Category category,Pageable pageable); /** * 根据标签查询文章 * * @param tag tag * @param pageable pageable - * @return page + * @return Page */ Page findPostsByTags(Tag tag,Pageable pageable); + + /** + * 模糊查询文章 + * + * @param postType 文章类型,post or page + * @param postStatus 0,1,2 + * @param keyword 关键词 + * @param pageable 分页信息 + * @return Page + */ + @Query(value = "select * from halo_post where post_status = 0 and post_type='post' and post_title like '%=:keyword%' or post_content like '%=:keyword%'",nativeQuery = true) + Page findPostByPostTitleLikeOrPostContentLikeAndPostTypeAndPostStatus(String keyword,Pageable pageable); } diff --git a/src/main/java/cc/ryanc/halo/service/PostService.java b/src/main/java/cc/ryanc/halo/service/PostService.java index dedf68c12..65a58663b 100755 --- a/src/main/java/cc/ryanc/halo/service/PostService.java +++ b/src/main/java/cc/ryanc/halo/service/PostService.java @@ -1,5 +1,6 @@ package cc.ryanc.halo.service; +import cc.ryanc.halo.model.domain.Category; import cc.ryanc.halo.model.domain.Post; import cc.ryanc.halo.model.domain.Tag; import cc.ryanc.halo.model.dto.Archive; @@ -175,6 +176,15 @@ public interface PostService { */ List findPostByYear(String year); + /** + * 根据分类目录查询文章 + * + * @param category category + * @param pageable pageable + * @return Page + */ + Page findPostByCategories(Category category,Pageable pageable); + /** * 根据标签查询文章 * @@ -184,6 +194,15 @@ public interface PostService { */ Page findPostsByTags(Tag tag, Pageable pageable); + /** + * 搜索文章 + * + * @param keyword 关键词 + * @param pageable 分页信息 + * @return Page + */ + Page searchByKeywords(String keyword,Pageable pageable); + /** * 生成rss * diff --git a/src/main/java/cc/ryanc/halo/service/impl/PostServiceImpl.java b/src/main/java/cc/ryanc/halo/service/impl/PostServiceImpl.java index db6c43110..2f3782160 100755 --- a/src/main/java/cc/ryanc/halo/service/impl/PostServiceImpl.java +++ b/src/main/java/cc/ryanc/halo/service/impl/PostServiceImpl.java @@ -1,5 +1,6 @@ package cc.ryanc.halo.service.impl; +import cc.ryanc.halo.model.domain.Category; import cc.ryanc.halo.model.domain.Post; import cc.ryanc.halo.model.domain.Tag; import cc.ryanc.halo.model.dto.Archive; @@ -277,6 +278,18 @@ public class PostServiceImpl implements PostService { return postRepository.findPostByYearAndMonth(year, month, null); } + /** + * 根据分类目录查询文章 + * + * @param category category + * @param pageable pageable + * @return Page + */ + @Override + public Page findPostByCategories(Category category, Pageable pageable) { + return postRepository.findPostByCategories(category,pageable); + } + /** * 根据标签查询文章 * @@ -289,6 +302,18 @@ public class PostServiceImpl implements PostService { return postRepository.findPostsByTags(tag, pageable); } + /** + * 搜索文章 + * + * @param keyword 关键词 + * @param pageable 分页信息 + * @return List + */ + @Override + public Page searchByKeywords(String keyword,Pageable pageable) { + return postRepository.findPostByPostTitleLikeOrPostContentLikeAndPostTypeAndPostStatus(keyword,pageable); + } + /** * 生成rss * diff --git a/src/main/java/cc/ryanc/halo/web/controller/admin/PageController.java b/src/main/java/cc/ryanc/halo/web/controller/admin/PageController.java index d9cac6e5a..043444c4b 100755 --- a/src/main/java/cc/ryanc/halo/web/controller/admin/PageController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/admin/PageController.java @@ -164,7 +164,7 @@ public class PageController { } catch (Exception e) { e.printStackTrace(); } - return "redirect:/admin/page/gallery"; + return "redirect:/admin/page/galleries"; } /** diff --git a/src/main/java/cc/ryanc/halo/web/controller/front/CategoriesController.java b/src/main/java/cc/ryanc/halo/web/controller/front/CategoriesController.java index 3dbc6321f..895c3bc40 100644 --- a/src/main/java/cc/ryanc/halo/web/controller/front/CategoriesController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/front/CategoriesController.java @@ -1,6 +1,17 @@ package cc.ryanc.halo.web.controller.front; +import cc.ryanc.halo.model.domain.Category; import cc.ryanc.halo.model.domain.Post; +import cc.ryanc.halo.model.dto.HaloConst; +import cc.ryanc.halo.service.CategoryService; +import cc.ryanc.halo.service.PostService; +import cc.ryanc.halo.web.controller.core.BaseController; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @@ -16,7 +27,19 @@ import java.util.List; */ @Controller @RequestMapping(value = "categories") -public class CategoriesController { +public class CategoriesController extends BaseController { + + @Autowired + private CategoryService categoryService; + + @Autowired + private PostService postService; + + public String categories(Model model){ + List categories = categoryService.findAllCategories(); + model.addAttribute("categories",categories); + return this.render("categories"); + } /** * 根据分类路径查询文章 @@ -28,7 +51,30 @@ public class CategoriesController { @GetMapping(value = "{cateUrl}") public String categories(Model model, @PathVariable("cateUrl") String cateUrl) { - List posts; - return null; + return this.categories(model,cateUrl,1); + } + + /** + * 根据分类目录查询所有文章 分页 + * + * @param model model + * @param cateUrl 分类目录路径 + * @param page 页码 + * @return string + */ + public String categories(Model model, + @PathVariable("cateUrl") String cateUrl, + @PathVariable("page") Integer page){ + Category category = categoryService.findByCateUrl(cateUrl); + Sort sort = new Sort(Sort.Direction.DESC,"postDate"); + Integer size = 10; + if(!StringUtils.isBlank(HaloConst.OPTIONS.get("index_posts"))){ + size = Integer.parseInt(HaloConst.OPTIONS.get("index_posts")); + } + Pageable pageable = new PageRequest(page-1,size,sort); + Page posts = postService.findPostByCategories(category,pageable); + model.addAttribute("posts",posts); + model.addAttribute("category",category); + return this.render("category"); } } diff --git a/src/main/java/cc/ryanc/halo/web/controller/front/IndexController.java b/src/main/java/cc/ryanc/halo/web/controller/front/IndexController.java index a17fd5624..56334718c 100644 --- a/src/main/java/cc/ryanc/halo/web/controller/front/IndexController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/front/IndexController.java @@ -94,4 +94,18 @@ public class IndexController extends BaseController { List posts = postService.findPostByStatus(0, HaloConst.POST_TYPE_POST, pageable).getContent(); return posts; } + + /** + * 搜索文章 + * + * @param keyword keyword + * @param model model + * @return 模板路径/themes/{theme}/index + */ + @GetMapping(value = "search") + public String search(@PathParam("keyword") String keyword,Model model){ + Page posts = postService.searchByKeywords(keyword,null); + model.addAttribute("posts",posts); + return this.render("index"); + } } diff --git a/src/main/java/cc/ryanc/halo/web/controller/front/TagsController.java b/src/main/java/cc/ryanc/halo/web/controller/front/TagsController.java index ac7c65978..3fafd271c 100644 --- a/src/main/java/cc/ryanc/halo/web/controller/front/TagsController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/front/TagsController.java @@ -84,6 +84,6 @@ public class TagsController extends BaseController { Page posts = postService.findPostsByTags(tag, pageable); model.addAttribute("posts", posts); model.addAttribute("tag", tag); - return this.render("tags"); + return this.render("tag"); } } diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 57f53c377..fce080e88 100755 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -28,7 +28,7 @@ spring: jpa: hibernate: ddl-auto: update - show-sql: false + show-sql: true freemarker: allow-request-override: false cache: false diff --git a/src/main/resources/templates/admin/admin_page.ftl b/src/main/resources/templates/admin/admin_page.ftl index 2b319af0c..1bc23bf24 100755 --- a/src/main/resources/templates/admin/admin_page.ftl +++ b/src/main/resources/templates/admin/admin_page.ftl @@ -98,7 +98,7 @@ <#else> - 暂无页面 + 暂无页面 diff --git a/src/main/resources/templates/admin/admin_page_gallery.ftl b/src/main/resources/templates/admin/admin_page_gallery.ftl index e18e2d6cd..2d5b746f4 100644 --- a/src/main/resources/templates/admin/admin_page_gallery.ftl +++ b/src/main/resources/templates/admin/admin_page_gallery.ftl @@ -77,7 +77,7 @@
- +
diff --git a/src/main/resources/templates/admin/widget/_gallery-detail.ftl b/src/main/resources/templates/admin/widget/_gallery-detail.ftl index 6347c618c..341f02324 100644 --- a/src/main/resources/templates/admin/widget/_gallery-detail.ftl +++ b/src/main/resources/templates/admin/widget/_gallery-detail.ftl @@ -35,25 +35,31 @@
- +
- +
- +
- + +
+
+
+ +
+
@@ -115,6 +121,7 @@ } function btn_save() { $('#galleryForm').submit(); + parent.location.reload(); } \ No newline at end of file diff --git a/src/main/resources/templates/themes/anatole/tags.ftl b/src/main/resources/templates/themes/anatole/tag.ftl similarity index 100% rename from src/main/resources/templates/themes/anatole/tags.ftl rename to src/main/resources/templates/themes/anatole/tag.ftl diff --git a/src/main/resources/templates/themes/material/_partial/Paradox-search.ftl b/src/main/resources/templates/themes/material/_partial/Paradox-search.ftl index 1ac4e8a61..11b4c458a 100644 --- a/src/main/resources/templates/themes/material/_partial/Paradox-search.ftl +++ b/src/main/resources/templates/themes/material/_partial/Paradox-search.ftl @@ -4,36 +4,10 @@ search -
- + + -
- diff --git a/src/main/resources/templates/themes/material/_partial/sidebar-navigation.ftl b/src/main/resources/templates/themes/material/_partial/sidebar-navigation.ftl index bef991c05..f4656f7bf 100644 --- a/src/main/resources/templates/themes/material/_partial/sidebar-navigation.ftl +++ b/src/main/resources/templates/themes/material/_partial/sidebar-navigation.ftl @@ -53,7 +53,7 @@ <@commonTag method="categories"> <#list categories as cate>
  • - ${cate.cateName}4 + ${cate.cateName}${cate.posts?size}
  • diff --git a/src/main/resources/templates/themes/material/_widget/comment/changyan/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/changyan/common.ejs deleted file mode 100644 index 1e73fdb19..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/changyan/common.ejs +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/changyan/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/changyan/enter.ejs deleted file mode 100644 index 457ff3d5f..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/changyan/enter.ejs +++ /dev/null @@ -1,10 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/changyan/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/changyan/main.ejs deleted file mode 100644 index ae954bcaa..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/changyan/main.ejs +++ /dev/null @@ -1,9 +0,0 @@ - -
    <%= page.id %><% } else { %><%= page.path %><% } %>" >
    - diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus/common.ejs deleted file mode 100644 index a0d8f5dd3..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus/common.ejs +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus/enter.ejs deleted file mode 100644 index 352be189e..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus/enter.ejs +++ /dev/null @@ -1,10 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus/main.ejs deleted file mode 100644 index 685b703bf..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus/main.ejs +++ /dev/null @@ -1,18 +0,0 @@ -
    - - diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus_click/common.ejs deleted file mode 100644 index ab22ee869..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/common.ejs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus_click/enter.ejs deleted file mode 100644 index 1ef52f01f..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/enter.ejs +++ /dev/null @@ -1,10 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/disqus_click/main.ejs deleted file mode 100644 index 4d9232dd6..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/disqus_click/main.ejs +++ /dev/null @@ -1,73 +0,0 @@ -
    - - - - -
    - -
    - - - - - diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitalk/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitalk/common.ejs deleted file mode 100644 index c1f700678..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitalk/common.ejs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitalk/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitalk/enter.ejs deleted file mode 100644 index e39b96eef..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitalk/enter.ejs +++ /dev/null @@ -1,10 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitalk/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitalk/main.ejs deleted file mode 100644 index ff346681d..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitalk/main.ejs +++ /dev/null @@ -1,19 +0,0 @@ - -
    - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitment/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitment/common.ejs deleted file mode 100644 index bcf86a321..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitment/common.ejs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitment/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitment/enter.ejs deleted file mode 100644 index 80156bea7..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitment/enter.ejs +++ /dev/null @@ -1,24 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - - - - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/gitment/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/gitment/main.ejs deleted file mode 100644 index c5bdd6460..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/gitment/main.ejs +++ /dev/null @@ -1,2 +0,0 @@ - -
    \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/livere/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/livere/common.ejs deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/templates/themes/material/_widget/comment/livere/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/livere/enter.ejs deleted file mode 100644 index dfcc2e966..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/livere/enter.ejs +++ /dev/null @@ -1,10 +0,0 @@ - -
    - <%- partial('_widget/comment/' + theme.comment.use + '/main') %> -
    - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/livere/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/livere/main.ejs deleted file mode 100644 index 338e3512b..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/livere/main.ejs +++ /dev/null @@ -1,12 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/valine/common.ejs b/src/main/resources/templates/themes/material/_widget/comment/valine/common.ejs deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/templates/themes/material/_widget/comment/valine/enter.ejs b/src/main/resources/templates/themes/material/_widget/comment/valine/enter.ejs deleted file mode 100644 index 9841838d5..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/valine/enter.ejs +++ /dev/null @@ -1,2 +0,0 @@ -
    -<%- partial('_widget/comment/' + theme.comment.use + '/main') %> \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/comment/valine/main.ejs b/src/main/resources/templates/themes/material/_widget/comment/valine/main.ejs deleted file mode 100644 index 7622365ac..000000000 --- a/src/main/resources/templates/themes/material/_widget/comment/valine/main.ejs +++ /dev/null @@ -1,21 +0,0 @@ - - - \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/_widget/page-links.ftl b/src/main/resources/templates/themes/material/_widget/page-links.ftl index 15e7c1f38..614e1bc2d 100644 --- a/src/main/resources/templates/themes/material/_widget/page-links.ftl +++ b/src/main/resources/templates/themes/material/_widget/page-links.ftl @@ -69,7 +69,7 @@ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); } - .md-links-item a:hover{ + .md-links-item a:hover { cursor: pointer; } @@ -78,10 +78,11 @@ line-height: 50px; } - #scheme-Paradox .mdl-mini-footer{ + #scheme-Paradox .mdl-mini-footer { clear: left; } - #bottom{ + + #bottom { position: relative; } @@ -91,7 +92,7 @@ @@ -108,4 +109,5 @@ $(document).ready(function() { adjustFooter(); }); + diff --git a/src/main/resources/templates/themes/material/_widget/search-local-js.ftl b/src/main/resources/templates/themes/material/_widget/search-local-js.ftl index 69095527f..892363c3e 100644 --- a/src/main/resources/templates/themes/material/_widget/search-local-js.ftl +++ b/src/main/resources/templates/themes/material/_widget/search-local-js.ftl @@ -1,3 +1,4 @@ \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/archives.ftl b/src/main/resources/templates/themes/material/archives.ftl index f8f86e85f..8c3c3e0d4 100644 --- a/src/main/resources/templates/themes/material/archives.ftl +++ b/src/main/resources/templates/themes/material/archives.ftl @@ -2,11 +2,6 @@ <@layout title="归档 | ${options.blog_title?default('Material')}" keywords="${options.seo_keywords?default('Material')}" description="${options.seo_desc?default('Material')}">
    - <#if options.theme_material_scheme?if_exists == "Paradox" && posts.number==0 && !isArchives??> - - <#include "_partial/daily_pic.ftl"> - <#include "_partial/blog_info.ftl"> -
    diff --git a/src/main/resources/templates/themes/material/category.ftl b/src/main/resources/templates/themes/material/category.ftl new file mode 100644 index 000000000..8eb673ac5 --- /dev/null +++ b/src/main/resources/templates/themes/material/category.ftl @@ -0,0 +1,22 @@ +<#include "module/macro.ftl"> +<@layout title="分类目录:${category.cateName} | ${options.blog_title?default('Material')}" keywords="${options.seo_keywords?default('Material')}}" description="${options.seo_desc?default('Material')}}"> + +
    +
    + + + + <#if options.theme_material_scheme?default('Paradox') == "Paradox"> + + <#include "_partial/Paradox-post_entry.ftl"> + <#else> + + <#include "_partial/Isolation-post_entry.ftl"> + + <#include "_partial/index-nav.ftl"> + <@nav url="/"> + <#if options.theme_material_scheme?default('Paradox') == "Paradox"> + <#include "_partial/Paradox-post_entry-thumbnail.ftl"> + +
    + \ No newline at end of file diff --git a/src/main/resources/templates/themes/material/tag.ftl b/src/main/resources/templates/themes/material/tag.ftl new file mode 100644 index 000000000..a6d23f3b8 --- /dev/null +++ b/src/main/resources/templates/themes/material/tag.ftl @@ -0,0 +1,22 @@ +<#include "module/macro.ftl"> +<@layout title="标签:${tag.tagName} | ${options.blog_title?default('Material')}" keywords="${options.seo_keywords?default('Material')}}" description="${options.seo_desc?default('Material')}}"> + +
    +
    + + + + <#if options.theme_material_scheme?default('Paradox') == "Paradox"> + + <#include "_partial/Paradox-post_entry.ftl"> + <#else> + + <#include "_partial/Isolation-post_entry.ftl"> + + <#include "_partial/index-nav.ftl"> + <@nav url="/"> + <#if options.theme_material_scheme?default('Paradox') == "Paradox"> + <#include "_partial/Paradox-post_entry-thumbnail.ftl"> + +
    + \ No newline at end of file