-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
模板重构, 归档样式更新, 增加category支持, release 0.4.1
- Loading branch information
Showing
33 changed files
with
299 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,11 @@ | ||
<% if (pagination == 2){ %> | ||
<ul class="post-list"> | ||
<% page.posts.each(function(post){ %> | ||
<li class="post-list-item"><%- partial('article', {post: post, index: true}) %></li> | ||
<% }) %> | ||
</ul> | ||
<% if (page.total > 1){ %> | ||
<nav id="page-nav"> | ||
<div class="inner"> | ||
<%- paginator({ | ||
prev_text: '上一页', | ||
next_text: '下一页' | ||
}) %> | ||
</div> | ||
</nav> | ||
<% } %> | ||
<% } else { %> | ||
<% var last; %> | ||
<% page.posts.each(function(post, i){ %> | ||
<% var year = post.date.year(); %> | ||
<% if (last != year){ %> | ||
<% if (last != null){ %> | ||
</div></section> | ||
<% } %> | ||
<% last = year; %> | ||
<section class="archives-wrap flex-row"> | ||
<div class="archive-year-wrap"> | ||
<a href="<%- url_for('archives/' + year) %>" class="archive-year waves-effect waves-circle waves-light"><%= year %></a> | ||
</div> | ||
<div class="archives flex-col"> | ||
<% } %> | ||
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %> | ||
<% }) %> | ||
<% if (page.posts.length){ %> | ||
</div> | ||
</section> | ||
<% } %> | ||
<% if (page.total > 1){ %> | ||
<nav id="page-nav"> | ||
<div class="inner"> | ||
<%- paginator({ | ||
prev_text: '上一页', | ||
next_text: '下一页' | ||
}) %> | ||
</div> | ||
</nav> | ||
<% } %> | ||
<% } %> | ||
<article class="archive-article"> | ||
<div class="archive-article-date"> | ||
<%- partial('post/date', { post: post, date_format: 'MMM D'}) %> | ||
</div> | ||
<div class="archive-article-inner"> | ||
<%- partial('post/title', { | ||
hasLink: true | ||
}) %> | ||
<%- partial('post/tag') %> | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<article id="<%= post.layout %>-<%= post.slug %>" | ||
class="article article-type-<%= post.layout %>" itemprop="blogPost"> | ||
<%- partial('post/title', { hasLink: true }) %> | ||
<div class="post-meta"> | ||
<%- partial('post/date', {date_format: config.date_format}) %> | ||
<%- partial('post/category') %> | ||
</div> | ||
|
||
<div class="post-content" id="post-content" itemprop="postContent" > | ||
<% if (post.excerpt){ %> | ||
<%- post.excerpt %> | ||
<% } else { %> | ||
<%- post.content %> | ||
<% } %> | ||
</div> | ||
<%- partial('post/tag') %> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<article id="<%= post.layout %>-<%= post.slug %>" | ||
class="article article-type-<%= post.layout %>" itemprop="blogPost"> | ||
<div class="post-meat flex-row"> | ||
<%- partial('post/tag') %> | ||
</div> | ||
<div class="post-body"> | ||
<aside class="post-widget" id="post-widget"> | ||
|
||
<% if(theme.share){ %> | ||
<%- partial('post/share', { | ||
className: 'post-share' | ||
}) %> | ||
<% } %> | ||
|
||
<% if(theme.toc){ %> | ||
<nav class="post-toc-wrap" id="post-toc"> | ||
<%- toc(post.content, { | ||
class: 'post-toc', | ||
list_number: theme.toc.list_number | ||
}) %> | ||
</nav> | ||
<% } %> | ||
</aside> | ||
|
||
<div class="post-main"> | ||
|
||
<div class="post-content" id="post-content" itemprop="postContent"> | ||
<%- post.content %> | ||
<blockquote> | ||
<p> | ||
本文地址: | ||
<a href="<%- page.permalink%>" target="_blank" rel="external"><%- page.permalink %></a> | ||
</p> | ||
<footer><cite><a href="<%- config.url %>">@<%- config.title %></a></cite></footer> | ||
</blockquote> | ||
</div> | ||
<%- partial('post/nav') %> | ||
|
||
<%- partial('post/comment') %> | ||
</div> | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<% if (post.categories && post.categories.length){ %> | ||
<div class="article-category tagcloud"> | ||
<%- list_categories(post.categories, { | ||
show_count: false, | ||
class: 'article-category', | ||
style: 'none', | ||
separator: '' | ||
style: 'list' | ||
}) %> | ||
</div> | ||
<% } %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished" class="post-tiem"> | ||
<%= date(post.date, date_format) %> | ||
</time> | ||
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished" class="post-time"> | ||
<%= post.date.format(date_format) %> | ||
</time> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<time datetime="<%= date_xml(page.date) %>" itemprop="datePublished" class="page-time"> | ||
<%= page.date.format(config.date_format) %> | ||
</time> | ||
|
||
<% if (page.categories && page.categories.length){ %> | ||
<%- list_categories(page.categories, { | ||
show_count: false, | ||
class: 'article-category', | ||
style: 'list' | ||
}) %> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> | ||
<% | ||
var posts = []; | ||
page.posts.each(function(post){ | ||
posts.push(post); | ||
}); | ||
var sortPosts = _.orderBy(posts, ['date'], ['desc']); | ||
%> | ||
|
||
<% | ||
var y = 0, m = 0; | ||
sortPosts.forEach(function(post, i){ | ||
var dt = post.date; | ||
var ny = post.date.year(); | ||
var nm = post.date.month(); | ||
if(ny !== y || nm !== m) { | ||
y = ny; | ||
m = nm; | ||
%> | ||
<h3 class="archive-separator"><%=dt.format('MMMM, YYYY')%></h3> | ||
<% } %> | ||
<%- partial('_partial/archive', {post: post}) %> | ||
<%})%> | ||
|
||
<% if (page.total > 1){ %> | ||
<nav id="page-nav"> | ||
<div class="inner"> | ||
<%- paginator({ | ||
prev_text: '上一页', | ||
next_text: '下一页' | ||
}) %> | ||
</div> | ||
</nav> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> | ||
<%- partial('archive', {pagination: config.archive}) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
<%- partial('_partial/archive', {pagination: 2, index: true}) %> | ||
<ul class="post-list"> | ||
<% page.posts.each(function(post){ %> | ||
<li class="post-list-item"> | ||
<%- partial('_partial/index-item', { | ||
post: post, | ||
index: true | ||
}) %> | ||
</li> | ||
<% }) %> | ||
</ul> | ||
<% if (page.total > 1){ %> | ||
<nav id="page-nav"> | ||
<div class="inner"> | ||
<%- paginator({ | ||
prev_text: '上一页', | ||
next_text: '下一页' | ||
}) %> | ||
</div> | ||
</nav> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- partial('_partial/article', {post: page, index: false}) %> | ||
<%- partial('_partial/post', {post: page }) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- partial('_partial/article', {post: page, index: false}) %> | ||
<%- partial('_partial/post', {post: page }) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> | ||
<%- partial('archive', {pagination: config.archive}) %> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "hexo-theme-material-indigo", | ||
"version": "0.3.1", | ||
"version": "0.4.1", | ||
"private": true | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.