Merge remote-tracking branch 'origin/master' into docs

# Conflicts:
#	_config.yml
i18n
xaoxuu 4 years ago
commit e5822390ba
  1. 27
      _config.yml
  2. 5
      layout/_cover/search.ejs
  3. 4
      layout/_partial/header.ejs
  4. 7
      layout/_widget/category.ejs
  5. 2
      layout/_widget/grid.ejs
  6. 9
      layout/_widget/header.ejs
  7. 3
      layout/_widget/list.ejs
  8. 6
      source/js/app.js
  9. 41
      source/less/_base.less
  10. 25
      source/less/_side.less

@ -5,13 +5,13 @@ info:
docs: https://xaoxuu.com/wiki/volantis/ docs: https://xaoxuu.com/wiki/volantis/
cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css: css:
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.27/css/style.css style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.29/css/style.css
js: js:
app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/app.js app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.29/js/app.js
search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/search.js search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.29/js/search.js
volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.6/js/volantis.min.js volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.6/js/volantis.min.js
backstretch: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/backstretch.min.js backstretch: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.29/js/backstretch.min.js
commentTyping: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/commentTyping.js commentTyping: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.29/js/commentTyping.js
############################### 服务开关 ############################### ############################### 服务开关 ###############################
@ -31,12 +31,12 @@ style:
# 导航栏阴影 # 导航栏阴影
nav: true nav: true
# 卡片阴影和悬浮动画 # 卡片阴影和悬浮动画
# card: true card: true
# 毛玻璃效果 具体效果调整在: source/less/_color.less # 毛玻璃效果 具体效果调整在: source/less/_color.less
blur: blur:
navbar: true # navbar: true
widget: true # widget: true
body: true # body: true
# 建议: # 建议:
# 有背景图:开启毛玻璃,关闭卡片阴影 # 有背景图:开启毛玻璃,关闭卡片阴影
# 无背景图:关闭毛玻璃,开启卡片阴影 # 无背景图:关闭毛玻璃,开启卡片阴影
@ -45,7 +45,7 @@ style:
# 幻灯片背景 # 幻灯片背景
backstretch: backstretch:
position: background # cover: 封面背景 background: 整个网页背景 position: cover # cover: 封面背景 fixed: 整个网页背景
duration: 10000 # 持续时间(毫秒) duration: 10000 # 持续时间(毫秒)
fade: 2500 # 渐变(毫秒) fade: 2500 # 渐变(毫秒)
is_dark: # true # 图片是否是暗色的(调整文字为白色) is_dark: # true # 图片是否是暗色的(调整文字为白色)
@ -60,10 +60,11 @@ backstretch:
# page的封面 # page的封面
cover: cover:
scheme: search # 后期将会提供多种封面布局方案 scheme: search # 后期将会提供多种封面布局方案
height: half # full(默认值): 首页封面占据整个第一屏幕,其他页面占半个屏幕高度, half: 所有页面都封面都只占半个屏幕高度 height: full # full(默认值): 首页封面占据整个第一屏幕,其他页面占半个屏幕高度, half: 所有页面都封面都只占半个屏幕高度
title: Volantis title: Volantis
# logo: assets/logo.png # logo和title只显示一个,若同时设置,则只显示logo subtitle: 山重水复疑无路 柳暗花明又一村
search: 'for Hexo 4.2+' logo: # assets/logo.png # logo和title只显示一个,若同时设置,则只显示logo
search: 'A Wonderful Theme for Hexo 4.2+'
# 主页封面菜单 # 主页封面菜单
features: features:
- name: 公告 - name: 公告

