diff --git a/themes/yilia/layout/_partial/article.ejs b/themes/yilia/layout/_partial/article.ejs index 9f00f97..1b5fdb5 100644 --- a/themes/yilia/layout/_partial/article.ejs +++ b/themes/yilia/layout/_partial/article.ejs @@ -19,7 +19,7 @@ 总字数 <%= wordcount(post.content) %> - | +
预计阅读时间 diff --git a/themes/yilia/layout/_partial/aside.ejs b/themes/yilia/layout/_partial/aside.ejs index e54061b..870a544 100644 --- a/themes/yilia/layout/_partial/aside.ejs +++ b/themes/yilia/layout/_partial/aside.ejs @@ -10,7 +10,7 @@
<% } %> - <% if (!index && ((theme.toc === 1 && post.toc) || theme.toc === 2)){ %> + <% if (is_post() && ((theme.toc === 1 && post.toc) || theme.toc === 2)){ %>
diff --git a/themes/yilia/layout/_partial/mobile-nav.ejs b/themes/yilia/layout/_partial/mobile-nav.ejs index 0ec33be..eed5dcc 100644 --- a/themes/yilia/layout/_partial/mobile-nav.ejs +++ b/themes/yilia/layout/_partial/mobile-nav.ejs @@ -1,8 +1,5 @@ diff --git a/themes/yilia/layout/layout.ejs b/themes/yilia/layout/layout.ejs index 8065c97..8a6dd20 100644 --- a/themes/yilia/layout/layout.ejs +++ b/themes/yilia/layout/layout.ejs @@ -6,6 +6,9 @@ <%- partial('_partial/left-col', null, {cache: !config.relative_link}) %> <%- partial('_partial/live2d') %>
+
+
+
<%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %>
diff --git a/themes/yilia/source-src/css/article-inner.scss b/themes/yilia/source-src/css/article-inner.scss index afe4a98..9400445 100644 --- a/themes/yilia/source-src/css/article-inner.scss +++ b/themes/yilia/source-src/css/article-inner.scss @@ -46,6 +46,7 @@ font-size: 14px; .count-item { display: inline-block; + padding-right: 10px; span { font-weight: bold; } diff --git a/themes/yilia/source-src/css/grid.scss b/themes/yilia/source-src/css/grid.scss index 96fc4e2..4a07dcf 100644 --- a/themes/yilia/source-src/css/grid.scss +++ b/themes/yilia/source-src/css/grid.scss @@ -14,7 +14,7 @@ html, body, #container { overflow-x: hidden; overflow-y: auto; } -#mobile-nav { +#mobile-nav,.js-mobile-btnctn { display: none; } #container{ diff --git a/themes/yilia/source-src/css/mobile.scss b/themes/yilia/source-src/css/mobile.scss index cf93965..e55e5e2 100644 --- a/themes/yilia/source-src/css/mobile.scss +++ b/themes/yilia/source-src/css/mobile.scss @@ -1,6 +1,3 @@ -#mobile-nav { - display: block; -} .body-wrap { margin-bottom: 0; } @@ -75,9 +72,6 @@ &.list { background-color: rgba(100,100,100,0.7) } - &:hover{ - background: #444; - } .icon{ font-size: 24px; color: #fff; @@ -275,6 +269,7 @@ } #mobile-nav{ + display: block; .header-author{ margin: 0; position: relative; @@ -297,7 +292,9 @@ } } } - +.js-mobile-btnctn { + display: block; +} .header-menu{ height: auto; margin: 10px 0 20px; diff --git a/themes/yilia/source-src/js/fix.js b/themes/yilia/source-src/js/fix.js index 2e5e004..48f7345 100644 --- a/themes/yilia/source-src/js/fix.js +++ b/themes/yilia/source-src/js/fix.js @@ -14,7 +14,11 @@ function init() { Array.prototype.forEach.call($a, function($em){ $em.style.display = 'none' }) - } + } + + // 避免由于动画带来的fix元素定位失效, 移到动画元素外层 + var sideOpt = document.querySelector('.wrap-side-operation') + document.getElementById('container').appendChild(sideOpt) } export default { init } \ No newline at end of file diff --git a/themes/yilia/source-src/js/slider.js b/themes/yilia/source-src/js/slider.js index ecefe4d..0224a74 100644 --- a/themes/yilia/source-src/js/slider.js +++ b/themes/yilia/source-src/js/slider.js @@ -38,7 +38,11 @@ new Vue({ stop (event) { event.stopPropagation() }, - openSlider (event, type) { + openSlider (event, type, isMobile) { + if(isMobile && this.isShow) { + this.hideSlider() + return + } event.stopPropagation() this.innerArchive = false this.friends = false