Ein kurzer Leitfaden zum Ändern des Stils Ihrer Wiki-Beiträge:
Hintergrundfarbe ändern:
Fügen Sie in Ihrem /admin/customize/themes diesen CSS-Code unter Common > CSS hinzu
.wiki .topic-body .cooked {
background-color: #dcffdc; /*hellgrün*/
}
Textgröße ändern
Wenn Sie möchten, können Sie auch die verwendete Schriftart oder die Größe des Textes sowie die Farbe ändern
.wiki .topic-body .cooked p {
font-size: 18px;
color: green;
}
Text hinzufügen
Sie können einen Text hinzufügen, um den Benutzern klarzumachen, dass es sich bei dem, was sie sehen, um einen Wiki-Beitrag handelt
.post-info.edits .wiki::before {
content: "DIESEN WIKI-BEITRAG BEARBEITEN";
color: green;
background-color: #d2e2d2;
margin-right: 3px;
font-weight: bold;
border: 1px solid green;
padding: 3px;
}
Dieses Dokument wird versioniert – schlagen Sie Änderungen auf github vor.
22 „Gefällt mir“
Hey, we just changed the background color of wikis on the Fairphone forum, but like all other posts each wiki starts out as staff-blue when you load it, then slowly turns white and only then turns green.
Is there a way to disable this animation for wiki posts?
I believe this should do the trick:
.wiki .topic-body {animation: none;}
6 „Gefällt mir“
Here’s a Theme Component which makes Wikified posts pale green again, and incorporates @Kris ’s animation: none tweak. (I chose an essentially random pale green as I did this surreptitiously while I was supposed to be paying attention in a meeting. But you can change the RGB value in the Theme Component CSS after installation)
Improvements always welcome by pull request.
A very simple Discourse Theme Component which adds a distinctive green (but customisable) background colour to Wikified posts (like they used t' be back when ah wer' a young lad)
4 „Gefällt mir“
sca
(SumitC)
17. Juni 2021 um 19:31
5
Is there a way to make background conditional on light and dark theme? Appreciate your response
1 „Gefällt mir“
dax
(Daniela)
7. Juli 2021 um 12:03
6
The simplest thing to do is create two different theme components, one for the Light theme and one for the Dark theme so you don’t need to write any more CSS
2 „Gefällt mir“
nathank
(Nathan Kershaw)
28. Juli 2021 um 02:50
7
For Wiki customisations to work well in Private Messages with the new changes , I suggest a slight tweak to the CSS so that it targets .cooked:
// customises wiki posts
.wiki .topic-body .cooked {
background-color: #e8f9fd;
animation: none;
}
.post-info.edits .wiki::before {
content: "Wiki Post";
margin-right: 5px;
font-weight: bold;
}
I’ll pop this in the OP too.
Later…
And for the hell of it I turned it into the Theme Component with the ability to customise the background color and the text.
Simple Description
This theme component enables you to make Wiki posts (and Shared Edits posts) more obvious.
Wikis and Shared Edits are a powerful feature of Discourse, but many users are unfamiliar with the concept and find the UI just a bit too subtle. This component makes it crystal clear, packaging the content from Change the style of a wiki post .
Screenshots
[image]
Detailed Description
Installing this component enables you to control the background colour of Wiki posts, and to add s…
2 „Gefällt mir“