Custom Category Boxes

|||
-|-|-|
:discourse2: | 摘要 | 自定义类别框会将您的类别显示为带有自定义背景的框,呈现在您的类别页面上。如果选择了 show_banner,此组件还将为每个类别页面显示一个类别横幅。
| :eyeglasses: | 预览 | 在 Discourse 主题创建器上预览 |
:hammer_and_wrench: | 存储库链接 | https://github.com/discourse/discourse-custom-category-boxes-component
:open_book: |首次使用 Discourse 主题? | Discourse 主题使用入门指南

安装组件

功能

:information_source: 此组件需要将 桌面类别页面样式 设置为 包含精选主题的类别包含精选主题的框 才能正常工作。

有四种选项可供选择。默认选项是 半调网屏

半调网屏背景

Halftone option

交叉影线背景

Crosshatch option

None option

自定义

如果您想使用自己的图片来创建这种效果,请在设置页面上传 4 张不同的、带有透明背景的 .png 图片或传统的 .jpg 图片。对于每次上传,请使用命名约定 custom-0,直到最后一个 custom-3。请确保在类别背景设置中选择 custom

Custom option

设置

名称 描述
类别背景 选择四种选项之一
显示横幅 如果选中,每个类别页面将显示一个样式化的横幅,与类别框的外观相匹配。
翻译 默认
more_topics 更多主题…

31 个赞

Simple, clean. Nice component. Thanks.

3 个赞

Great plugin! I have been searching for it for a long time, thank you.

1 个赞

I think it should have auto-resize for picture or limit

3 个赞

thanks for the theme :+1:

may you consider slight changes so that the theme also works for rtl direction without any edits? (as edits go away after updates).

also where can I translate this string: “more topics …”. it was neither in the admin customize section nor in the theme :thinking: .

3 个赞

Glad you enjoy the component. I have added translation for more topics.... As for the rtl direction it is something I will look into.

Until then, make sure you copy your customization and add it back after updating the component. :smile:

3 个赞

thanks :blush:

for this, there’s only one line which needed to be commented:

a #custom-category-title{ text-align: left;}

btw, I noticed that these category boxes won’t apply for subcategories. is it possible that the same rules also applies to subcategory boxes?

2 个赞

I believe you might be able to create your changes as a seperate theme component with Overides in your component plugin.

you are right, and I’ll do that for this case.

but I believe that when the whole discourse application is compatible with both rtl and ltr directions, it means that “details matter for the creators” and “they want to build the best service, not just a service”. well, this can happen for its great themes as well.

2 个赞

I want this theme too but I’m straggling to add it.

这个组件做得很好!\n我遇到了一个问题,它没有正确显示新添加的类别。我刚刚添加了“events”类别,并勾选了显示它的复选框,但它没有显示在“cats”页面上。不确定如何才能让它显示每个用户选择的所有猫。\n\n

\n\n\n

此主题组件的生命周期已结束,特此更新。Discourse 团队不再积极支持此组件。

1 个赞