カテゴリバナー

||||
-|-|
:discourse2: | 概要 | Category Banners は、既存のカテゴリ情報を活用して、カテゴリページ用のバナーを作成します(タグ用のバナーについては、Discourse Tag Banners をご覧ください)。
| :eyeglasses: | プレビュー | Discourse Theme Creator でのプレビュー |
:hammer_and_wrench: | リポジトリリンク | https://github.com/discourse/discourse-category-banners
:open_book: |Discourse テーマが初めての方へ | Discourse テーマの使用方法に関する初心者ガイド

このテーマコンポーネントをインストール

機能

Category Banners は、既存のカテゴリ情報を使用して、カテゴリページ用のバナーを作成します。カテゴリ名、説明文、色を使用して、関連するカテゴリページの上部にバナーを生成します(タグ用のバナーについては、Discourse Tag Banners をご覧ください)。

カテゴリの説明文は、各カテゴリの「… 用のカテゴリ定義」トピック内の最初の段落で定義されます。バナーの背景色/文字色は、カテゴリバッジの設定によって定義されます。

デフォルトでは、これはデスクトップとモバイルの両方で、すべてのカテゴリページとサブカテゴリページに表示されますが、カテゴリに説明文が設定されていない場合は表示されません。

設定

このコンポーネントには、デフォルトを上書きするためのオプションが用意されています:

名前 説明
show description 「このカテゴリについて」投稿からの説明文を表示
show mobile モバイルでバナーを表示
show subcategory サブカテゴリのバナーを表示
hide if no description カテゴリの説明文が設定されていない場合、バナーを非表示にする
show category logo カテゴリロゴを表示
align text
exceptions これらのカテゴリ名に対してバナーを表示しない
categories バナーを表示するカテゴリ
plugin outlet ページ上のバナーの位置を変更
show category icon カテゴリ設定からカテゴリアイコンまたは絵文字を表示 *
override category icon color カテゴリアイコンが使用される場合、これを有効にすると、アイコンがバナーの文字色に一致します

* 注:この設定は、カテゴリ設定で設定されたカテゴリアイコンまたは絵文字 を参照するようになりました。これは、コア機能に取って代わられた Category Icons テーマコンポーネントではありません。

カスタマイズに関するノート

追加の CSS でカスタマイズしたい場合は、次の構造を使用して特定のカテゴリヘッダーを対象とすることができます(example-category はカテゴリ名):

.category-title-header {
  &.category-banner-example-category {
        background: url(example.jpg);
  }
}

このコンポーネントは、追加の CSS ターゲットとして、body タグに category-header クラスも追加します。


:discourse2: ホスティングサービスをご利用ですか? テーマコンポーネントは、当社の Standard、Business、Enterprise プランでご利用いただけます。

「いいね!」 101
Beginner's guide to using Discourse Themes
How difficult would it be to make the Discourse UI more like Flarum?
Banner on Discourse Forum
Unique CSS class for Group pages?
Discourse Category Headers theme component
Upcoming Events calendar -- how to embed in post?
Category boxes links
Plugins and theme components rarely support tag-pages
New Theme: Tag-Pages Navigation
Tag Banners
Sending a message upon post
Header Submenus
Category Description
Capitalizing Tag names in Tag Banners
Subcategories
Discourse as a Conference App (in person, virtual, or hybrid)
Show different ads on different categories
Category image not aligning as expected
How do I add category banners?
Category banner image slow to load
Use tag and category banner components together
How are these subcategories displayed on meta?
What is it that creates the big heading which is based on the "About the ... category" topic?
Discourse Doc Categories
Theme or Custom CSS on Monday’s Discourse Instance?
I need to install the Category Style plugin for my website
I want to know how to do this?
Add banner to categories
Help us test Horizon, our newest theme
Official groups/posts
Discourse Category Headers theme component
Creating a Unique Gallery Layout for a Category
Official groups/posts
Horizon Theme
New users can't sign up, 404 errors in console
Uncaught (in promise) error
Approximate Meta's design in my own forum
Unique CSS class for Group pages?
Adjusting layout of category pages
Receive the full description of a category in a theme
Category description just after name
Show customisable message on private topics/categories?
Category color selection should be allowed even when style is "none"
How to add a "button" which composes a pre-filled topic
Traditional multi level hierarchy vs flat discourse hierarchy
Do you know what theme this is?
Discourse Category Home :house:
Category, Group, Tag Descriptions as Topics
Category, Group, Tag Descriptions as Topics
Customizing your site with existing theme components
Category page with fixed organization of topics
Recommendations on layouts? A way to preview changes?
Add forum description at top of home page
About Category Auto-Created Topic - Sitewide Options
Impact of component positioning with 2.5.0.beta6
How to add this header, colored categories, and sidebar categories?
How can I create a category wide banner?
How to display a disclaimer to every topic in a category?
Update changed the "category logo" settings and now all the pictures are microscopic. revertable?