@ -2,6 +2,9 @@
<img class='logo' src='<%- url_for(theme.cover.logo) %>'/> <img class='logo' src='<%- url_for(theme.cover.logo) %>'/>
<% } else { %> <% } else { %>
<p class="title <%- theme.backstretch && theme.backstretch.is_dark ? 'white' : '' %>"><%- theme.cover.title ? theme.cover.title : config.title %></p> <p class="title <%- theme.backstretch && theme.backstretch.is_dark ? 'white' : '' %>"><%- theme.cover.title ? theme.cover.title : config.title %></p>
<% if (theme.cover.subtitle) { %>
<p class="subtitle <%- theme.backstretch && theme.backstretch.is_dark ? 'white' : '' %>"><%- theme.cover.subtitle%></p>
<% } %>
<% } %> <% } %>
<% if (theme.search.enable === true) { %> <% if (theme.search.enable === true) { %>
<div class="m_search"> <div class="m_search">
@ -11,7 +14,7 @@
</form> </form>
</div> </div>
<% } %> <% } %>
<div class='menu navgation'> <div class='menu navigation'>
<ul class='h-list'> <ul class='h-list'>
<% if (theme.cover.features) { %> <% if (theme.cover.features) { %>
<% (theme.cover.features || []).forEach(function(value){ %> <% (theme.cover.features || []).forEach(function(value){ %>

@ -17,7 +17,7 @@
<% } %> <% } %>
<% } %> <% } %>
</a> </a>
<div class='menu navgation'> <div class='menu navigation'>
<ul class='h-list'> <ul class='h-list'>
<% if (theme.navbar.menu.on_desktop) { %> <% if (theme.navbar.menu.on_desktop) { %>
<% (theme.navbar.menu.on_desktop || []).forEach(function(value){ %> <% (theme.navbar.menu.on_desktop || []).forEach(function(value){ %>
@ -66,7 +66,7 @@
</header> </header>
<aside class="menu-phone white-box"> <aside class="menu-phone white-box">
<header> <header>
<nav class="menu navgation"> <nav class="menu navigation">
<ul> <ul>
<% if (theme.navbar.menu.on_mobile) { %> <% if (theme.navbar.menu.on_mobile) { %>
<% (theme.navbar.menu.on_mobile || []).forEach(function(value){ %> <% (theme.navbar.menu.on_mobile || []).forEach(function(value){ %>

@ -2,9 +2,12 @@
<section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'> <section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'>
<%- partial('header', {item: item}) %> <%- partial('header', {item: item}) %>
<div class='content'> <div class='content'>
<ul class="entry"> <ul class="entry navigation">
<% site.categories.sort('path').each(function(category){ %> <% site.categories.sort('path').each(function(category){ %>
<li><a class="flat-box<%= category.parent ? ' child' : ''%>" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'>(<%- category.posts.length %>)</div></a></li> <li><a class="flat-box<%= category.parent ? ' child' : ''%>"
title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"
id="<%= url_for(category.path).replace(/\/|%/g, "")?url_for(category.path).replace(/\/|%/g, ""):"home" %>"
><div class='name'><%- category.name %></div><div class='badge'>(<%- category.posts.length %>)</div></a></li>
<% }) %> <% }) %>
</ul> </ul>
</div> </div>

@ -1,7 +1,7 @@
<section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'> <section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'>
<%- partial('header', {item: item}) %> <%- partial('header', {item: item}) %>
<div class='content'> <div class='content'>
<ul class="grid navgation"> <ul class="grid navigation">
<% (item.rows||[]).forEach(function(row){ %> <% (item.rows||[]).forEach(function(row){ %>
<li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>" <li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>"
<% if (row.rel) { %> <% if (row.rel) { %>

@ -1,5 +1,12 @@
<header> <header>
<div><i class="<%- item.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%- item.title %></div> <div>
<% if (item.backurl) { %>
<a href='<%- item.backurl %>'><i class="<%- item.icon %> fa-fw" aria-hidden="true"></i><span class='name'><%- item.title %></span></a>
<% } else { %>
<i class="<%- item.icon %> fa-fw" aria-hidden="true"></i><span class='name'><%- item.title %></span>
<% } %>
</div>
<% if (item.class == 'toc') { %> <% if (item.class == 'toc') { %>
<!-- <div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div> --> <!-- <div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div> -->
<% } else if(item.more && item.more.url) { %> <% } else if(item.more && item.more.url) { %>

@ -1,7 +1,7 @@
<section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'> <section class='widget <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.widget ? 'widget-blur' : '' %> <%- item.class %>'>
<%- partial('header', {item: item}) %> <%- partial('header', {item: item}) %>
<div class='content'> <div class='content'>
<ul class="entry"> <ul class="list entry navigation">
<% (item.rows||[]).forEach(function(row){ %> <% (item.rows||[]).forEach(function(row){ %>
<li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>" <li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>"
<% if (row.rel) { %> <% if (row.rel) { %>
@ -10,6 +10,7 @@
<% if (row.target) { %> <% if (row.target) { %>
target="<%- row.target %>" target="<%- row.target %>"
<% } %> <% } %>
id="<%= url_for(row.url).replace(/\/|%/g, "")?url_for(row.url).replace(/\/|%/g, ""):"home" %>"
> >
<div class='name'> <div class='name'>
<% if(row.img) { %> <% if(row.img) { %>

@ -50,7 +50,7 @@ var customSearch;
const $coverAnchor = $('.cover-wrapper'); const $coverAnchor = $('.cover-wrapper');
var showHeaderPoint = 0; var showHeaderPoint = 0;
if ($coverAnchor[0]) { if ($coverAnchor[0]) {
showHeaderPoint = $coverAnchor[0].clientHeight - 164; showHeaderPoint = $coverAnchor[0].clientHeight - 80;
} }
var pos = document.body.scrollTop; var pos = document.body.scrollTop;
$(document, window).scroll(() => { $(document, window).scroll(() => {
@ -118,7 +118,7 @@ var customSearch;
} }
function setHeaderMenuSelection() { function setHeaderMenuSelection() {
var $headerMenu = $('body .navgation'); var $headerMenu = $('body .navigation');
// 先把已经激活的取消激活 // 先把已经激活的取消激活
$headerMenu.find('li a.active').removeClass('active'); $headerMenu.find('li a.active').removeClass('active');
// var $underline = $headerMenu.find('.underline'); // var $underline = $headerMenu.find('.underline');
@ -307,4 +307,4 @@ var customSearch;
}, 300); }, 300);
}); });
})(jQuery); })(jQuery);

@ -62,16 +62,18 @@ fancybox{
align-items: center; align-items: center;
align-self: center; align-self: center;
align-content: center; align-content: center;
color: fade(@color_text_main, 85%); color: fade(@color_text_main, 75%);
// padding: @gap; padding: @gap;
.title, .logo{ .title, .logo{
font-size: @fontsize_h1*2;
margin-top: ~"calc(28vh - 2*@{gap})"; margin-top: ~"calc(28vh - 2*@{gap})";
text-align: center; text-align: center;
font-weight: bold;
} }
.title{ .title{
line-height: ~"calc(@{fontsize_h1}*2 + 2*@{gap})"; font-size: @fontsize_h1*2;
line-height: @fontsize_h1*2;
}
.subtitle{
font-size: @fontsize_small;
} }
.logo{ .logo{
max-height: 100px; max-height: 100px;
@ -83,14 +85,14 @@ fancybox{
} }
@media(max-width: @on_phone){ @media(max-width: @on_phone){
.title, .logo { .title, .logo {
font-size: @fontsize_h1*2; font-size: @fontsize_h1*1.7;
line-height: @fontsize_h1*2.2; line-height: @fontsize_h1*1.7;
} }
} }
.m_search{ .m_search{
@iconW: 32px; @iconW: 32px;
@iconMargin: 4px; @iconMargin: 4px;
margin-top: ~"calc(2vh + 2*@{gap})"; margin-top: ~"calc(2vh + 32px)";
position: relative; position: relative;
max-width: ~"calc(100% - 1*@{gap})"; max-width: ~"calc(100% - 1*@{gap})";
width: 340px; width: 340px;
@ -137,6 +139,7 @@ fancybox{
border: 1px dashed transparent; border: 1px dashed transparent;
.set-placeholder({ .set-placeholder({
padding-top: 2px; padding-top: 2px;
font-size: @fontsize_small;
color: fade(@color_text_main, 60%); color: fade(@color_text_main, 60%);
}); });
&:hover{ &:hover{
@ -154,19 +157,25 @@ fancybox{
} }
&.half{ &.half{
height: ~"calc(60vh - @{gap} - @{height_navbar} + 6*@{gap})"; margin-bottom: ~"calc(-100px)";
margin-bottom: ~"calc(-6*@{gap})"; height: ~"calc(60vh - @{height_navbar} + 120px)";
.title, .logo{ .title, .logo{
margin-top: ~"calc(24vh - 4*@{gap})"; margin-top: ~"calc(28vh - 80px)";
} }
@media(max-width: @on_phone){ .m_search{
height: ~"calc(45vh - @{gap} - @{height_navbar} + 6*@{gap})"; margin-top: @gap*2;
}
@media(max-width: @on_pad){
height: ~"calc(40vh - @{height_navbar} + 160px)";
.title, .logo{ .title, .logo{
margin-top: ~"calc(24vh - 6*@{gap})"; margin-top: ~"calc(22vh - 90px)";
} }
} }
.m_search{ @media(max-width: @on_phone){
margin-top: @gap; height: ~"calc(30vh - @{height_navbar} + 200px)";
.title, .logo{
margin-top: ~"calc(22vh - 70px)";
}
} }
} }
.menu{ .menu{

@ -32,11 +32,19 @@
justify-content: space-between; justify-content: space-between;
border-top-left-radius: @border_radius; border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius; border-top-right-radius: @border_radius;
color: @theme_main;
font-weight: bold; font-weight: bold;
line-height: 1.5em; line-height: 1.5em;
padding: ~"calc(@{gap} - 2px)"; padding: ~"calc(@{gap} - 2px)";
padding-bottom: 0; padding-bottom: 0;
&,a{
color: @theme_main;
}
a:hover{
color: @color_text_highlight;
}
span.name{
margin-left: @gap/2;
}
.rightBtn{ .rightBtn{
color: @theme_main; color: @theme_main;
&:hover { &:hover {
@ -55,11 +63,12 @@
a{ a{
color: fade(@color_text_main, 80%); color: fade(@color_text_main, 80%);
padding: 0 @gap; padding: 0 @gap;
padding-left: @gap/2 + 4px;
line-height: @height_cell; line-height: @height_cell;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-content: center; align-content: center;
border-left: 2px solid transparent; border-left: 4px solid transparent;
.enable-trans(); .enable-trans();
} }
} }
@ -80,6 +89,15 @@
border-left: 4px solid @theme_main; border-left: 4px solid @theme_main;
background: fade(@theme_main, 10%); background: fade(@theme_main, 10%);
} }
&.active{
border-left: 4px solid @theme_main;
.name{
color: @theme_main;
}
.badge{
color: fade(@theme_main, 90%);
}
}
&:active{ &:active{
border-left: 8px solid @theme_main; border-left: 8px solid @theme_main;
} }
@ -336,6 +354,9 @@
.aplayer-container{ .aplayer-container{
display: flex; display: flex;
justify-content: center; justify-content: center;
meting-js{
max-width: 100%;
}
} }
.aplayer{ .aplayer{
max-width: 500px; max-width: 500px;

Loading…
Cancel
Save