注目のタイル

:discourse2: 概要 Featured Tiles は、トピック一覧の上に注目トピックのタイル行を追加します。
:eyeglasses: プレビュー Discourse Theme Creator でプレビュー
:hammer_and_wrench: リポジトリリンク https://github.com/discourse/discourse-featured-tiles
:open_book: Discourse テーマ初心者の方へ Discourse テーマの利用に関する初心者ガイド

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

機能

Featured Tiles は、トピック一覧の上に注目トピックのタイル行を追加します。

ホバーすると、トピックのタイトルと投稿者が表示されます。

トピックソースを選択するための多くのオプションがあります。画像はタグ、カテゴリ、または「上位トピック」の期間を指定して取得できます。画像は現在閲覧しているカテゴリに限定することも、サイト全体から取得することも可能です。

ユーザーインターフェース設定に、現在のデバイスでバナーを非表示にするオプションが追加されます。

設定

名前 説明
featured category 注目トピックを含むカテゴリ。すべてのカテゴリを対象とする場合は 0 に設定します。「カテゴリに限定」がこの設定を上書きします。
featured tags 注目トピックを含むタグ。これは公開されている必要があります。
topic source トピックを選択するために使用するアルゴリズム
top period 「topic_source」が「top」に設定されている場合に使用する期間
randomize topics トピックの選択と順序をランダム化
display when unfiltered フィルターされていない最新ページに表示
display on categories カテゴリページに表示
display categories これらのカテゴリを閲覧時にタイルを表示。空白の場合はすべてのカテゴリ
maximum topic count 表示するトピックの最大数
scope to category トピックを現在のカテゴリに限定
display mobile モバイルデバイスに表示
翻訳 デフォルト
preference_header 注目トピックバナー
preference_description このデバイスで注目トピックバナーを表示

:discourse2: 当方でホストされていますか? テーマコンポーネントは、Standard、Business、Enterprise プランで利用可能です。

「いいね!」 38

Wow.

This is amazing! It will attract even more clicks on my forum.

@david although not selected, its showing up on categories page. Also, if a topic has no images, can we set up a default image?

Edit: a member told me its only works on MacOS, cause he can’t see anything.

unknown

nice and functional theme :v:.

how is it different from Homepage Feature Component? is it just about the style or there are some more in-depth differences?

「いいね!」 1

It is mostly the style. Plus the Homepage Feature Component is only designed to use on the homepage. This one works in a few more places.

「いいね!」 3

Can you ask the member to check their browser error console? And also let us know which browser they are using?

unknown

Firefox

unknown (1)

Chrome

That error looks like it’s coming from another theme component. Can you try disabling them one-by-one?

「いいね!」 4

Hi,

With this configuration, the tiles should appear in all category pages right? My featured tag is “destacado”, however tiles do not show in the category page.

「いいね!」 2

is it the same as the theme Topic List Previews

No it’s not the same. The “Featured Tiles Theme Component” in this topic is officially maintained by the Discourse team, and it only provides what you see in the screenshot. “Topic List Previews” is a third-party plugin and/or theme with a different design and featureset.

「いいね!」 2

I love this.

Is there a way to have it only pull from topics with photos/images? Otherwise it seems pretty discordant when there is a row of empty grey boxes and an occasional photo.

Thanks,
Ray

「いいね!」 2

@david how i can increase the quality of the pictures, and probably the size to 180x80, thanks

It should be using 200x200 images on regular screens, automatically scaling up to 400x400 on hidpi screens.

Are you seeing something different?

Can i send you PM, because my forum is age restricted.

「いいね!」 1

Thanks for the link. Looking at the site, the problem is that the images are portrait. So we are constraining a 3072x4608 image into a 200x200 square, which makes it 133x200. Then we’re ‘filling’ a 222x150 box with it. So we’re displaying an image 133 pixels wide into something 222 pixels wide.

One solution here is to stop ‘filling’ the banner with the image, and ‘fit’ it instead. That’s the approach we take in the topic list thumbnails:

Screenshot 2020-08-24 at 15.02.58

Adding a new setting to the theme component for this would be pr-welcome if someone would like to work on it.

「いいね!」 7

これは素晴らしいですね。タイルが UI を圧迫していないところが気に入っています。設定についていくつか質問があります。

カテゴリページでは、ホームページには表示されるのに、注目のタイルが表示されません。設定は以下の通りです(カテゴリ名は現在共有したくないため伏せています)。何か見落としていることはありますか?

現在の設定

2 つ目の質問ですが、トピックから取得する画像ではなく、タイル用にデフォルトの画像を設定することは可能ですか?画像がないトピックを掲載したい場合でも、見た目を良くしたいと考えています。現在、組み込みの方法がない場合、CSS や JS を修正する必要がありますか?

「いいね!」 2

こんにちは、Davidさん!

素晴らしいテーマコンポーネントですね。他のユーザーも尋ねていますが、画像のないトピックにデフォルトの画像を追加する方法はありますか?

具体的には、画像が検出されない場合に Featured1.img や Featured2.img を表示するような仕組みです。

また、すべてのユーザーに可視なタグをコンポーネントが認識しているはずなのに、タグを追加しようとすると「タグが見つかりません」というエラーが表示される問題もあります。

「いいね!」 1

特定の画像形式(.jpg、.png、.tiff)でしか動作しないのでしょうか?タグ付けした3つのトピックのうち2つでは画像が表示されませんが、トピック自体は表示されています。


OS - Mac 10.15.7(Chrome、Safari、iOS版とも同じ現象が見られます)

「いいね!」 1

テーマをサイト上で有効化すると、空白のグレーのバナーが表示されます:

「タグ」オプションが選択されており、機能タグにいくつかのトピックが存在しているにもかかわらずです。

同意します。もしトピック内に画像がある場合、トピック全体を検索してそれを使用する回避策があるのかどうかまだ疑問です。それとも、最初の投稿からのみ取得するのでしょうか?