Merge remote-tracking branch 'origin/v1.2' into myblog

i18n
xaoxuu 5 years ago
commit f803fa1e49
  1. 4
      _config.yml
  2. 6
      layout/index.ejs
  3. 2
      source/js/app.js
  4. 30
      source/less/_base.less

@ -2,7 +2,7 @@
info:
name: Material X
docs: https://xaoxuu.com/wiki/material-x/
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.2/
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.6/
############################### 主题样式 ###############################
@ -48,7 +48,7 @@ loading_img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png
# 主页封面
home_cover:
title: "xaoxuu"
logo:
# logo: assets/logo.png
search_placeholder: ' '
# 主页封面菜单
menu:

@ -2,7 +2,11 @@
<% if (page.prev == 0) { %>
<div class="home-wrapper">
<div class='home-cover'>
<h1 class='title'><%- theme.home_cover.title %></h1>
<% if (theme.home_cover.logo) { %>
<img class='logo' src='<%- url_for(theme.home_cover.logo) %>'/>
<% } else { %>
<h1 class='title'><%- theme.home_cover.title ? theme.home_cover.title : config.title %></h1>
<% } %>
<br>
<% if (theme.search.enable === true) { %>
<div class="m_search">

@ -31,7 +31,7 @@ var customSearch;
}
$top.click(()=>scrolltoElement(document.body));
if (scrollTop > 400) {
if (scrollTop > document.body.clientHeight - 100) {
$header.addClass('show');
} else {
$header.removeClass('show');

@ -45,29 +45,37 @@ body {
.home-cover{
top: 0;
left: 0;
width: 100%;
// height: 100vh - @height_navbar - @gap;
max-width: 100%;
height: ~"calc(100vh - @{gap} - @{height_navbar})";
display: flex;
flex-wrap: wrap;
flex-wrap: nowrap;
flex-direction: column;
// background: white;
margin-bottom: 2*@gap;
align-items: center;
align-self: center;
align-content: center;
padding: @gap;
.title{
.title, .logo{
font-size: @fontsize_h1*3;
margin-top: 30vh;
align-self: center;
line-height: @fontsize_h1*3.3;
margin-top: 28vh;
text-align: center;
font-weight: bold;
@media(max-width: @on_phone){
margin-top: 24vh;
}
.logo{
max-height: 150px;
max-width: ~"calc(100% - 4*@{gap})";
}
@media(max-width: @on_phone){
.title, .logo {
margin-top: 20vh;
font-size: @fontsize_h1*2;
line-height: @fontsize_h1*2.2;
}
}
.m_search{
margin-top: 5vh;
margin-top: 2vh;
position: relative;
height: @height_navbar - @gap;
width: 1.1*@width_sidebar;
@ -97,6 +105,7 @@ body {
.input {
display:block;
color: @color_text_main;
background: lighten(@theme_cardbg, 10%);
font-size: @fontsize_base;
line-height: @fontsize_base*2.2;
margin: 0;
@ -109,7 +118,6 @@ body {
}
font-family: @fontfamily_base;
border: none;
background: white;
box-sizing: border-box;
-webkit-appearance: none;
box-shadow: none;

Loading…
Cancel
Save