- <%- page.content %>
-
+
+
+
+
+
-
\ No newline at end of file
diff --git a/layout/_partial/post_head.ejs b/layout/_partial/post_head.ejs
index 3c452a3..69382e2 100644
--- a/layout/_partial/post_head.ejs
+++ b/layout/_partial/post_head.ejs
@@ -1,32 +1,40 @@
-
+ <%- page.content %>
+
+
-
-
-
+
- <%= item.name %> <% }) %> <% } %>
-
- <%= category.name %> - --
-
- <% category.posts.map(function(post){ %>
-
- <%- post.title %> - <% }) %> -
- <% }) %>
-
+
+
-
<% if(page.tags && page.tags.data.length) { %>
<% page.tags.data.forEach((item, index) => { %>
<%- page.title %>
-
-
+
+
diff --git a/layout/_partial/post_pn.ejs b/layout/_partial/post_paging.ejs
similarity index 77%
rename from layout/_partial/post_pn.ejs
rename to layout/_partial/post_paging.ejs
index 8439b1f..94d77cb 100644
--- a/layout/_partial/post_pn.ejs
+++ b/layout/_partial/post_paging.ejs
@@ -1,7 +1,7 @@
-
<% if(theme.is_article_img) { %>
-
- <% }else{ %>
-
+
+ <% }else{ %>
+
<% } %>
- <%- theme.author %>
+ <%- page.aubot ? page.aubot : theme.author %>
+
+ <% page.categories.data.map((cat)=>{ %>
+ <%- cat.name %>
+ <% }) %>
+
<%- date(page.date, "YYYY-MM-DD HH:mm:ss") %>
+
<% if(page.prev) {%>
-
+
上一篇
@@ -10,7 +10,7 @@
<% if(page.next) {%>
- <%= page.prev.title %>
+
下一篇
diff --git a/layout/_widget/comment.ejs b/layout/_widget/comment.ejs
new file mode 100644
index 0000000..8ffbf49
--- /dev/null
+++ b/layout/_widget/comment.ejs
@@ -0,0 +1,12 @@
+<% if(theme.gitalk.clientID && theme.gitalk.clientSecret) { %>
+
+
+<% } %>
\ No newline at end of file
diff --git a/layout/_widget/gotop.ejs b/layout/_widget/gotop.ejs
index b6a6616..01d698c 100644
--- a/layout/_widget/gotop.ejs
+++ b/layout/_widget/gotop.ejs
@@ -1,20 +1,21 @@
-<%- js('js/jquery.min.js') %>
<%- js('js/gotop.js') %>
\ No newline at end of file
diff --git a/layout/about.ejs b/layout/about.ejs
index 5bcbd00..85ee7b4 100644
--- a/layout/about.ejs
+++ b/layout/about.ejs
@@ -1,22 +1,18 @@
-<%- css('css/about.css') %>
<%- partial('_partial/header',{name:'about'}) %>
-<%- css('css/atom-one-dark.css') %>
-<%= page.next.title %>
-
-
-
<%- page.aubot %> - <%- page.describe %> -
+
+
-
-
+
+
+
+
+
+ <%- page.aubot %> + <%- page.describe %> +
+
+
+ <%- page.content %>
+
+
- <%- css('css/page_cente.css') %>
-
-
-
\ No newline at end of file
diff --git a/layout/archive.ejs b/layout/archive.ejs
index 88761f6..44b35ce 100644
--- a/layout/archive.ejs
+++ b/layout/archive.ejs
@@ -1,54 +1,55 @@
-<%
-if(is_archive()){
- page.title = __('文章归档')
- }
-%>
-<%- css('css/archive.css') %>
-<%- partial('_partial/header',{name:'archive'}) %>
-<%
-var years = {};
-var PageNum = 0;
-var PageYear = 0;
-site.posts.sort('date').reverse().forEach(function(post){
- var year = post.date.year()
- if(years[year]===undefined){
- years[year] = [];
- PageYear += 1;
- }
- years[year].push(post);
- PageNum += 1;
-});
-%>
-
- <%- page.content %>
-
-
-
-
-
-
-
-
-居然用了 <%- PageYear %> 年一共才写了 <%- PageNum %> 篇文章!
-
-
- <% Object.keys(years).reverse().forEach(function(year){ %>
-
+<% if(is_archive()){ %>
+ <% page.title = __('文章归档') %>
+ <%- partial('_partial/header',{name:'archive'}) %>
+ <%
+ var years = {};
+ var PageNum = 0;
+ var PageYear = 0;
+ site.posts.sort('date').reverse().forEach(function(post){
+ var year = post.date.year()
+ if(years[year]===undefined){
+ years[year] = [];
+ PageYear += 1;
+ }
+ years[year].push(post);
+ PageNum += 1;
+ });
+ %>
+<% }else if(is_category()){ %>
+ <% page.title = __("文章分类:" + page.category) %>
+ <%- partial('_partial/header',{name:'categories'}) %>
+ <%
+ var years = {};
+ site.posts.sort('date').reverse().forEach(function(post){
+ const categorys = post.categories;
+ if(categorys.length < 1) return
+ categorys.data.map((cat)=>{
+ if(page.category === cat.name){
+ var year = post.date.year()
+ if(years[year]===undefined){
+ years[year] = [];
+ }
+ years[year].push(post);
+ }
+ })
+ });
+ %>
+<% } %>
+
+
+- <%= year %> -
- <% years[year].map(function(post){ %> - - <%- (post.title || "Untitled").replace(/[<>&"]/g,function(c){ - return {'<':'<','>':'>','&':'&','"':'"'}[c]; - }) %> - - - <% }) %> - <% }) %> -
+ <% if(is_archive()){ %>
+ <%- partial('_widget/header_body',{message:theme.headers.archives.message.replace('year', PageYear).replace('number', PageNum),icon:theme.headers.archives.icon}) %>
+ <% }else if(is_category()){%>
+ <%- partial('_widget/header_body',{message:"文章分类:"+page.category,icon:theme.headers.categories.icon}) %>
+ <% } %>
+
-
-
\ No newline at end of file
diff --git a/layout/categories.ejs b/layout/categories.ejs
index ad24547..c5469aa 100644
--- a/layout/categories.ejs
+++ b/layout/categories.ejs
@@ -1,34 +1,23 @@
<%- partial('_partial/header',{name:'categories'}) %>
-<%- css('css/categories.css') %>
-
+
+ <%- partial('_widget/grouping',{data:years,keys:Object.keys(years).reverse()}) %>
+
+
-
-
-
-
-
\ No newline at end of file
diff --git a/layout/index.ejs b/layout/index.ejs
index a6f830d..291d8c9 100644
--- a/layout/index.ejs
+++ b/layout/index.ejs
@@ -1,3 +1,2 @@
-<%- css('css/home.css') %>
<%- partial('_partial/header',{name:'home'}) %>
<%- partial('_partial/home') %>
\ No newline at end of file
diff --git a/layout/layout.ejs b/layout/layout.ejs
index 7a75e61..56a9cd9 100644
--- a/layout/layout.ejs
+++ b/layout/layout.ejs
@@ -1,6 +1,5 @@
-
<%- partial('_partial/head') %>
@@ -9,5 +8,5 @@
<%- body %>
<%- partial('_partial/foot') %>
+文章分类
+ +
+ <%- partial('_widget/header_body',{message:theme.headers.categories.message,icon:theme.headers.categories.icon}) %>
+
-
+
-
+
+ <% site.categories.map(function(category,index){ %>
+
+ <%= category.name %>
+
+
+
+ <%= category.length %> 篇
+
+
+
+ <% }) %>
+
-
-
\ No newline at end of file
+
-
--
- <% site.categories.map(function(category){ %>
-