Skip to content

Commit

Permalink
docs: Update docs with copy & assist function
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Jul 14, 2019
1 parent dd0856f commit 786bed2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
14 changes: 12 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ module.exports = {
text: 'Third part',
link: '/advanced/third-part',
},
{
text: 'Assist function',
link: '/advanced/assist',
},
],
},
],
Expand Down Expand Up @@ -96,6 +100,10 @@ module.exports = {
text: '第三方支持',
link: '/zh-CN/advanced/third-part',
},
{
text: '辅助功能',
link: '/zh-CN/advanced/assist',
},
],
},
],
Expand All @@ -112,7 +120,8 @@ function getEnSidebar(title) {
children: [
'/guide/',
'/advanced/theme-config',
'/advanced/third-part'
'/advanced/third-part',
'/advanced/assist',
],
},
];
Expand All @@ -126,7 +135,8 @@ function getZhSidebar(title) {
children: [
'/zh-CN/guide/',
'/zh-CN/advanced/theme-config',
'/zh-CN/advanced/third-part'
'/zh-CN/advanced/third-part',
'/zh-CN/advanced/assist',
],
},
];
Expand Down
5 changes: 5 additions & 0 deletions docs/advanced/assist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Assist function

**There is currently no English document, I will finish it as soon as possible. You can refer to the Chinese document first.**

> If you are interested, you can help me improve the English documentation through [PR](https://github.com/liuyib/hexo-theme-stun/pulls), I will be very grateful.
11 changes: 11 additions & 0 deletions docs/zh-CN/advanced/assist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 辅助功能

## 快捷键

- 快速切换文章 <Badge text="stable"/> <Badge text="v1.0.4"/>

当你浏览文章时,如果不想通过鼠标点击按钮来切换文章,那么你可以使用键盘的左右箭头(````)来快速切换文章。

- 快速关闭搜索框 <Badge text="stable"/> <Badge text="v1.0.3"/>

关闭搜索框有三种方式,1. 点击关闭按钮,2. 点击蒙版,3. 按下 `Esc` 键。
5 changes: 4 additions & 1 deletion source/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ function popAlert(status, text, delay) {
duration: 300
}).velocity('reverse', {
delay: delay * 1000 || 5000,
duration: 260
duration: 260,
complete: function() {
$('.stun-alert').css('display', 'none');
}
})
});
}
Expand Down

0 comments on commit 786bed2

Please sign in to comment.