-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
str/fix(archive/tags): bring up and fix pagnition
- Loading branch information
Showing
3 changed files
with
163 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<div class="container container-timeline"> | ||
<div class="timeline"> | ||
|
||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<div class="timeline-icon"></div> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-title"> | ||
目前共计 <%= site.posts.length %> 篇文章 | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<% var last = 0, year, yearArr = []; %> | ||
|
||
<% site.posts.sort('date', -1).limit(site.posts.length).each(function(post){ %> | ||
<% year = post.date.year(); %> | ||
<% if (last != year){ %> | ||
<% if (yearArr.length != 0){ %> | ||
<% } %> | ||
<% yearArr.push(year); %> | ||
<% last = year; %> | ||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<div class="timeline-icon icon-lg"></div> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-title"> | ||
<span class="h4"><%= year %></span> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<a class="timeline-icon" href="<%- url_for(post.path) %>"></a> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-subtitle text-gray mb-1"><%= date(post.date, config.date_format) %></p> | ||
<a href="<%- url_for(post.path) %>" style="color: #667189;"><p class="tile-title"><%= post.title %></p></a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% } else { %> | ||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<a class="timeline-icon" href="<%- url_for(post.path) %>"></a> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-subtitle text-gray mb-1"><%= date(post.date, config.date_format) %></p> | ||
<a href="<%- url_for(post.path) %>" style="color: #667189;"><p class="tile-title"><%= post.title %></p></a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% } %> | ||
<% }) %> | ||
|
||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<% if( is_tag() ) { %> | ||
<div class="container container-timeline"> | ||
<div class="timeline"> | ||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<div class="timeline-icon icon-lg"></div> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-title"> | ||
<span class="h4"><%= page.tag %></span> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% page.posts.sort('date', -1).each(function(post){ %> | ||
<div class="timeline-item"> | ||
<div class="timeline-left"> | ||
<a class="timeline-icon" href="<%- url_for(post.path) %>"></a> | ||
</div> | ||
<div class="timeline-content"> | ||
<div class="tile"> | ||
<div class="tile-content"> | ||
<p class="tile-subtitle text-gray mb-1"><%= date(post.date, config.date_format) %></p> | ||
<a href="<%- url_for(post.path) %>" style="color: #667189;"><p class="tile-title"><%= post.title %></p></a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% }) %> | ||
</div> | ||
</div> | ||
<div class="container container-index-nav"> | ||
<%- partial('_partial/index-nav') %> | ||
</div> | ||
<% } else { %> | ||
<style> | ||
.tagscloud { | ||
margin: 4rem 1.2rem 3rem; | ||
padding: 0 1rem; | ||
} | ||
@media screen and (max-width: 480px) { | ||
.tagscloud { | ||
padding: 0; | ||
} | ||
} | ||
.tagscloud a { | ||
text-decoration:none; | ||
padding: .1rem .5rem; | ||
margin: .5rem .1rem; | ||
line-height: 2rem; | ||
white-space: nowrap; | ||
transition: .6s; | ||
opacity: .85; | ||
} | ||
.tagscloud a:hover { | ||
transition: .6s; | ||
opacity: 1; | ||
background-color: #fafafa; | ||
padding: .75rem; | ||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12); | ||
} | ||
</style> | ||
<div class="tagscloud"> | ||
<%- tagcloud({ | ||
min_font: 16, | ||
max_font: 35, | ||
amount: 9999, | ||
color: true, | ||
start_color: '#757575', | ||
end_color: '#212121', | ||
}) %> | ||
</div> | ||
<% } %> |