-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
1,127 additions
and
1,713 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
Binary file not shown.
Binary file not shown.
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,38 +1,32 @@ | ||
<!-- post list container --> | ||
<div class="body-container"> | ||
<div class="content-container article-list"> | ||
<div class="card-container card-articles"> | ||
<div class="card-list"> | ||
<% page.posts.each(function(post, i) { %> | ||
<% | ||
let isLarge = false; | ||
if (theme.large_legnth && post.title.length > theme.large_legnth) { | ||
isLarge = true | ||
} | ||
%> | ||
<div class="card-item<%= isLarge ? ' large' : '' %><%= post.cover ? ' img' : '' %>"> | ||
<article> | ||
<% if (post.cover) { %> | ||
<div class="card-cover" style="background-image: url(<%= post.cover %>)"></div> | ||
<% } %> | ||
<% if (post.link) { %> | ||
<a class="article-link card-link" href="<%- url_for(post.link) %>" itemprop="url" target="_blank"></a> | ||
<% } else { %> | ||
<a class="article-link card-link" href="<%- url_for(post.path) %>" itemprop="url"></a> | ||
<% } %> | ||
<h2 class="article-title"><%= post.title %></h2> | ||
<div class="article-meta"> | ||
<strong><%= post.author || config.author %></strong> | ||
<span>发布于</span> | ||
<%- partial("../_widget/date", { class_name: 'article-date', post: post, date_format: null, link: true }) %> | ||
</div> | ||
<div class="article-category"> | ||
<%- partial("../_widget/category", { class_name: "article-category", post: post }) %> | ||
</div> | ||
</article> | ||
<div class="content-container layout-block article-list"> | ||
<% page.posts.each(function(post, i) { %> | ||
<div class="article-item layout-padding"> | ||
<article class="card-container article-card content-padding--large soft-size--large soft-style--box"> | ||
<% if (post.cover) { %> | ||
<div class="card-cover" background-image-lazy data-img="<%= post.cover %>"></div> | ||
<% } %> | ||
<div class="card-text"> | ||
<% if (post.link) { %> | ||
<a href="<%- url_for(post.link) %>" itemprop="url" target="_blank"> | ||
<h2 class="card-text--title"><%= post.title || "(no title)" %></h2> | ||
</a> | ||
<% } else { %> | ||
<a href="<%- url_for(post.path) %>" itemprop="url"> | ||
<h2 class="card-text--title"><%= post.title || "(no title)" %></h2> | ||
</a> | ||
<% } %> | ||
<div class="card-text--row"> | ||
<span>发布于</span> | ||
<%- partial("../_widget/date", { class_name: null, post: post, date_format: null }) %> | ||
</div> | ||
<%- partial("../_widget/category", { page: post, class_name: post.cover ? 'dark' : 'light' }) %> | ||
<%- partial("../_widget/tag", { page: post, class_name: post.cover ? 'dark' : 'light' }) %> | ||
</div> | ||
<% }) %> | ||
</article> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
<!-- 文章内容 --> | ||
|
||
<div class="body-container"> | ||
<article class="content-container article-container"> | ||
<div class="article-content"> | ||
<article class="content-container layout-block post-container"> | ||
<div class="article-info"> | ||
<%# 如果文章设置了photos内容 %> | ||
<% if (page.photos && page.photos.length) { %> | ||
<section class="article-gallery"> | ||
<%- partial("../_widget/gallery", { class_name: "article-gallery-photos", post: page }) %> | ||
<section class="article-entry markdown-body layout-margin content-padding--large soft-size--large soft-style--box"> | ||
<% page.photos.forEach(function(photo, i) { %> | ||
<p> | ||
<a href="<%- url_for(photo) %>" target="_blank"> | ||
<img src="<%- url_for(photo) %>" itemprop="image" loading="lazy" /> | ||
</a> | ||
</p> | ||
<% }) %> | ||
</section> | ||
<% } %> | ||
|
||
<section class="article-entry"> | ||
|
||
<%# 输出Markdown内容 %> | ||
<section class="article-entry markdown-body layout-margin content-padding--large soft-size--large soft-style--box"> | ||
<%- page.content %> | ||
</section> | ||
|
||
<section class="article-footer"> | ||
<%- partial("../_widget/tags", { class_name: "article-tag", post: page }) %> | ||
</section> | ||
<%# 输出上一篇,下一篇内容 %> | ||
<% if (page.prev || page.next){ %> | ||
<nav class="article-nav"> | ||
<% if (page.prev) { %> | ||
<%- partial("../_widget/article-nav", { page: page.prev, keyword: 'newer' }) %> | ||
<% } %> | ||
<% if (page.next) { %> | ||
<%- partial("../_widget/article-nav", { page: page.next, keyword: 'older' }) %> | ||
<% } %> | ||
</nav> | ||
<% } %> | ||
|
||
<section class="article-navs"> | ||
<%- partial('../_widget/article-nav', { post: page }) %> | ||
<section class="page-message-container layout-padding"> | ||
<%- partial('../_widget/comment', { post: page }) %> | ||
</section> | ||
</div> | ||
<div class="widget-info"> | ||
<%- partial("../_widget/widget-author") %> | ||
|
||
<%- partial("../_widget/widget-toc", { page: page }) %> | ||
|
||
<%- partial("../_widget/widget-notice") %> | ||
|
||
<%- partial("../_widget/widget-categorys") %> | ||
|
||
<%- partial("../_widget/widget-tags") %> | ||
</div> | ||
</article> | ||
</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
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
Oops, something went wrong.