Update: home page css

This commit is contained in:
XPoet 2020-03-19 23:08:51 +08:00
parent 9e87dfc702
commit a5a2d684bf
2 changed files with 43 additions and 34 deletions

View File

@ -15,35 +15,42 @@
<%- truncate(strip_html(post.content), {length: 80}) %> <%- truncate(strip_html(post.content), {length: 80}) %>
</div> </div>
<div class="article-post-meta"> <!-- date -->
<div class="article-meta">
<span class="article-date"> <span class="article-date article-item">
<i class="fa fa-calendar"></i> <i class="fa fa-calendar-o"></i>
<%= date(post.date, 'YYYY-MM-DD HH:MM:SS') %> <%= date(post.date, 'YYYY-MM-DD HH:MM:SS') %>
</span> </span>
<span class="article-tags"> <!-- categories -->
<% if (post.categories.length) { %>
<span class="article-categories article-item">
<i class="fa fa-bookmark"></i>
<ul>
<% post.categories.forEach((category, i) => { %>
<li>
<%= i === 0 ? '' : '| ' %><a href="<%- url_for(category.path) %>"
rel="tag"><%= category.name %></a>
</li>
<% }); %>
</ul>
</span>
<% } %>
<!-- tags -->
<% if (post.tags.length) { %>
<span class="article-tags article-item">
<i class="fa fa-tags"></i> <i class="fa fa-tags"></i>
<ul> <ul>
<% post.tags.forEach(tag => { %> <% post.tags.forEach((tag, i) => { %>
<li> <li>
<a href="<%- url_for(tag.path) %>" rel="tag"><%= tag.name %></a> <%= i === 0 ? '' : '| ' %><a href="<%- url_for(tag.path) %>"
rel="tag"><%= tag.name %></a>
</li> </li>
<% }); %> <% }); %>
</ul> </ul>
</span> </span>
<% } %>
<span class="article-categories">
<i class="fa fa-table"></i>
<ul>
<% post.categories.forEach(category => { %>
<li>
<a href="<%- url_for(category.path) %>" rel="tag"><%= category.name %></a>
</li>
<% }); %>
</ul>
</span>
</div> </div>
</li> </li>
<% }) %> <% }) %>

View File

@ -50,6 +50,7 @@
.article-post-content { .article-post-content {
padding 15px 0 padding 15px 0
a { a {
text-decoration: none; text-decoration: none;
letter-spacing: 1px; letter-spacing: 1px;
@ -73,25 +74,26 @@
} }
.article-post-meta { .article-meta {
padding-bottom: 30px; padding-bottom: 20px;
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
color: #bbbbbb; color: #bbbbbb;
font-size: 12px; font-size: 12px;
position relative
.article-date, .article-tags, .article-categories { .article-item {
margin-right: 15px; margin-right: 15px;
} }
.article-tags, .article-categories { .article-tags, .article-categories {
display: inline; display: inline;
ul { ul, li {
display: inline;
li {
display: inline; display: inline;
} }
li {
} }
a { a {