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/ docs: https://xaoxuu.com/wiki/material-x/
cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css: 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: js:
app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/app.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 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"> <div class="article-entry" itemprop="articleBody">
<%- post.excerpt || post.description %> <%- post.excerpt || post.description %>
<% if (post.readmore != false && post.path) { %> <% if (post.readmore != false && post.path) { %>
<div class="readmore"> <div class="button readmore">
<a href="<%- url_for(post.path) %>" class="flat-box"> <a href="<%- url_for(post.path) %>" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i> <i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
<%- __('post.read_more') %> <%- __('post.read_more') %>

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

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