- <%- post.author || '柠烟夏季' %> 发表于
+ <%- post.author || config.author %> 发表于
<%- partial('post/date', { date_format: 'YYYY-MM-DD' }) %>
diff --git a/themes/hexo-theme-xups/layout/_partial/archive.ejs b/themes/hexo-theme-xups/layout/_partial/archive.ejs
index ad0a07c..d1543aa 100644
--- a/themes/hexo-theme-xups/layout/_partial/archive.ejs
+++ b/themes/hexo-theme-xups/layout/_partial/archive.ejs
@@ -1,27 +1,64 @@
-<% if (index == true) { %>
-
-
- <% if (pagination == 2) { %>
- 最近动态
- <% } else if (pagination == 3) { %>
- 文章归档
- <% } else if (pagination == 4) { %>
- `<%- page.category %>`分类下的文章
- <% } else if (pagination == 5) { %>
- `<%- page.tag %>`标签下的文章
- <% } %>
-
-
- <% page.posts.each(function(post) { %>
- <%- partial('archive-post', { post: post }) %>
- <% }) %>
-
- <% if (page.total >= 1){ %>
-
+
+
+ <% if (pagination == 1) { %>
+ 最近动态
+ <% } else if (pagination == 2) { %>
+ <%- page.category %> 分类下的文章
+ <% } else if (pagination == 3) { %>
+ <%- page.tag %> 标签下的文章
+ <% } else { %>
+ 文章归档
<% } %>
+
+
+<%
+if(pagination) {
+ page.posts.each(function(post) {
+ %>
+ <%-partial('archive-post', { post: post }) %>
+ <%
+ })
+} else {
+ let lastYear, lastMonth;
+
+ let currentPosts = [];
+ site.posts.each(function(post) {
+ if(post.date.year() == page.year && (post.date.month()+1 == page.month || !page.month)) {
+ currentPosts.push(post)
+ }
+ })
+ currentPosts.sort(function(a, b){ return b.date - a.date;});
+ currentPosts.forEach(function(post) {
+ if(post.date.year() !== lastYear || post.date.month()+1 !== lastMonth) {
+ if(lastYear && lastMonth) { %> <% }
+ %>
+
+ <%= post.date.year() %>年<%= post.date.month()+1 %>月
+
+
+ <%
+ }
+ %>
+
<%
+}
+%>
+
+<% if (pagination && page.total >= 1){ %>
+
<% } %>
diff --git a/themes/hexo-theme-xups/layout/_partial/post/share.ejs b/themes/hexo-theme-xups/layout/_partial/post/share.ejs
index af26c43..c162d92 100644
--- a/themes/hexo-theme-xups/layout/_partial/post/share.ejs
+++ b/themes/hexo-theme-xups/layout/_partial/post/share.ejs
@@ -1,11 +1,10 @@
-<% if (theme.share) { %>
+<% if (theme.share.enable) { %>
<% } %>
\ No newline at end of file
diff --git a/themes/hexo-theme-xups/layout/_partial/sidebar.ejs b/themes/hexo-theme-xups/layout/_partial/sidebar.ejs
index 2b7b192..343b78a 100644
--- a/themes/hexo-theme-xups/layout/_partial/sidebar.ejs
+++ b/themes/hexo-theme-xups/layout/_partial/sidebar.ejs
@@ -5,18 +5,17 @@
<%- partial('_widget/categorys') %>
- <% if (theme.tagcloud) { %>
+ <% if (theme.tagcloud.enable) { %>
热门标签
<%- partial('_widget/tags_cloud') %>
我的微博
- <%- partial('_widget/weibo') %>
+ 文章归档
+ <%- list_archives({format: theme.archives.date_format}) %>
- <%
- var list = theme.friends['list'];
- for (var i in list) {
- %>
-
\ No newline at end of file
diff --git a/themes/hexo-theme-xups/layout/_widget/tags_cloud.ejs b/themes/hexo-theme-xups/layout/_widget/tags_cloud.ejs
index ed9536e..56b01ea 100644
--- a/themes/hexo-theme-xups/layout/_widget/tags_cloud.ejs
+++ b/themes/hexo-theme-xups/layout/_widget/tags_cloud.ejs
@@ -5,7 +5,7 @@
max_font: 30,
amount: 999,
color: true,
- start_color: '#e87474',
- end_color: '#524ac5',
+ start_color: '#'+theme.tagcloud.start_color,
+ end_color: '#'+theme.tagcloud.end_color
}) %>
\ No newline at end of file
diff --git a/themes/hexo-theme-xups/layout/_widget/weibo.ejs b/themes/hexo-theme-xups/layout/_widget/weibo.ejs
deleted file mode 100644
index a95f4bf..0000000
--- a/themes/hexo-theme-xups/layout/_widget/weibo.ejs
+++ /dev/null
@@ -1,29 +0,0 @@
-