「注目トピック」機能を導入

素晴らしいトピックに対して、投稿をハイライトするなど、奨励する方法がないようです。

To highlight a topic in the topic list you can pin the topic to the top to the list. This is a native Discourse feature.

「いいね!」 1

I know that, however in my opinion pin is for rules of this category or something like that. For me I prefer there is a way to highlight some of the topic in list or not pin them.

Can you share a mock-up of how you envision that working?

Something like that. Color and bold the topic title and with a star… just a sample, so that user can know that this topic is highlighted and featrued.

Oh cool! You can easily accomplish that with a small theme component. First create a staff tag to denote this “highlight” state, let’s say it’s “highlight”. Then you tag the topics you want to highlight with this tag.

On the theme code you need to style it as you want let’s say:

tr.tag-highlight {
    background-color: blue;
    font-weight: bold;
    border: 3px dotted pink;
}

Then it looks like this:

「いいね!」 6

I know how to do it in css, that sample is actually working on my discourse. I just want to know is that possible to build in this function in official? I think highlight is a pretty useful function.

「いいね!」 3

これは非常にクールで、トピックリストのトピックを強調表示するのに役立ちますが、トピック自体も強調表示したいと考えています。タグはトピックページではタグ自体にのみ存在するようです。

これを試しましたが、おそらく間違っていると思います。

.title-wrapper div.has-highlight {
  /* クラスを持つ<h1>のスタイル */
  color: blue !important;
  font-weight: bold;
}
「いいね!」 1

この文脈における「トピック自体」とは何ですか?

トピックページで、タグ付きトピックを別の色(または他のスタイル)で表示し、トピックリストだけでなくトピックページを訪問した際にも特別であることがわかるようにしたいです。

スレッドの最初の投稿、OPのことですか?

body.tag-highlight article#post_1 {
    background-color: blue;
    font-weight: bold;
    border: 3px dotted pink;
}
「いいね!」 1

素晴らしい!では、トピックのタイトルを対象にするにはどうすればよいですか?


// これはタグ自体を対象とします
a[data-tag-name="extra-special-topic"] {
    color: yellow !important;
}

// これはトピックリストのタイトルを変更します
.tag-extra-special-topic .raw-topic-link {
    color: blue !important;
}

// これはOPの背景/本文を対象とします
body.tag-extra-special-topic article#post_1 {
    background-color: blue;
    font-weight: bold;
    border: 3px dotted pink;
}
.tag-extra-special-topic #topic-title .fancy-title {
  color: papayawhip;
}

親愛なる友よ、彼らが提案したアプローチを試しましたか?正直に言うと、彼らの説明は私の理解を超えていました。:rofl:

どの部分ですか? テーマエディターを開いてCSSを編集するだけです。

これは私にとって奇妙なことをしました。ハイライトされたトピックにいると、下部にある「新規&未読トピック」リストの他のトピックにも適用されます。

しかし、トピックにいない場合は、ハイライトされたものだけがハイライトされます(期待どおり)。

どういうことですか?:lol: