i18n 1.0.8
xaoxuu 5 years ago
parent ecffb01420
commit 43712c8b8b
  1. 2
      _config.yml
  2. 28
      layout/_partial/article.ejs
  3. 81
      layout/_partial/meta.ejs
  4. 4
      layout/_third-party/share.ejs
  5. 10
      source/less/_article.less
  6. 2
      source/less/_color.less
  7. 5
      source/less/_header.less
  8. 7
      source/less/_layout.less
  9. 136
      source/less/_main.less
  10. 3
      source/less/_normalize.less

@ -8,7 +8,7 @@ info:
name: Material X
docs: https://xaoxuu.com/wiki/material-x/
# 主题的CDN地址。如需启用CDN,请在主目录的config中设置,详见文档。
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.2.21/
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.2.23/
############################### 主题样式 ###############################

@ -6,23 +6,29 @@
</div>
<% if(post.layout == 'post'){ %>
<section class='meta' id="footer-meta">
<% if(!page.meta || page.meta.updated != false){ %>
<time class="metatag time" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>" content="<%- date(post.updated, config.date_format) %>"><i class="fas fa-pencil-alt fa-fw" aria-hidden="true"></i>
&nbsp;<%- date(post.updated, config.date_format) %>
</time>
<% } %>
<% if (post.tags && post.tags.length && (!page.meta || page.meta.tags != false)) { %>
<hr>
<div class='new-meta-box'>
<% if(!page.meta || page.meta.updated != false){ %>
<div class="new-meta-item date" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>">
<a class='notlink'>
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
<%- date(post.updated, config.date_format) %>
</a>
</div>
<% } %>
<% if (post.tags && post.tags.length && (!page.meta || page.meta.tags != false)) { %>
<%
var items = [];
post.tags.each(function(item){
items.push('<div class="metatag tags"><a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i>&nbsp;' + item.name + '</a></div>');
items.push('<div class="new-meta-item meta-tags"><a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-hashtag" aria-hidden="true"></i>&nbsp;' + item.name + '</a></div>');
});
%>
<%- items.join(' ') %>
<% } %>
<% if (theme.services && theme.services.share == true && (config.share || config.mob) && (!page.meta || page.meta.share != false)) { %>
<%- partial('../_third-party/share') %>
<% } %>
<% } %>
<% if (theme.services && theme.services.share == true && (config.share || config.mob) && (!page.meta || page.meta.share != false)) { %>
<%- partial('../_third-party/share') %>
<% } %>
</div>
</section>
<% } %>

