* feat: custom sidebar, #4 * fix dev html * fix doc * fix doc
This commit is contained in:
parent
fc2e5b6fb9
commit
37e7984e7e
6 changed files with 71 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
|||
function scrollActiveSidebar () {
|
||||
if (/mobile/i.test(navigator.userAgent)) return
|
||||
function scrollActiveSidebar (isCustom) {
|
||||
if (/mobile/i.test(navigator.userAgent) || isCustom) return
|
||||
|
||||
const anchors = document.querySelectorAll('.anchor')
|
||||
const nav = {}
|
||||
|
|
@ -48,6 +48,6 @@ function scrollActiveSidebar () {
|
|||
scrollIntoView()
|
||||
}
|
||||
|
||||
export default function () {
|
||||
scrollActiveSidebar()
|
||||
export default function (isCustom) {
|
||||
scrollActiveSidebar(isCustom)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue