i18n
xaoxuu 5 years ago
parent ec21c5927f
commit 22e81dfc6b
  1. 2
      _config.yml
  2. 8
      layout/_meta/author.ejs
  3. 2
      layout/_meta/categories.ejs
  4. 8
      layout/_meta/counter.ejs
  5. 2
      layout/_meta/date.ejs
  6. 2
      layout/_meta/tags.ejs
  7. 2
      layout/_meta/topping.ejs
  8. 2
      layout/_meta/updated.ejs
  9. 1
      layout/_third-party/share.ejs
  10. 2
      layout/_widget/related_posts.ejs
  11. 37
      source/less/_main.less

@ -42,7 +42,7 @@ avatar_placeholder: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avat
# 日期格式 http://momentjs.com/docs/
date_format: 'YYYY-MM-DD' # 文章发布日期的格式
updated_date_format: 'llll' # 文章更新日期的格式
updated_date_format: 'lll' # 文章更新日期的格式
############################### 自定义 ###############################

@ -1,8 +1,12 @@
<% if(post.author || config.author){ %>
<div class='new-meta-item author'>
<a href="<%- url_for(config.url) %>" rel="nofollow">
<i class="fas fa-user" aria-hidden="true"></i>
<%- post.author || config.author %>
<% if (config.avatar) { %>
<img src="<%- config.avatar %>">
<% } else { %>
<i class="fas fa-user" aria-hidden="true"></i>
<% } %>
<p><%- post.author || config.author %></p>
</a>
</div>
<% } %>

@ -10,7 +10,7 @@
<div class='new-meta-item category'>
<a href='<%- url_for(path) %>' rel="nofollow">
<i class="fas fa-folder-open" aria-hidden="true"></i>
<%- cats.join('&nbsp;/&nbsp;') %>
<p><%- cats.join('&nbsp;/&nbsp;') %></p>
</a>
</div>
<% } %>

@ -3,9 +3,11 @@
<div class="new-meta-item browse busuanzi">
<a class='notlink'>
<i class="fas fa-eye" aria-hidden="true"></i>
<span id="busuanzi_value_page_pv">
<i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
</span>
<p>
<span id="busuanzi_value_page_pv">
<i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
</span>
</p>
</a>
</div>
<% } %>

@ -1,6 +1,6 @@
<div class="new-meta-item date">
<a class='notlink'>
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
<%= date(post.date, theme.date_format) %>
<p><%- date(post.date, theme.date_format) %></p>
</a>
</div>

@ -2,7 +2,7 @@
<%
var items = [];
post.tags.each(function(item){
items.push('<div class="new-meta-item meta-tags"><a class="tag" href="'+url_for(item.path)+'" rel="nofollow"><i class="fas fa-hashtag" aria-hidden="true"></i>&nbsp;' + item.name + '</a></div>');
items.push('<div class="new-meta-item meta-tags"><a class="tag" href="'+url_for(item.path)+'" rel="nofollow"><i class="fas fa-hashtag" aria-hidden="true"></i>&nbsp;<p>' + item.name + '</p></a></div>');
});
%>
<%- items.join(' ') %>

@ -2,7 +2,7 @@
<div class="new-meta-item top-post">
<a class='notlink'>
<i class="fas fa-angle-double-up" aria-hidden="true"></i>
<%- post.top != true ? post.top : __('post.top') %>
<p><%- post.top != true ? post.top : __('post.top') %></p>
</a>
</div>
<% } %>

@ -1,6 +1,6 @@
<div class="new-meta-item date" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>">
<a class='notlink'>
<i class="fas fa-save" aria-hidden="true"></i>
<%- __('post.updated') + ' ' + date(post.updated, theme.updated_date_format) %>
<p><%- __('post.updated') + ' ' + date(post.updated, theme.updated_date_format) %></p>
</a>
</div>

@ -1,5 +1,4 @@
<div class="new-meta-item share -mob-share-list">
<i class="fas fa-share-alt" aria-hidden="true"></i>
<div class="-mob-share-list share-body">
<% (theme.share||[]).forEach(function(item){ %>
<% if (item.id == 'qrcode'){ %>

@ -1,4 +1,4 @@
<% if(page.layout == 'post' && page.content && page.path){ %>
<% if(page.layout == 'post' && page.content && page.path != undefined){ %>
<section class='<%- item.widget %>'>
<%- partial('header', {item: item, defIcon: 'fas fa-bookmark', defTitle: __('sidebar.related_posts')}) %>
<div class="content <%= theme.style %>">

@ -362,6 +362,7 @@
.new-meta-box{
@metaH: 24px;
.enable-trans();
padding-top: 4px;
padding-bottom: 8px;
display: flex;
align-items: center;
@ -374,12 +375,16 @@
cursor: default;
&:hover{
color: fade(@color_text_main, 70%);
p{
color: fade(@color_text_main, 70%);
}
}
}
display: flex;
align-items: center;
justify-content: center;
padding: 2px;
margin: 4px 8px 4px 0;
margin: 0 8px 0 0;
border-radius: 4px;
&:last-child{
margin-right: 0;
@ -387,13 +392,13 @@
img,i{
border-radius: 100%;
display: inline;
width: @metaH - 4px;
}
img{
width: @metaH - 10px;
}
i{
margin-right: 2px;
margin-right: 4px;
border-radius: 0;
&.fa-hashtag{
margin-right: 1px;
}
}
p,a{
color: fade(@color_text_main, 70%);
@ -401,8 +406,26 @@
padding-right: 4px;
}
a{
font-family: @fontfamily_base;
display: flex;
justify-content: center;
align-items: center;
img{
height: @metaH - 7px;
width: @metaH - 7px;
margin-right: 5px;
}
p{
margin: 0;
padding-top: 2px;
font-weight: normal;
.enable-trans();
}
&:hover{
color: @color_text_highlight;
p{
color: @color_text_highlight;
}
text-decoration: none;
}
}
@ -420,7 +443,7 @@
}
}
}
}
}

Loading…
Cancel
Save