i18n
xaoxuu 4 years ago
parent da247f1327
commit e944eda834
  1. 2
      _config.yml
  2. 2
      layout/_partial/post.ejs
  3. 3
      layout/category.ejs
  4. 29
      layout/tag.ejs
  5. 17
      source/less/_archive.less

@ -4,7 +4,7 @@ info:
docs: https://xaoxuu.com/wiki/material-x/
cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css:
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2.9/css/style.css
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2.11/css/style.css
js:
app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/app.js
search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/search.js

@ -4,7 +4,7 @@
<div class="article-entry" itemprop="articleBody">
<%- post.excerpt || post.description %>
<% if (post.readmore != false && post.path) { %>
<div class="readmore">
<div class="button readmore">
<a href="<%- url_for(post.path) %>" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
<%- __('post.read_more') %>

@ -8,9 +8,8 @@
<section class="archive">
<div class="archive-item archive-year mark">
<h2><%- page.title %></h2>
<hr>
</div>
<div class="archive-item archive-post mark">
<div class="archive-item archive-post mark all-categories">
<% if (site.categories.length){ %>
<% site.categories.sort('path').each(function(category){ %>
<a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>">

@ -1,5 +1,5 @@
<% page.comments = false; %>
<div class='l_main'>
<div class='l_main<%- page.sidebar == false ? ' no_sidebar' : '' %>'>
<% if (site.posts && site.posts.length > 0) { %>
<% if (page.layout == 'tag') { %>
<section class="post-list">
@ -8,21 +8,20 @@
<section class="archive">
<div class="archive-item archive-year mark">
<h2><%- page.title %></h2>
<hr>
</div>
<div class="archive-item archive-post mark">
<% if (site.tags.length){ %>
<% site.tags.sort('path').each(function(tags){ %>
<% if (tags.posts.length){ %>
<a class="<%= tags.parent ? ' child' : ''%>" href="<%= url_for(tags.path) %>">
<time><i class='fas fa-tag fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= tags.name %></time>
<span class="title">
(<%- tags.posts.length %>)
</span>
</a>
<% } %>
<% }) %>
<% } %>
<div class="archive-item all-tags">
<% theme.sidebar.forEach(function(item){ %>
<% let widget_name = item.widget ? item.widget : 'plain'; %>
<% if (item.enable != false && widget_name == 'tagcloud'){ %>
<%- tagcloud(site.tags, {
min_font: 16,
max_font: 32,
color: false,
start_color: item.start_color ? item.start_color : '#999',
end_color: item.end_color ? item.end_color : '#666',
}) %>
<% } %>
<% }) %>
</div>
<br>
<%- page.content %>

@ -73,5 +73,22 @@
}
}
}
.all-tags {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
align-items: baseline;
word-spacing: @gap/2;
text-align: center;
a {
color: fade(@color_text_main, 80%);
margin-right: @gap;
&:hover,&:active,&.active{
color: @color_text_highlight;
}
}
}
}
}

Loading…
Cancel
Save