# 寻找完美的主题

**URL:** <https://meta.discourse.org/t/looking-for-the-perfect-theme/327039>\
**Category:** Community Building\
**Created:** [2024年九月18日 11:34 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039 "2024-09-18T11:34:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_F](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Joe\_F](https://meta.discourse.org/u/Joe_F)\
**Post date:** [2024年九月18日 11:34 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/1 "2024-09-18T11:34:50Z")

</div>

您好，

我对 Discourse 完全是新手，目前印象深刻，但作为新手也带来了一些挑战。我一直在尝试创建一个能完美契合我和我的团队想要实现的目标的主题，但不幸的是，我除了添加一个新主题（这确实符合我们的期望 :(）之外，无法取得更多进展。

我已经对我们想要的东西做了一个非常粗略的表示，所以如果有人有什么建议或技巧，请告诉我，我敢打赌肯定有一个主题正在做类似的事情！

 ![Sitemap Whiteboard in Green Purple Basic Style](https://global.discourse-cdn.com/meta/original/4X/a/d/6/ad69efbe42893effb244882cac42883fa9e959da.png)

---

<div class="post-metadata">

**Author:** ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)\
**Post date:** [2024年九月18日 11:52 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/2 "2024-09-18T11:52:26Z")

</div>

你好 @Joe_F！谢谢你的夸奖 :discourse: 😉

我帮你在 #Customization > Theme component 分类里快速搜了一下，找到了一些主题组件（TC）\[1\]，你可能在设置帖子、排行榜和标签的样式时会觉得有用。

**标签**  
官方主题组件  
[https://meta.discourse.org/t/sidebar-tags/195106](https://meta.discourse.org/t/sidebar-tags/195106)

普通主题组件

> [@Discourse 热门标签侧边栏](https://meta.discourse.org/t/discourse-popular-tag-sidebar/107853):
>
> 此主题组件在宽度大于 767px 的屏幕（大多数平板电脑和桌面设备）上，于固定侧边栏中显示某个分类下最热门的标签。 warning 您必须在网站上启用“按标签筛选”设置，此主题组件才能正常工作。 我可以使用此主题组件做什么？ 为每个分类在侧边栏中显示 3 到 30 个热门标签 将侧边栏设置为左侧或右侧 阻止侧边栏在某些分类中显示 更改“热门标签”标题文本 自定义 CSS 每个侧边栏都包裹在一个包含分类名称的类中，因此对于 UX 分类，该类为 .ux-sidebar。您可以使用这些类来为各个侧边栏设置样式。 在包含侧边栏的页面上，html 标签也会添加一个类，因此您可以使用 html.custom-sidebar 为所有包含侧边栏的页面应用样式。 hammer_and_wrench仓库 [github.com/awesomerobot/discourse-popular-tag-sidebar](https://github.com/awesomerobot/discourse-popular-tag-sidebar)open_book初次接触 Discourse 主题？ [Discourse 主题使用入门指南](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) …

* * *

**排行榜**  
官方主题组件

> [@顶部贡献者侧边栏](https://meta.discourse.org/t/top-contributors-sidebar/215110):
>
> ||| -|-|-| discourse2 | 摘要 | Top Contributors Sidebar 在主题列表页面添加了一个“Top Contributors”（排行榜）侧边栏。 | eyeglasses | 预览 | [在 Discourse 主题创建者上预览](https://discourse.theme-creator.io/theme/Discourse/top-contributors-sidebar) | hammer_and_wrench | 仓库链接 | [https://github.com/discourse/discourse-top-contributors-sidebar](https://github.com/discourse/discourse-top-contributors-sidebar)open_book | 不熟悉 Discourse 主题？ | [Discourse 主题使用入门指南](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) 安装此主题组件 功能 排行榜信息默认按“收到的点赞数”获取并排序。您可以在主题设置页面更改此设置以及其他选项。 information_source 用户目录必须启用才能填充 Top Contributors 列表。如果您的列表为空，请在管理员设置中搜索 enable user directory 以确保其已启用。 information_source 侧边栏仅在浏览器宽度为 767p…

如果你是自行托管的，可能也会对 [Discourse 游戏化](https://meta.discourse.org/t/discourse-gamification/225916) 插件感兴趣。如果你是使用 Discourse 托管服务，则取决于你所在的托管计划。

* * *

这里有一个主题组件，似乎能实现上述所有功能：

> [@右侧边栏区块](https://meta.discourse.org/t/right-sidebar-blocks/231067):
>
> discourse2摘要 右侧边栏区块 在主题列表右侧显示一个侧边栏，其中包含可配置的区块列表。eyeglasses预览 [在 Discourse 主题创建器中预览](https://discourse.theme-creator.io/theme/Discourse/right-sidebar-blocks)hammer_and_wrench仓库链接 [https://github.com/discourse/discourse-right-sidebar-blocks](https://github.com/discourse/discourse-right-sidebar-blocks)open_book初次接触 Discourse 主题？ [Discourse 主题使用入门指南](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) 安装此主题组件 功能 该组件包含几个可在侧边栏中显示的区块： popular-tags top-contributors recent-replies category-topics custom-html category-list subcategory-list upcoming-events-list\* minimal-gamification-leaderboard\*\*information_source 必须启用用户目录，才能填充“顶级贡献者”列表。如果您的列表为空，请在管…

* * *

你可以参考以下指南，熟悉如何使用/设计 Discourse 主题。

- [对网站进行 CSS 更改](https://meta.discourse.org/t/make-css-changes-on-your-site/168101)
- [Discourse 主题开发新手指南](https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648)

你也可以在 #Marketplace 创建一个主题，概述你希望完成的工作。

希望这对你有帮助 😄

* * *

1. Theme Components

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2024年九月18日 13:46 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/3 "2024-09-18T13:46:09Z")

</div>

这是终极侧边栏解决方案 😉

> [@Discourse Bars beers cocktail (a sidebar framework)](https://meta.discourse.org/t/discourse-bars-a-sidebar-framework/298216):
>
> eyeglasses Overview A Theme Component that allows you to lay out Components[[1]](#footnote-1469292-1) on top and side bars. Specify a set of “widgets” distinctly for Route and Position. Supports setups for each of: discovery[[2]](#footnote-1469292-2), topic, tag[[3]](#footnote-1469292-3), category[[3:1]](#footnote-1469292-3), categories[[3:2]](#footnote-1469292-3) OR tags-intersection[[4]](#footnote-1469292-4) “Bars” can be either: top, left, right OR alternative right location. Each bar can be collapsed or dismissed (refresh browser to reset dismiss). They can be minimised by default. Handles the Official Sidebar, but if you …

但你可能需要帮助。

如果你有预算，可以聘请开发人员提供帮助

#marketplace。

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)\
**Post date:** [2024年九月18日 16:49 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/4 "2024-09-18T16:49:16Z")

</div>

欢迎您，Joe\_F！感谢您分享您的构思。我希望您在接下来的设计和建造过程中，能继续在此论坛与我们分享您的发现和过程。这非常有帮助。

因为在这里，谁不寻找“完美的主题”呢？

---

<div class="post-metadata">

**Author:** ![Joe\_F](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Joe\_F](https://meta.discourse.org/u/Joe_F)\
**Post date:** [2024年九月19日 07:16 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/5 "2024-09-19T07:16:10Z")

</div>

谢谢大家，\n\n非常感谢你们的帮助，有很多东西可以学习和研究 🙌

---

<div class="post-metadata">

**Author:** ![Joe\_F](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Joe\_F](https://meta.discourse.org/u/Joe_F)\
**Post date:** [2024年九月19日 10:42 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/6 "2024-09-19T10:42:06Z")

</div>

非常感谢，我已经能够对这些内容进行一些尝试了！

我正在查看右侧边栏区块，这听起来非常适合我们想要实现的目标，但我就是无法调出我们的“月度记分牌”，您有什么建议吗？我在文档中找不到任何相关内容。

此致，  
Joe

---

<div class="post-metadata">

**Author:** ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)\
**Post date:** [2024年九月19日 10:55 UTC](https://meta.discourse.org/t/looking-for-the-perfect-theme/327039/7 "2024-09-19T10:55:57Z")

</div>

我个人不使用此组件，但我想通过阅读其描述，只要安装了 Gamification 插件，您就可以添加排行榜/积分榜。

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/0/2/402f44d04f9a7ec72b89a53b1ee944dbc01cfb8e.png)
