i18n
xaoxuu 6 years ago
parent 0e1a590593
commit 0d09c57a94
  1. 17
      README.md
  2. 2
      layout/_partial/footer.ejs
  3. 6
      layout/_partial/header.ejs
  4. 11
      layout/_widget/links.ejs
  5. 2
      layout/_widget/music.ejs
  6. 22
      source/less/_article.less
  7. 16
      source/less/_base.less
  8. 18
      source/less/_defines.less
  9. 2
      source/less/_footer.less
  10. 9
      source/less/_header.less
  11. 21
      source/less/_main.less
  12. 4
      source/less/_toc.less
  13. 6
      source/less/_widget.less

@ -368,13 +368,12 @@ mathjax: true
调整这些字体的顺序:
```yaml
@fallback-font-family: Menlo, Monaco, 'Ubuntu', Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif;
// 大部分文字字体
@base-font-family: 'Ubuntu', Menlo, Monaco, @fallback-font-family;
@fontfamily_base: 'Ubuntu', Menlo, Monaco, Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif;
// 代码字体
@code-font-family: Menlo, Monaco, 'Ubuntu', Helvetica, Consolas, monospace, sans-serif, @fallback-font-family;
// 标题字体
@title-font-family: 'Ubuntu', Menlo, Monaco, Helvetica, Consolas, monospace, sans-serif, @fallback-font-family;
@fontfamily_code: Menlo, Monaco, @fontfamily_base;
// LOGO字体
@fontfamily_logo: @fontfamily_base;
```
默认的字体 `Ubuntu` 使用的是GoogleFontsAPI:
@ -473,13 +472,11 @@ mathjax: true
// 卡片背景
@theme-bg-card: white;
// 卡片标题栏背景
@theme-bg-card-header: darken(@theme-base-main, 4%);
// 按钮背景
@theme-bg-button: @theme-base-main;
@theme-bg-card-header: @theme-bg-nav-header;
// 代码的背景色
@theme-bg-code: @theme-base-tint;
@theme-bg-code: fade(@mac-maximize, 6%);
// 代码块的背景色
@theme-bg-code-block: fade(@theme-base-main, 70%);
@theme-bg-code-block: @theme-bg-code;
// 引用的颜色以及分类、归档的 hover 时颜色
@theme-bg-quote: @theme-base-tint;
// 文字颜色 ----------------

@ -10,7 +10,7 @@
<%}%>
<br>
<div>博客内容遵循 <a target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" class="licenses">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></div>
<div>本站使用 <a href="https://github.com/xaoxuu/hexo-theme-material-x" target="_blank" class="codename">Material-X</a> 作为主题,
<div>本站使用 <a href="https://github.com/xaoxuu/hexo-theme-material-x" target="_blank" class="codename">Material X</a> 作为主题,
总访问量为 <span id="busuanzi_value_site_pv"><i class="fa fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span> 次。
</div>
</footer>

