カテゴリバナー

: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 ターゲットとして category-header クラスを body タグに追加します。


: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?
Category boxes links
Plugins and theme components rarely support tag-pages
Discourse Category Headers theme component
Upcoming Events calendar -- how to embed in post?
New Theme: Tag-Pages Navigation
Tag Banners
Sending a message upon post
Header Submenus
Impact of component positioning with 2.5.0.beta6
Category Description
Capitalizing Tag names in Tag Banners
About Category Auto-Created Topic - Sitewide Options
Subcategories
Discourse as a Conference App (in person, virtual, or hybrid)
Show different ads on different categories
Unique CSS class for Group pages?
Adjusting layout of category pages
Category image not aligning as expected
Add forum description at top of home page
How do I add category banners?
Recommendations on layouts? A way to preview changes?
Category banner image slow to load
Use tag and category banner components together
Category page with fixed organization of topics
Customizing your site with existing theme components
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
Category, Group, Tag Descriptions as Topics
Uncaught (in promise) error
Category, Group, Tag Descriptions as Topics
Discourse Category Home :house:
Do you know what theme this is?
Traditional multi level hierarchy vs flat discourse hierarchy
How to add a "button" which composes a pre-filled topic
Category color selection should be allowed even when style is "none"
Show customisable message on private topics/categories?
Category description just after name
How to add this header, colored categories, and sidebar categories?
Receive the full description of a category in a theme
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?