@ -29,35 +29,62 @@
<% } %>
<% } %>
<% if(post.date && (!post.meta || post.meta.date != false)){ %>
<time class="metatag time">
<i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>&nbsp;<%= date(post.date, config.date_format) %>
</time>
<% } %>
<% if(post.categories && (!post.meta || post.meta.categories != false)){ %>
<%- partial('categories',{post:post}) %>
<% } %>
<% if(!isPostList && theme.services && (!post.meta || post.meta.counter != false)){ %>
<% if (theme.services.leancloud_visitors == true && config.leancloud_visitors && config.leancloud_visitors.app_id && config.leancloud_visitors.app_key) { %>
<div class="metatag browse leancloud"><i class="fas fa-eye fa-fw" aria-hidden="true"></i>
<span id="<%= url_for(page.path) %>" class="leancloud_visitors" data-flag-title="<%= page.title %>">
&nbsp;<span class="leancloud-visitors-count"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span>
</span>
<div class='new-meta-box'>
<% if(config.author && (!post.meta || post.meta.author != false)){ %>
<div class='new-meta-item author'>
<a href="<%- url_for(config.url) %>">
<i class="fas fa-user" aria-hidden="true"></i>
<%- config.author %>
</a>
</div>
<% } else if (theme.services.busuanzi == true) { %>
<div class="metatag browse busuanzi"><i class="fas fa-eye fa-fw" aria-hidden="true"></i>
&nbsp;<span id="busuanzi_value_page_pv"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span>
<% } %>
<% if(post.date && (!post.meta || post.meta.date != false)){ %>
<div class="new-meta-item date">
<a class='notlink'>
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
<%= date(post.date, config.date_format) %>
</a>
</div>
<% } %>
<% } %>
<% if(isPostList && post.top && (!post.meta || post.meta.top != false)){ %>
<div class="metatag top">
<i class="fas fa-angle-double-up fa-fw" aria-hidden="true"></i>&nbsp;<%- post.top != true ? post.top : __('post.top') %>
</div>
<% } %>
<% if(post.categories && (!post.meta || post.meta.categories != false)){ %>
<% if (post.categories && post.categories.length && post.categories.forEach){ %>
<%
var cats = [];
var path;
post.categories.forEach(function(cat){
cats.push(cat.name);
path = cat.path;
});
%>
<div class='new-meta-item category'>
<a href='<%- url_for(path) %>'>
<i class="fas fa-folder-open" aria-hidden="true"></i>
<%- cats.join('&nbsp;/&nbsp;') %>
</a>
</div>
<% } %>
<% } %>
<% if(!isPostList && theme.services && (!post.meta || post.meta.counter != false)){ %>
<% if (theme.services.busuanzi == true) { %>
<div class="new-meta-item browse busuanzi">
<a class='notlink'>
<i class="fas fa-eye" aria-hidden="true"></i>
<span id="busuanzi_value_page_pv">
<i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
</span>
</a>
</div>
<% } %>
<% } %>
<% if(isPostList && post.top && (!post.meta || post.meta.top != false)){ %>
<div class="new-meta-item top-post">
<a class='notlink'>
<i class="fas fa-angle-double-up" aria-hidden="true"></i>
<%- post.top != true ? post.top : __('post.top') %>
</a>
</div>
<% } %>
</div>
<hr>
</div>
</section>

@ -1,6 +1,6 @@
<% if (theme.services && theme.services.share == true && (config.share || config.mob) && page.layout == 'post' && page.share != false) { %>
<div class='metatag share -mob-share-list'>
<i class="left fas fa-share-alt fa-fw" aria-hidden="true"></i>
<div class="new-meta-item share -mob-share-list">
<i class="fas fa-share-alt" aria-hidden="true"></i>
<div class="-mob-share-list share-body">
<% ((config.share || config.mob.list)||[]).forEach(function(item){ %>
<% if (item.id == 'qrcode' && theme.services.qrcode == true){ %>

@ -19,11 +19,6 @@
margin: auto;
}
}
hr {
border: 0;
border-radius: 1px;
border-bottom: 1px solid rgba(0,0,0,0.1);
}
p.small-img,
div.small-img {
img {
@ -118,10 +113,12 @@
}
h2 {
font-size: @fontsize_h2;
text-align: @text_align_h2;
}
h3 {
font-size: @fontsize_h3;
color: darken(@color_text_main, 20%);
color: @color_text_h3;
text-align: @text_align_h3;
}
h4 {
font-weight: bold;
@ -131,7 +128,6 @@
font-weight: bold;
color: @color_text_main;
font-size: @fontsize_h5;
}
h6 {
color: fade(@color_text_main, 75%);

@ -28,6 +28,8 @@
// 文字颜色 ----------------
// 标题文字颜色(h1/h2)
@color_text_header: @theme_main;
// 标题文字颜色(h3)
@color_text_h3: darken(@color_text_main, 20%);
// 链接颜色
@color_text_link: @color_md_deep_orange;
// 链接高亮颜色

@ -9,7 +9,6 @@
height: @height_navbar;
overflow: hidden;
font-family: @fontfamily_base;
font-weight: bold;
padding: 0 @gap;
.wrapper{
padding: auto @gap;
@ -170,11 +169,11 @@
line-height: @height_navbar - @gap;
top: 0;
left: @gap/2;
font-size: @fontsize_small;
font-size: @fontsize_base;
}
.input {
display:block;
font-size: @fontsize_small;
font-size: @fontsize_base;
line-height: @height_navbar - @gap;
margin: 0;
width: 100%;

@ -41,3 +41,10 @@
@border_radius_searchbar: 4px; // 搜索框的圆角半径,可以根据心情随时调整风格
// end: 圆角 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// start: 文字对齐方向 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@text_align_h1: left;
@text_align_h2: left;
@text_align_h3: left;
// end: 文字对齐方向 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

@ -142,21 +142,21 @@
border-left: none;
}
.vh {
border-bottom: 1px dashed fade(@color_text_main, 10%);
border-bottom: 1px dashed fade(@color_text_main, 10%);
}
}
.vmeta{
.vat{
font-weight: bold;
color: @theme_main;
.enable-trans();
&:hover {
color: @color_text_highlight;
text-decoration: underline;
}
&:active {
color: darken(@color_text_highlight, 25%);
}
color: @theme_main;
.enable-trans();
&:hover {
color: @color_text_highlight;
text-decoration: underline;
}
&:active {
color: darken(@color_text_highlight, 25%);
}
}
}
.vinput{
@ -255,8 +255,7 @@
.post {
position: relative;
margin: 0 auto;
padding: 2 * @gap 1.5*@gap;
//max-width: 768px;
padding: 2*@gap 1.5*@gap;
background: @theme_cardbg;
border-radius: @border_radius;
h1{
@ -316,8 +315,10 @@
}
.title {
left: 0;
// left: 0;
text-align: @text_align_h1;
font-size: @fontsize_article_title;
margin: 0;
@media(max-width: @on_phone) {
font-size: @fontsize_article_title_phone;
}
@ -339,92 +340,69 @@
}
}
}
.tags{
display: inline-flex;
background: transparent;
word-spacing: normal;
}
@cellH: 28px;
.metatag {
.enable-trans();
font-size: @fontsize_small * .95;
line-height: @cellH + 1px;
height: @cellH;
.new-meta-box{
@metaH: 24px;
.enable-trans();
padding-bottom: 8px;
display: flex;
align-items: center;
flex-wrap: wrap;
.new-meta-item{
color: fade(@color_text_main, 70%);
display: inline-flex;
background: @theme_background;
margin: 4px 4px 4px 0px;
padding: 0px 8px 0px 2px;
border-radius: 0.5*@border_radius_code_block;
border-left: 25px solid lighten(@theme_main, 10%);
&:hover {
background: lighten(@theme_main, 10%);
color: @color_text_in_header;
a{
color: @color_text_in_header;
}
.fas, .fab{
color: @color_text_in_header;
font-size: @fontsize_small * 1;
line-height: @metaH;
.notlink{
cursor: default;
&:hover{
color: fade(@color_text_main, 70%);
}
border-left-width: 30px;
padding-right: 10px;
}
i{
width: 28px;
line-height: @cellH;
color: @color_text_in_header;
margin-left: -28px;
display: flex;
align-items: center;
padding: 2px;
margin: 4px 8px 4px 0;
border-radius: 4px;
&:last-child{
margin-right: 0;
}
a{
color: fade(@color_text_main, 70%);
.enable-trans();
&:hover {
color: @color_text_highlight;
color: @color_text_in_header;
}
img,i{
border-radius: 100%;
display: inline;
width: @metaH - 4px;
}
.categories {
font-weight: normal;
color: fade(@color_text_main, 70%);
img{
width: @metaH - 10px;
}
.tag,{
color: fade(@color_text_main, 70%);
i{
margin-right: 2px;
}
.fa-spinner{
p,a{
color: fade(@color_text_main, 70%);
margin-left: 2px;
padding-left: 0;
padding-right: 4px;
}
a{
&:hover{
color: @color_text_highlight;
text-decoration: none;
}
}
}
.share{
&:hover {
background: @theme_background;
}
.share-body{
height: @metaH - 2px;
display: flex;
a{
margin-left: 4px;
padding: 0;
margin-right: 4px;
img{
margin: 2px 0;
height: @cellH - 4px;
height: @metaH - 2px;
width: auto;
background: transparent;
}
i{
display: inline-block;
margin: 0;
padding: 0;
color: fade(@color_text_main, 70%);
}
padding-bottom: 0;
margin-bottom: 0;
&:hover{
// background: darken(@color_md_orange, 10%);
text-decoration: none;
}
}
}
}
}

@ -212,6 +212,9 @@ hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
border: 0;
border-radius: 1px;
border-bottom: 1px solid rgba(0,0,0,0.1);
}
/**

Loading…
Cancel
Save