Merge pull request #113 from wangwei1237/master

在文章title下方为每篇文章增加作者信息
This commit is contained in:
Eric Shen 2021-04-09 10:57:18 +08:00 committed by GitHub
commit 651ccc266c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -9,6 +9,7 @@
<% if (post.link || post.title){ %> <% if (post.link || post.title){ %>
<header class="article-header"> <header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %> <%- partial('post/title', {class_name: 'article-title'}) %>
<%- partial('post/author', {class_name: 'article-author'}) %>
</header> </header>
<% } %> <% if (index || is_post()) { %> <% } %> <% if (index || is_post()) { %>
<div class="article-meta"> <div class="article-meta">

View File

@ -0,0 +1,8 @@
<% if (post.authors && post.authors.length){ %>
<div class="<%= class_name %>" <% if (!index){ %> style="text-align: center" <% }%>>
作者<% for (var i = 0; i < post.authors.length - 1; i++) { %>
<%= post.authors[i]%> ,
<% }%> <%= post.authors[post.authors.length - 1] %>
</div>
<% } %>

View File

@ -106,6 +106,13 @@
color body-color color body-color
padding-left 2rem padding-left 2rem
border-left 4px solid body-color border-left 4px solid body-color
.article-author
display block
font-size 20px
margin-bottom 3rem
text-decoration none
color body-color
padding-left 2rem
.article-footer .article-footer
clearfix() clearfix()

File diff suppressed because one or more lines are too long