i18n
xaoxuu 6 years ago
parent d64be958f6
commit 0c42075f2a
  1. 2
      _config.yml
  2. 7
      layout/_partial/scripts.ejs
  3. 2173
      source/js/volantis.js
  4. 12
      source/less/_header.less
  5. 14
      source/less/_main.less
  6. 19
      source/less/_toc.less
  7. 504
      source/less/_widget.less

@ -5,7 +5,7 @@ theme_info:
version: 1.0-beta10
docs: https://xaoxuu.com/wiki/material-x/
# 主题的CDN地址,如果你的源码托管到国内CDN可以更改此链接。如需启用CDN,请在主目录的config中设置import,详见文档。
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@18.12.30/
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@18.12.31/
##########################################################################
# 请务必阅读官方文档!!!
# 请务必阅读官方文档!!!

@ -69,7 +69,12 @@
<% if (config.valine){ %>
<% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0-beta2/js/volantis.js"></script>
<% if (config.import && config.import.js == true) { %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0-beta3/js/volantis.min.js"></script>
<% } else { %>
<%- js('js/volantis.js') %>
<% } %>
<script>
var GUEST_INFO = ['nick','mail','link'];
var guest_info = '<%= config.valine.guest_info %>'.split(',').filter(function(item){

File diff suppressed because one or more lines are too long

@ -301,14 +301,14 @@
position: fixed;
top: @height_navbar + @gap;
right: 0;
width: ~"calc(100% - 2*@{gap})";
z-index:9999 + 1;
line-height: 2 * @gap;
background: white;
border-right: 0;
box-shadow: @boxshadow_card_raised;
border-radius: @border_radius;
transform: translate3d(~"calc(100% + 2*@{gap})", -0, 0);
transform: translate3d(-40px, -40px, 0) scale(0,0);
transform-origin: right top;
.enable-trans();
&:hover {
box-shadow: @boxshadow_card_raised;
@ -324,16 +324,12 @@
position: relative;
display: block;
color: @black;
// font-size: 0.8125em;
padding: 2px 20px;
border-left: 2px solid transparent;
&:hover{
border-left: 4px solid transparent;
&:hover,&.active{
border-left: 4px solid @theme_main;
background: fade(@theme_main, 10%);
}
&.active{
border-left: 4px solid @theme_main;
}
}
}
}

@ -140,15 +140,15 @@
}
.vemojis{
display: flex;
justify-content: space-between;
i{
width: 38px;
height: 50px;
align-content: center;
width: auto;
height: 36px;
padding: 0;
margin: 8px 8px 0 8px;
.emoji{
padding: 6px 8px 10px 8px;
align-self: center;
display: flex;
vertical-align: middle;
height: 24px;
}
}
}

@ -4,9 +4,6 @@
border-radius: @border_radius;
position: sticky;
top: @height_navbar + 1*@gap;
// bottom: @gap;
// max-height: ~"calc(100% - 2 * @{gap} - @{height_navbar})";
// max-height: 600px;
.enable-trans();
header{
position: sticky;
@ -43,18 +40,22 @@
}
}
}
.enable-trans();
@media(max-width: @on_phone){
position: fixed;
width: ~"calc(100% - 2 * @{gap})";
// width: ~"calc(100% - 2 * @{gap})";
top: @height_navbar;
left: @gap;
box-shadow: @boxshadow_card_raised;
display: none;
visibility: hidden;
.rightBtn{
display: none;
}
transform: scale(0,0);
transform-origin: right top;
&.active{
display: block;
visibility: visible;
transform: scale(1,1);
}
}
a {

@ -1,315 +1,281 @@
.l_side section{
z-index: 0;
&:extend(.z-depth-main);
background: @theme_cardbg;
margin-top: @gap;
font-family: @fontfamily_base;
font-size: @fontsize_base;
&:first-child{
margin-top: 0;
}
// margin-left: @gap;
border-radius: @border_radius;
.enable-trans();
&:hover {
box-shadow: @boxshadow_card_raised;
}
&:active {
box-shadow: @boxshadow_card_normal;
}
z-index: 0;
&:extend(.z-depth-main);
background: @theme_cardbg;
margin-top: @gap;
font-family: @fontfamily_base;
font-size: @fontsize_base;
&:first-child{
margin-top: 0;
}
border-radius: @border_radius;
.enable-trans();
&:hover {
box-shadow: @boxshadow_card_raised;
}
&:active {
box-shadow: @boxshadow_card_normal;
}
width: @width_sidebar;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
}
@media(max-width: @on_pad) {
width: 100%;
}
@media(max-width: @on_phone) {
border-radius: 0;
&:hover {
box-shadow: @boxshadow_card_normal;
width: @width_sidebar;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
}
@media(max-width: @on_pad) {
width: 100%;
}
@media(max-width: @on_phone) {
width: ~"calc(100% - 2 * @{gap})";
margin: @gap @gap 0 @gap;
}
max-height: ~"calc(100% - @{height_navbar} - 4 * @{gap})";
header{
display: flex;
justify-content: space-between;
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
background-color: @color_bg_navbar;
color: @color_text_in_header;
font-weight: bold;
line-height: 1.5em;
padding: 8px @gap;
.rightBtn{
color: @color_text_in_header;
&:hover {
color: darken(@color_text_highlight, 25%);
&.rotate90{
transform: rotate(90deg);
}
}
}
max-height: ~"calc(100% - @{height_navbar} - 4 * @{gap})";
header{
display: flex;
justify-content: space-between;
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
@media(max-width: @on_phone) {
border-radius: 0;
}
background-color: @color_bg_navbar;
color: @color_text_in_header;
font-weight: bold;
line-height: 1.5em;
padding: 8px @gap;
.rightBtn{
color: @color_text_in_header;
&:hover {
color: darken(@color_text_highlight, 25%);
&.rotate90{
transform: rotate(90deg);
}
}
}
&.pure{
background-color: @theme_cardbg;
color: @theme_main;
padding-top: 14px; // 适合白色导航栏背景
padding-bottom: 14px; // 适合白色导航栏背景
.rightBtn{
color: @theme_main;
&:hover {
color: darken(@color_text_highlight, 25%);
}
}
&.pure{
background-color: @theme_cardbg;
color: @theme_main;
padding-top: 14px; // 适合白色导航栏背景
padding-bottom: 14px; // 适合白色导航栏背景
.rightBtn{
color: @theme_main;
&:hover {
color: darken(@color_text_highlight, 25%);
}
}
}
.content{
text-align: justify;
padding: @gap/2;
max-height: ~"calc(100% - @{height_navbar} - 12.5 * @{gap})";
ul.entry > li > a{
padding: 0 @gap;
line-height: @height_cell;
height: @height_cell;
display: flex;
justify-content: space-between;
align-content: center;
border-left: 2px solid transparent;
.enable-trans();
.name{
flex:auto;
&:extend(.txt-ellipsis);
color: fade(@color_text_main, 80%);
}
.badge{
flex:none;
font-size: @fontsize_small;
color: fade(@color_text_main, 70%);
}
&:hover{
border-left: 4px solid @theme_main;
background: fade(@theme_main, 10%);
}
&:active{
border-left: 8px solid @theme_main;
}
}
}
.content{
text-align: justify;
padding: @gap/2;
max-height: ~"calc(100% - @{height_navbar} - 12.5 * @{gap})";
ul.entry > li > a{
padding: 0 @gap;
line-height: @height_cell;
height: @height_cell;
display: flex;
justify-content: space-between;
align-content: center;
border-left: 2px solid transparent;
.enable-trans();
.name{
flex:auto;
&:extend(.txt-ellipsis);
color: fade(@color_text_main, 80%);
}
.badge{
flex:none;
font-size: @fontsize_small;
color: fade(@color_text_main, 70%);
}
&:hover{
border-left: 4px solid @theme_main;
background: fade(@theme_main, 10%);
}
&:active{
border-left: 8px solid @theme_main;
}
}
}
&.author{
.enable-trans();
.content{
&.author{
.enable-trans();
.content{
padding: 0;
div.avatar{
display: flex;
justify-content: center;
}
img{
padding: 0;
.avatar{
padding: 0;
margin: 0;
display: flex;
justify-content: center;
background-color: transparent;
@media(max-width: @on_pad){
padding: @gap/2;
}
width: @width_sidebar;
height: @width_sidebar;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
height: @width_sidebar_m;
}
@media(max-width: @on_pad){
width: 80px;
height: 80px;
border-radius: 100%;
margin-top: @gap/2;
}
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
}
h2{
text-align: center;
font-weight: bold;
margin: @gap/2;
@media(max-width: @on_pad){
margin: @gap/2;
}
}
p{
font-size: @fontsize_base;
text-align: center;
margin: @gap/2 @gap/2 0 @gap/2;
empty-cells: hide;
}
.social-wrapper{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 4px @gap/2;
a{
color: fade(@color_text_main, 70%);
.enable-trans();
&:hover{
color: @color_text_highlight;
}
&.social {
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
margin: 4px;
border-radius: 100px;
&:hover {
background: fade(@theme_main, 10%);
color: @theme_main;
}
}
}
margin: 0;
display: flex;
justify-content: center;
width: @width_sidebar;
height: @width_sidebar;
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
height: @width_sidebar_m;
}
@media(max-width: @on_pad){
box-shadow: none;
background: @theme_background;
.social-wrapper{
justify-content: center;
}
width: 96px;
height: 96px;
border-radius: 100%;
margin-top: @gap/2;
padding: @gap/2;
}
}
}
&.plain{
.content{
font-size: @fontsize_small;
}
h2{
text-align: center;
font-weight: bold;
word-break: break-all;
padding: @gap/2 @gap;
line-height: @fontsize_small + 8px;
&.pure{
padding: 0 @gap @gap @gap; // 适合白色导航栏背景
margin: @gap/2;
@media(max-width: @on_pad){
margin: @gap/2;
}
}
p{
font-size: @fontsize_base;
text-align: center;
margin: @gap/2 @gap/2 0 @gap/2;
empty-cells: hide;
}
.social-wrapper{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 4px @gap/2;
a{
color: @color_text_link;
color: fade(@color_text_main, 70%);
.enable-trans();
&:hover {
&:hover{
color: @color_text_highlight;
text-decoration: underline;
}
&:active {
color: darken(@color_text_highlight, 25%);
&.social {
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
margin: 4px;
border-radius: 100px;
&:hover {
background: fade(@theme_main, 10%);
color: @theme_main;
}
}
}
@media(max-width: @on_pad){
justify-content: center;
}
}
}
@media(max-width: @on_pad){
box-shadow: none;
background: @theme_background;
margin-top: 2*@gap;
}
}
&.list{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
&.plain{
.content{
font-size: @fontsize_small;
font-weight: bold;
word-break: break-all;
padding: @gap/2 @gap;
line-height: @fontsize_small + 8px;
&.pure{
padding: 0 @gap @gap @gap; // 适合白色导航栏背景
}
a{
color: @color_text_link;
.enable-trans();
&:hover {
color: @color_text_highlight;
text-decoration: underline;
}
a{
font-size: @fontsize_small;
font-weight: bold;
&:hover{
text-decoration: none;
}
i{
color: fade(@color_text_main,70%);
line-height: @height_cell;
margin-right: 3px;
}
img{
display: inline;
vertical-align: middle;
height: 18px;
width: 18px;
margin-bottom: 4px;
&#round{
border-radius: 100%;
}
}
&:active {
color: darken(@color_text_highlight, 25%);
}
}
}
}
&.category{
.content{
padding: @gap/2 0;
&.list{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
a{
font-size: @fontsize_small;
font-weight: bold;
&.pure{
padding-top: 0; // 适合白色导航栏背景
&:hover{
text-decoration: none;
}
i{
color: fade(@color_text_main,70%);
line-height: @height_cell;
margin-right: 3px;
}
img{
display: inline;
vertical-align: middle;
height: 18px;
width: 18px;
margin-bottom: 4px;
&#round{
border-radius: 100%;
}
}
}
}
}
&.tagcloud{
.content{
text-align: justify;
padding: @gap/2 @gap;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
a{
display:inline-block;
.enable-trans(.1s);
line-height: 1.6em;
&:hover{
color: @color_text_highlight !important; //to cover inline style.
text-decoration: underline
}
}
}
&.category{
.content{
padding: @gap/2 0;
font-size: @fontsize_small;
font-weight: bold;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
}
}
&.music{
header{
&.tagcloud{
.content{
text-align: justify;
padding: @gap/2 @gap;
&.pure{
padding-bottom: @gap/4; // 适合白色导航栏背景
padding-top: 0; // 适合白色导航栏背景
}
}
.content{
padding: @gap/2+4px;
padding-top: @gap/2;
&.pure{
padding-top: @gap/4; // 适合白色导航栏背景
}
.aplayer{
border-radius: 4px;
a{
display:inline-block;
.enable-trans(.1s);
line-height: 1.6em;
&:hover{
color: @color_text_highlight !important; //to cover inline style.
text-decoration: underline
}
}
}
}
}
}
&.links{
header{
.rightBtn{
&:hover{
transform: rotate(90deg);
}
}
&.music{
header{
&.pure{
padding-bottom: @gap/4; // 适合白色导航栏背景
}
}
.content{
padding: @gap/2+4px;
padding-top: @gap/2;
&.pure{
padding-top: @gap/4; // 适合白色导航栏背景
}
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
.name{
img{
display: inline;
border-radius: 100%;
vertical-align: middle;
height: 18px;
width: 18px;
margin-bottom: 4px;
}
}
.aplayer{
border-radius: 4px;
}
}
}
}

Loading…
Cancel
Save