@ -8,11 +8,11 @@
<div class='menu'>
<ul class='h-list'>
<% if (config.nav_menu) { %>
<% if (config.nav_menu) { %>
<% (config.nav_menu || []).forEach(function(value){ %>
<li>
<a class='flat-box nav-<%=value.slug%> fa <%=value.icon%>' href='<%=url_for(value.url)%>'>
<%=value.name%>
<a class='nav-<%=value.slug%> flat-box' href='<%=url_for(value.url)%>'>
<i class='fa <%=value.icon%>'></i>&nbsp;<%=value.name%>
</a>
</li>
<%})%>

@ -1,15 +1,22 @@
<section class='m_widget links'>
<div class='header'><i class="fa fa-link fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;友链</div>
<div class='header'><i class="fa fa-thumbs-up fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;友链</div>
<div class='content'>
<ul class="entry" id="links">
<% (config.widgets.links||[]).forEach(function(item){ %>
<li><a class="flat-box" target="_blank" rel="external nofollow noopener noreferrer" href="<%= url_for(item.url) %>">
<div class='name'>
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
<i class="fa fa-user-circle-o fa-fw" aria-hidden="true"></i>
&nbsp;&nbsp;<%= item.name %>
</div>
</a></li>
<% }) %>
<li><a class="flat-box" target="_blank" rel="external nofollow noopener noreferrer" href="mailto:<%= config.email %>?subject=交换友链">
<div class='name'>
<i class="fa fa-plus fa-fw" aria-hidden="true"></i>
&nbsp;&nbsp;联系博主交换友链
</div>
</a></li>
</ul>
</div>
</section>

@ -1,5 +1,5 @@
<section class='m_widget music'>
<div class='header'><i class="fa fa-music fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;音乐</div>
<div class='header'><i class="fa fa-headphones fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;音乐</div>
<div class='content'>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=450 src="//music.163.com/outchain/player?type=0&id=<%= config.widgets.musicid %>&auto=0&height=450"></iframe>
</div>

@ -97,7 +97,7 @@
h5,
h6 {
position: relative;
font-family: @base-font-family;
font-family: @fontfamily_base;
font-weight: normal;
margin-top: 1.5em;
margin-bottom: 1em;
@ -167,7 +167,7 @@
margin: 1em 0;
padding: @gap;
border-left: @border-left-radius solid @theme-bg-quote;
border-radius: @border-code-block;
// border-radius: @border-code-block;
.enable-trans();
// &:hover{
// border-left: @border-radius solid @theme-bg-quote;
@ -184,11 +184,11 @@
display: block;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-family: @code-font-family;
font-family: @fontfamily_code;
color: fade(@theme-text-main, 90%);
}
code {
font-family: @code-font-family;
font-family: @fontfamily_code;
padding: 3px 3px 0px 3px;
margin: 0px 2px;
vertical-align: center;
@ -203,7 +203,7 @@
}
.readmore {
// display: none; // howtodesign?
font-family: @title-font-family;
font-family: @fontfamily_base;
font-size: .8em;
letter-spacing: .1em;
margin-top: @gap;
@ -212,16 +212,16 @@
display: inline-block;
vertical-align: middle;
line-height: 2rem;
background-color: fade(@theme-bg-button, 90%);
background-color: fade(@theme-bg-nav-header, 90%);
padding: .2em 2.4em;
color: @theme-text-in-header;
border-radius: @border-radius/2;
.enable-trans();
&:hover {
background: darken(@theme-bg-button, 10%);
background: darken(@theme-bg-nav-header, 10%);
}
&:active {
background: lighten(@theme-bg-button, 20%);
// background: darken(@theme-bg-nav-header, 20%);
}
}
@ -291,7 +291,7 @@
width: 100%;
padding: @gap/2;
color: fade(@theme-text-main, 70%);
background-color: @theme-bg-code-block;
background-color: fade(@theme-bg-main, 50%);
border-radius: @border-radius;
p{
font-size: @base-font-size;
@ -302,7 +302,7 @@
margin-top: @gap/2;
margin-bottom: @gap/2;
position: relative;
font-family: @base-font-family;
font-family: @fontfamily_base;
font-weight: bold;
font-size: @font-size-h4;
}
@ -386,7 +386,7 @@
display: block;
background: @theme-bg-code-block;
font-size: @small-font-size * .95;
font-family:@code-font-family;
font-family:@fontfamily_code;
line-height: @base-line-height;
border-radius: @border-code-block;
.enable-trans();

@ -14,7 +14,7 @@ html {
width: 100%;
height: 100%;
padding-top: @header-height;
font-family: @base-font-family;
font-family: @fontfamily_base;
font-size: @base-font-size;
line-height: 1.5rem;
color: @theme-text-main;
@ -244,7 +244,7 @@ img {
border: 1px solid black;
padding: 0px 15px;
font-size: 13px;
font-family: @base-font-family;
font-family: @fontfamily_base;
text-align: center;
color: lighten(#8f8f8f, 20%);
&:hover {
@ -286,7 +286,7 @@ li {
color: @black;
border-left: @border-left-radius solid transparent;
background: transparent;
border-radius: @border-code-block;
// border-radius: @border-code-block;
.enable-trans();
&:hover {
border-left: @border-left-radius solid @theme-bg-quote;
@ -294,7 +294,7 @@ li {
background: fade(@theme-bg-quote, 10%);
}
&:active {
border-radius: @border-radius;
// border-radius: @border-radius;
border-left: max(@border-radius, @border-left-radius) solid @theme-bg-quote;
}
@ -319,7 +319,8 @@ ul.h-list {
#loading-bar-wrapper {
position: fixed;
top: @header-height - 2;
top: @header-height - 8;
top: 0;
left: 0;
width: 100%;
// overflow: scroll;
@ -329,8 +330,9 @@ ul.h-list {
#loading-bar {
position: fixed;
width: 0;
height: 2px;
background-color: fade(@white, 100%);
height: 8px;
height: @header-height;
background-color: fade(@theme-text-in-header, 20%);
.enable-trans();
}

@ -41,7 +41,7 @@
@ax-blue: #52A1F8;
// 主题色
@theme-base-main: #EFEFEF;
@theme-base-tint: @ax-red;
@theme-base-tint: @ax-light-red;
// 阴影
@base-box-shadow-1: 0 1px 2px 0px rgba(0, 0, 0, 0.1);
@base-box-shadow-2: 0 2px 4px 0px rgba(0, 0, 0, 0.1);
@ -54,18 +54,16 @@
// start: 字体 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@fallback-font-family: Menlo, Monaco, 'Ubuntu', Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif;
// 大部分文字字体
@base-font-family: 'Ubuntu', Menlo, Monaco, @fallback-font-family;
@fontfamily_base: 'Ubuntu', Menlo, Monaco, Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif;
// 代码字体
@code-font-family: Menlo, Monaco, 'Ubuntu', Helvetica, Consolas, monospace, sans-serif, @fallback-font-family;
// 标题字体
@title-font-family: 'Ubuntu', Menlo, Monaco, Helvetica, Consolas, monospace, sans-serif, @fallback-font-family;
@fontfamily_code: Menlo, Monaco, @fontfamily_base;
// LOGO字体
@fontfamily_logo: @fontfamily_base;
// end: 字体 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// start: 字号 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// base
@base-font-size: 16px;
@ -144,12 +142,10 @@
@theme-bg-card: white;
// 卡片标题栏背景
@theme-bg-card-header: @theme-bg-nav-header;
// 按钮背景
@theme-bg-button: @theme-base-main;
// 代码的背景色
@theme-bg-code: @theme-base-tint;
@theme-bg-code: fade(@mac-maximize, 6%);
// 代码块的背景色
@theme-bg-code-block: fade(@theme-base-main, 70%);
@theme-bg-code-block: @theme-bg-code;
// 引用的颜色以及分类、归档的 hover 时颜色
@theme-bg-quote: @theme-base-tint;
// 文字颜色 ----------------

@ -7,7 +7,7 @@
font-size: @small-font-size;
overflow: hidden;
text-align: center;
font-family: @title-font-family;
font-family: @fontfamily_base;
.licenses {
color: fade(@theme-text-main, 50%);
text-decoration: underline;

@ -8,7 +8,7 @@
line-height: @header-height;
height: @header-height;
overflow: hidden;
font-family: @title-font-family;
font-family: @fontfamily_base;
.wrapper{
padding: auto @gap;
.enable-trans();
@ -45,6 +45,7 @@
.logo {
padding: 0 @gap;
font-size: @base-font-size * 1.2;
font-family: @fontfamily_logo;
@media(max-width: @on-phone){
flex: auto;
}
@ -59,10 +60,6 @@
.enable-trans();
display: block;
font-size: @base-font-size * .95;
font-weight: bold;
&::before{
font-weight: lighter;
}
color: fade(@theme-text-in-header,60%);
padding: 0 8px;
&:hover,&.active{
@ -185,7 +182,7 @@
}
height: @header-height - @gap;
line-height: @header-height - @gap;
font-family: @base-font-family;
font-family: @fontfamily_base;
border: none;
border-radius: @border-radius;
background: fade(@theme-text-in-header,15%);

@ -41,21 +41,21 @@
border: none;
padding-left: 2.4em;
padding-right: 2.4em;
background-color: fade(@theme-bg-button, 90%);
background-color: fade(@theme-bg-nav-header, 90%);
color: @theme-text-in-header;
border-radius: @border-radius/2;
.enable-trans();
&:hover {
background: darken(@theme-bg-button, 10%);
background: darken(@theme-bg-nav-header, 10%);
}
&:active {
background: lighten(@theme-bg-button, 20%);
// background: lighten(@theme-bg-nav-header, 20%);
}
}
blockquote{
padding: @gap;
border-left: @border-left-radius solid @theme-bg-quote;
border-radius: @border-code-block;
// border-radius: @border-code-block;
.enable-trans();
p{
text-align: left;
@ -78,12 +78,23 @@
}
.vhead{
span{
color: fade(@vue, 50%);
color: fade(@theme-text-main, 80%);
}
a{
color: @vue;
}
}
.vmeta.vat{
color: @theme-text-link;
.enable-trans();
&:hover {
color: @theme-text-highlight;
text-decoration: underline;
}
&:active {
color: darken(@theme-text-highlight, 25%);
}
}
}
}

@ -11,7 +11,7 @@
position: fixed;
box-shadow: @box-shadow-card-raised;
}
.header{
position: sticky;
width: 100%;
@ -32,7 +32,7 @@
a {
padding-left: 8px;
color: fade(@theme-text-main, 50%);
color: fade(@theme-text-main, 60%);
font-size: @small-font-size;
display: inline-block;
border-left: 4px solid transparent;

@ -2,6 +2,8 @@
&:extend(.z-depth-main);
background: @theme-bg-card;
margin-top: @gap;
font-family: @fontfamily_base;
font-size: @base-font-size;
&:first-child{
margin-top: 0;
}
@ -32,7 +34,7 @@
}
background-color: @theme-bg-card-header;
color: @theme-text-in-header;
font-size: @base-font-size;
font-weight: bold;
line-height: 1.8em;
padding: 8px @gap;
// letter-spacing: .08em;
@ -40,7 +42,6 @@
}
.content{
text-align: justify;
overflow: auto;
padding: @gap/2;
max-height: ~"calc(100% - @{header-height} - 2.5 * @{gap})";
}
@ -49,7 +50,6 @@
padding: 0 @gap;
line-height:@item-height;
height: @item-height;
font-size: @base-font-size;
display: flex;
justify-content: space-between;
align-content: center;

Loading…
Cancel
Save