commit
5f951133bd
28 changed files with 379 additions and 148 deletions
@ -0,0 +1,75 @@ |
||||
|
||||
<div class='l_main'> |
||||
|
||||
<% if (site.posts && site.posts.length > 0) { %> |
||||
<section class="post-list"> |
||||
<% if (page.prev == 0) { %> |
||||
<% site.posts.each(function(post){ %> |
||||
<% if (post.top) { %> |
||||
<div class='post-wrapper'> |
||||
<%- partial('_partial/post', {post: post}) %> |
||||
</div> |
||||
<% } %> |
||||
<% }) %> |
||||
<% } %> |
||||
<% site.posts.sort(config.index_generator.order_by).each(function(post){ %> |
||||
<% if (!post.top) { %> |
||||
<div class='post-wrapper'> |
||||
<%- partial('_partial/post', {post: post}) %> |
||||
</div> |
||||
<% } %> |
||||
<% }) %> |
||||
</section> |
||||
|
||||
<% if (page.total > 1) { %> |
||||
<br> |
||||
<div class="prev-next"> |
||||
<div class="prev-next"> |
||||
<% if (page.prev != 0) { %> |
||||
<a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>"> |
||||
<section class="post prev" > |
||||
<i class="fas fa-chevron-left" aria-hidden="true"></i> <%- __('post.prev_page') %> |
||||
</section> |
||||
</a> |
||||
<% } %> |
||||
<p class="current"> |
||||
<%= page.current%> / <%= page.total%> |
||||
</p> |
||||
<% if (page.next != 0) { %> |
||||
<a class="next" rel="next" href="<%= url_for(page.next_link) %>"> |
||||
<section class="post next"> |
||||
<%- __('post.next_page') %> <i class="fas fa-chevron-right" aria-hidden="true"></i> |
||||
</section> |
||||
</a> |
||||
<% } %> |
||||
</div> |
||||
</div> |
||||
<% } %> |
||||
|
||||
<% } %> |
||||
|
||||
<% if (page.posts && page.posts.length > 0) { %> |
||||
|
||||
|
||||
|
||||
<!-- 根据主题中的设置决定是否在archive中针对摘要部分的MathJax公式加载mathjax.js文件 --> |
||||
<% |
||||
var need_mathjax = false; |
||||
page.posts.each(function(post){ |
||||
if (post.mathjax){ |
||||
if (post.mathjax != "internal") { |
||||
need_mathjax = true; |
||||
} |
||||
} |
||||
}); |
||||
%> |
||||
|
||||
<% if (need_mathjax){ %> |
||||
<%- partial('_partial/mathjax') %> |
||||
<% } %> |
||||
|
||||
<% } %> |
||||
|
||||
</div> |
||||
<%- partial('_partial/side') %> |
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %> |
@ -1,26 +1,49 @@ |
||||
<div class='home-cover'> |
||||
<h1 class='title'>xaoxuu</h1> |
||||
<br> |
||||
<% if (theme.search.enable === true) { %> |
||||
<div class="m_search"> |
||||
<form name="searchform" class="form u-search-form"> |
||||
<input type="text" class="input u-search-input" placeholder="<%- __('search.placeholder_home') %>" /> |
||||
<span class="icon"><i class="fas fa-search fa-fw"></i></span> |
||||
</form> |
||||
<div class="home-wrapper"> |
||||
<% if (page.prev == 0) { %> |
||||
<div class='home-cover'> |
||||
<h1 class='title'><%- theme.home_cover.title %></h1> |
||||
<br> |
||||
<% if (theme.search.enable === true) { %> |
||||
<div class="m_search"> |
||||
<form name="searchform" class="form u-search-form"> |
||||
<input type="text" class="input u-search-input" placeholder="<%- theme.home_cover.search_placeholder %>" /> |
||||
<span class="icon"><i class="fas fa-search fa-fw"></i></span> |
||||
</form> |
||||
</div> |
||||
<% } %> |
||||
<div class='menu'> |
||||
<ul class='h-list'> |
||||
<% if (theme.home_cover.menu) { %> |
||||
<% (theme.home_cover.menu || []).forEach(function(value){ %> |
||||
<li> |
||||
<% if (value.url == '#posts') { %> |
||||
<a id="<%= url_for(value.url).replace(/\/|%/g, "")?url_for(value.url).replace(/\/|%/g, ""):"home" %>" |
||||
class="posts" > |
||||
<i class='<%= value.icon %> fa-fw'></i> <%= __('navbar.'+value.name) == ('navbar.'+value.name) ? value.name : __('navbar.'+value.name) %> |
||||
</a> |
||||
<% } else { %> |
||||
<a id="<%= url_for(value.url).replace(/\/|%/g, "")?url_for(value.url).replace(/\/|%/g, ""):"home" %>" |
||||
class="nav home" href="<%= url_for(value.url) %>" > |
||||
<i class='<%= value.icon %> fa-fw'></i> <%= __('navbar.'+value.name) == ('navbar.'+value.name) ? value.name : __('navbar.'+value.name) %> |
||||
</a> |
||||
<% } %> |
||||
</li> |
||||
<%})%> |
||||
<% } %> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<% } %> |
||||
<div class='menu'> |
||||
<ul class='h-list'> |
||||
<% if (config.menu) { %> |
||||
<% (config.menu || []).forEach(function(value){ %> |
||||
<li> |
||||
<a id="<%= url_for(value.url).replace(/\/|%/g, "")?url_for(value.url).replace(/\/|%/g, ""):"home" %>" |
||||
class="nav flat-box" href="<%= url_for(value.url) %>"> |
||||
<i class='<%= value.icon %> fa-fw'></i> <%= __('navbar.'+value.name) == ('navbar.'+value.name) ? value.name : __('navbar.'+value.name) %> |
||||
</a> |
||||
</li> |
||||
<%})%> |
||||
<% } %> |
||||
</ul> |
||||
<%- partial('_partial/header', null, {cache: !config.relative_link, path: path}) %> |
||||
</div> |
||||
<div class="l_body" id='posts'> |
||||
<div class='container clearfix'> |
||||
<div class='l_main'> |
||||
<%- partial('_partial/archive') %> |
||||
</div> |
||||
<%- partial('_partial/side') %> |
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %> |
||||
<script>setLoadingBarProgress(60);</script> |
||||
</div> |
||||
<a class="s-top fas fa-arrow-up fa-fw" href='javascript:void(0)'></a> |
||||
</div> |
||||
|
Loading…
Reference in new issue