Tweak active item in sidebar

This commit is contained in:
qingwei.li 2017-01-12 20:23:45 +08:00
parent 4a7df99224
commit 0a2e1ddf11
2 changed files with 11 additions and 2 deletions

View File

@ -17,7 +17,7 @@ const OPTIONS = merge({
basePath: '',
auto2top: false,
name: '',
nameLink: location.pathname
nameLink: window.location.pathname
}, window.$docsify)
const script = document.currentScript || [].slice.call(document.getElementsByTagName('script')).pop()

View File

@ -182,13 +182,22 @@ main {
/* sidebar */
.sidebar {
border-right: 1px solid rgba(0, 0, 0, .07);
overflow-y: auto;
padding: 40px 0;
position: absolute 0 * 0 0;
transition: transform 250ms ease-out;
width: $sidebar-width;
z-index: 20;
margin-bottom: 40px;
&::after {
content: '';
position: inherit;
left: $sidebar-width;
top: 0;
height: 100vh;
border-right: 1px solid rgba(0, 0, 0, .07);
}
> h1 {
text-align: center;