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

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

@ -1,33 +1,37 @@
<div class='l_main'>
<% if (site.posts && site.posts.length > 0) { %>
<section class="post-list">
<div class='post-wrapper'>
<article id="archive-page" class="post article white-box">
<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-hashtag fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= tags.name %></time>
<span class="title">
(<%- tags.posts.length %>)
</span>
</a>
<% } %>
<% }) %>
<% } %>
</div>
<br>
<%- page.content %>
</section>
</article>
</div>
</section>
<% if (page.index) { %>
<section class="post-list">
<div class='post-wrapper'>
<article id="archive-page" class="post article white-box">
<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-hashtag fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= tags.name %></time>
<span class="title">
(<%- tags.posts.length %>)
</span>
</a>
<% } %>
<% }) %>
<% } %>
</div>
<br>
<%- page.content %>
</section>
</article>
</div>
</section>
<% } else { %>
<%- partial('_partial/archive') %>
<% } %>
<% } %>
</div>
<%- partial('_partial/side') %>

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

@ -16,6 +16,12 @@
font-weight: 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;

Loading…
Cancel
Save