Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

要是能有侧边栏就好了 #2

Open
woshichenghaibo opened this issue May 29, 2024 · 11 comments
Open

要是能有侧边栏就好了 #2

woshichenghaibo opened this issue May 29, 2024 · 11 comments

Comments

@woshichenghaibo
Copy link

否则如果书签很多的话,需要往下拉很久才能定位

@eallion
Copy link
Owner

eallion commented May 29, 2024

左侧好像有侧边栏吧。

@woshichenghaibo
Copy link
Author

woshichenghaibo commented May 29, 2024 via email

@eallion
Copy link
Owner

eallion commented May 29, 2024

你试试,我用的你的主题。
nav.guao.de

对的,左侧有侧边栏的。如果要细分可以用子分类。

@woshichenghaibo
Copy link
Author

woshichenghaibo commented May 29, 2024 via email

@woshichenghaibo
Copy link
Author

woshichenghaibo commented May 29, 2024 via email

@eallion
Copy link
Owner

eallion commented May 29, 2024

是手机吗?手机端不行。

@woshichenghaibo
Copy link
Author

woshichenghaibo commented May 29, 2024 via email

@woshichenghaibo
Copy link
Author

woshichenghaibo commented May 29, 2024 via email

@woshichenghaibo
Copy link
Author

是手机吗?手机端不行。

pc页面也没有啊,
2024-5-31 19-13-5

@eallion
Copy link
Owner

eallion commented May 31, 2024

页宽小余 1366 就隐藏了。在这里根据需要可以自己调整。

https://github.com/eallion/onenav-baisu-mod/blob/main/css/style.css#L1208-L1211

@woshichenghaibo
Copy link
Author

页宽小余 1366 就隐藏了。在这里根据需要可以自己调整。

https://github.com/eallion/onenav-baisu-mod/blob/main/css/style.css#L1208-L1211

我现在回到原作者的onenav-baisu,baisu主题的js/common.js里面有句话点击菜单键隐藏/显示侧边栏,代码如下:

$('.wap-menu').click(function() {
$(".navlist-main").toggle();
});

我在这段话前面加上一段话,试图能够点击空白处自动关闭navlist-main,但是无效,代码如下:

// 监听document的点击事件
$(document).click(function(event) {
// 检查点击的元素是否是.navlist-main或者它的子元素
if ($(event.target).closest('.navlist-main').length === 0) {
// 如果点击的是.navlist-main以外的区域
// 检查.navlist-main是否是可见的
if ($(' .navlist-main').is(':visible')) {
// 如果.navlist-main是可见的,则隐藏它
$(' .navlist-main').hide();
}
}
});

请教哪里错了?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants