此主题组件的作用是什么?
它将我们标准的主题列表导航放入固定侧边栏中(只要您的浏览器宽度大于 768px)。您也可以在设置中选择将侧边栏显示在右侧。
我们之前曾在 Meta 上简要讨论过这种布局(https://meta.discourse.org/t/proposing-a-left-aligned-slide-out-hamburger-menu/30287),我很好奇将现有的导航直接移至侧边栏会带来怎样的效果。
请注意,由于这是一个重大的布局变更,此组件可能无法立即与其他主题兼容。
在主题创建器中预览
Github 仓库: https://github.com/awesomerobot/discourse-sidebar-nav.git
如何安装主题组件?
36 个赞
nexo
3
Could you “push” the sidebar further to the side?
It’s possible, but it’s currently designed to use the standard 1110px width that Discourse content exists within.
You could add CSS like this to make the content on pages with the sidebar wider
@media screen and (min-width: 1110px) {
.navigation-topics,
.categories-list,
.tags-page,
body[class*="category-"]:not(.archetype-regular):not(.archetype-banner) {
.wrap {
max-width: 1400px;
}
}
You could even go really crazy and set something like max-width: unset; and have a browser-wide topic list
11 个赞
thaidb
(thaidb)
12
Hello, i wanna display this sidebar on every topic and every category
When in homepage, top menu unstill display normal
How can i do that?
Everytime we wanna search, we must comback to homepage and search them, so lost a long time! 
We should solve this problem!
Thank you!
3 个赞
nexo
14
主题组件太棒了!
我觉得话题列表侧边栏也应该出现在标签列表中,这样当你查看例如 subfolder 时,侧边栏在所有页面上都能保持一致,从而更加实用。这将是一个非常棒的功能。
1 个赞