Für diese großartigen Themen scheint es keine Möglichkeit zu geben, sie zu ermutigen, z. B. indem man ihren Beitrag hervorhebt.
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.
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:
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.
Das ist sehr cool und funktioniert, um Themen in Themenlisten hervorzuheben, aber ich möchte auch das Thema selbst hervorheben. Es scheint, dass das Tag auf einer Themenseite nur für das Tag selbst existiert.
Ich habe versucht, dies zu tun, was funktionieren könnte, aber wahrscheinlich mache ich es falsch.
.title-wrapper div.has-highlight {
/* Styles für die <h1> mit der Klasse */
color: blue !important;
font-weight: bold;
}
Was ist „das Thema selbst“ in diesem Zusammenhang?
Auf der Themenseite für Themen mit dem Tag möchte ich das Thema in einer anderen Farbe (oder was auch immer) gestalten, damit es nicht nur in den Themenlisten, sondern auch beim Besuch der Themenseite als besonders hervorgehoben wird.
Sie meinen den ersten Beitrag in einem Thema, den OP, richtig?
body.tag-highlight article#post_1 {
background-color: blue;
font-weight: bold;
border: 3px dotted pink;
}
Das ist großartig! Wie ziele ich jetzt auf den TITEL des Themas?
// dies zielt auf das Tag selbst
a[data-tag-name="extra-special-topic"] {
color: yellow !important;
}
// dies ändert den Titel in Topic-Listen
.tag-extra-special-topic .raw-topic-link {
color: blue !important;
}
// Dies zielt auf den Hintergrund/Körper des 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;
}
Mein lieber Freund, hast du den vorgeschlagenen Ansatz versucht? Ich muss gestehen, ihre Erklärung entzog sich meinem Verständnis. ![]()
Welchen Teil? Du öffnest einfach deinen Theme-Editor und bearbeitest das CSS.
Das hat bei mir etwas Seltsames bewirkt. Wenn ich mich im hervorgehobenen Thema befinde, wird es auch auf andere Themen unten in der Liste “Neue & Ungelesene Themen” angewendet.
Aber wenn ich NICHT im Thema bin, ist nur das hervorgehobene Thema hervorgehoben (wie man es erwarten würde).
Was ist damit los
?



