i18n
xaoxuu 5 years ago
parent f2b9250993
commit 1b8bdff154
  1. 17
      _config.yml
  2. 57
      layout/category.ejs
  3. 60
      layout/tag.ejs
  4. 17
      source/less/_base.less
  5. 6
      source/less/_fonts.less

@ -47,7 +47,8 @@ loading_img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png
# 主页封面 # 主页封面
home_cover: home_cover:
title: xaoxuu title: "xaoxuu"
logo:
search_placeholder: 'la víspera de la tormenta' search_placeholder: 'la víspera de la tormenta'
# 主页封面菜单 # 主页封面菜单
menu: menu:
@ -62,7 +63,7 @@ home_cover:
url: https://xaoxuu.com/wiki/ url: https://xaoxuu.com/wiki/
- name: 归档 - name: 归档
icon: fas fa-archive icon: fas fa-archive
url: blog/archives/ url: archives/
- name: 关于 - name: 关于
icon: fas fa-info-circle icon: fas fa-info-circle
url: about/ url: about/
@ -71,13 +72,13 @@ home_cover:
menu: menu:
- name: Cocoa Dev - name: Cocoa Dev
icon: fab fa-apple icon: fab fa-apple
url: blog/categories/cocoa-dev/ url: categories/cocoa-dev/
- name: Dev - name: Dev
icon: fas fa-laptop-code icon: fas fa-laptop-code
url: blog/categories/dev/ url: categories/dev/
- name: Life - name: Life
icon: fas fa-coffee icon: fas fa-coffee
url: blog/categories/life/ url: categories/life/
# 侧边栏小部件 # 侧边栏小部件
@ -95,7 +96,7 @@ sidebar:
url: https://xaoxuu.com/wiki/ url: https://xaoxuu.com/wiki/
- name: 文章归档 - name: 文章归档
icon: fas fa-archive icon: fas fa-archive
url: blog/archives/ url: archives/
- name: 我的友链 - name: 我的友链
icon: fas fa-link icon: fas fa-link
url: friends/ url: friends/
@ -108,12 +109,12 @@ sidebar:
- widget: category - widget: category
more: more:
icon: fas fa-expand-arrows-alt icon: fas fa-expand-arrows-alt
url: blog/categories/ url: categories/
- widget: tagcloud - widget: tagcloud
icon: fas fa-fire icon: fas fa-fire
more: more:
icon: fas fa-expand-arrows-alt icon: fas fa-expand-arrows-alt
url: blog/tags/ url: tags/
- widget: related_posts - widget: related_posts
- widget: music - widget: music
icon: fas fa-compact-disc icon: fas fa-compact-disc

@ -1,32 +1,37 @@
<div class='l_main'> <div class='l_main'>
<% if (site.posts && site.posts.length > 0) { %> <% if (site.posts && site.posts.length > 0) { %>
<section class="post-list"> <% if (page.index) { %>
<div class='post-wrapper'> <section class="post-list">
<article id="archive-page" class="post article white-box"> <div class='post-wrapper'>
<section class="archive"> <article id="archive-page" class="post article white-box">
<div class="archive-item archive-year mark"> <section class="archive">
<h2><%- page.title %></h2> <div class="archive-item archive-year mark">
<hr> <h2><%- page.title %></h2>
</div> <hr>
<div class="archive-item archive-post mark"> </div>
<% if (site.categories.length){ %> <div class="archive-item archive-post mark">
<% site.categories.sort('path').each(function(category){ %> <% if (site.categories.length){ %>
<a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>"> <% site.categories.sort('path').each(function(category){ %>
<time><i class='fas fa-folder-open fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= category.name %></time> <a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>">
<span class="title"> <time><i class='fas fa-folder-open fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= category.name %></time>
(<%- category.posts.length %>) <span class="title">
</span> (<%- category.posts.length %>)
</a> </span>
<% }) %> </a>
<% } %> <% }) %>
</div> <% } %>
<br> </div>
<%- page.content %> <br>
</section> <%- page.content %>
</article> </section>
</div> </article>
</section> </div>
</section>
<% } else { %>
<%- partial('_partial/archive') %>
<% } %>
<% } %> <% } %>
</div> </div>
<%- partial('_partial/side') %> <%- partial('_partial/side') %>
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %> <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>

@ -1,33 +1,37 @@
<div class='l_main'> <div class='l_main'>
<% if (site.posts && site.posts.length > 0) { %> <% if (site.posts && site.posts.length > 0) { %>
<section class="post-list"> <% if (page.index) { %>
<div class='post-wrapper'> <section class="post-list">
<article id="archive-page" class="post article white-box"> <div class='post-wrapper'>
<section class="archive"> <article id="archive-page" class="post article white-box">
<div class="archive-item archive-year mark"> <section class="archive">
<h2><%- page.title %></h2> <div class="archive-item archive-year mark">
<hr> <h2><%- page.title %></h2>
</div> <hr>
<div class="archive-item archive-post mark"> </div>
<% if (site.tags.length){ %> <div class="archive-item archive-post mark">
<% site.tags.sort('path').each(function(tags){ %> <% if (site.tags.length){ %>
<% if (tags.posts.length){ %> <% site.tags.sort('path').each(function(tags){ %>
<a class="<%= tags.parent ? ' child' : ''%>" href="<%= url_for(tags.path) %>"> <% if (tags.posts.length){ %>
<time><i class='fas fa-hashtag fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= tags.name %></time> <a class="<%= tags.parent ? ' child' : ''%>" href="<%= url_for(tags.path) %>">
<span class="title"> <time><i class='fas fa-hashtag fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= tags.name %></time>
(<%- tags.posts.length %>) <span class="title">
</span> (<%- tags.posts.length %>)
</a> </span>
<% } %> </a>
<% }) %> <% } %>
<% } %> <% }) %>
</div> <% } %>
<br> </div>
<%- page.content %> <br>
</section> <%- page.content %>
</article> </section>
</div> </article>
</section> </div>
</section>
<% } else { %>
<%- partial('_partial/archive') %>
<% } %>
<% } %> <% } %>
</div> </div>
<%- partial('_partial/side') %> <%- partial('_partial/side') %>

@ -59,11 +59,11 @@ body {
padding: @gap; padding: @gap;
.title{ .title{
font-size: @fontsize_h1*2; font-size: @fontsize_h1*2;
margin-top: 25vh; margin-top: 30vh;
align-self: center; align-self: center;
} }
.m_search{ .m_search{
margin-top: 10vh; margin-top: 5vh;
position: relative; position: relative;
height: @height_navbar - @gap; height: @height_navbar - @gap;
width: 1.2*@width_sidebar; width: 1.2*@width_sidebar;
@ -150,21 +150,14 @@ body {
} }
ul > li > a{ ul > li > a{
font-size: @fontsize_small; font-size: @fontsize_small;
padding: 0 2px; padding: 2px;
margin: 0 4px; margin: 0 4px;
.enable-trans(); .enable-trans();
color: fade(@color_text_main, 70%); color: fade(@color_text_main, 70%);
border-bottom: @loading_height solid transparent; border-bottom: 1px solid transparent;
&.current{
border-bottom: @loading_height solid fade(@theme_main, 80%);
}
&:hover{ &:hover{
color: @theme_main; color: @theme_main;
border-bottom: @loading_height solid @theme_main; border-bottom: 1px solid @theme_main;
}
&:active,&.active{
color: @theme_main;
border-bottom: @loading_height solid @theme_main;
} }
} }
} }

@ -16,6 +16,12 @@
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face{
font-family: 'Source Sans Pro';
src: url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts@master/SourceSansPro/SourceSansPro-Regular.ttf);
font-weight: normal;
font-style: normal;
}
// 大部分文字字体 // 大部分文字字体
@fontfamily_base: 'Varela Round', "Source Sans Pro", "Helvetica Neue", Menlo, Monaco, monospace, "Lucida Console", sans-serif, Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif; @fontfamily_base: 'Varela Round', "Source Sans Pro", "Helvetica Neue", Menlo, Monaco, monospace, "Lucida Console", sans-serif, Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif;

Loading…
Cancel
Save