Wiki投稿のスタイルを変更するための簡単なガイド:
背景色の変更:
/admin/customize/themes の Common > CSS の下に、このCSSを追加します。
.wiki .topic-body .cooked {
background-color: #dcffdc; /*light green*/
}
テキストサイズの変更
必要に応じて、使用するフォントやテキストのサイズ、さらには色も変更できます。
.wiki .topic-body .cooked p {
font-size: 18px;
color: green;
}
テキストの追加
ユーザーに表示されているものがWiki投稿であることを明確にするテキストを追加できます。
.post-info.edits .wiki::before {
content: "EDIT THIS WIKI POST";
color: green;
background-color: #d2e2d2;
margin-right: 3px;
font-weight: bold;
border: 1px solid green;
padding: 3px;
}
このドキュメントはバージョン管理されています - 変更の提案はgithub で行ってください。
「いいね!」 22
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
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
sca
(SumitC)
2021 年 6 月 17 日午後 7:31
5
背景をライトテーマとダークテーマで条件付きに変更する方法はありますか?ご回答をありがとうございます。
「いいね!」 1
dax
(Daniela)
2021 年 7 月 7 日午後 12:03
6
最も簡単な方法は、ライト用とダーク用の2つの異なるテーマコンポーネントを作成することです。これで、さらにCSSを書く必要がなくなります。
「いいね!」 2
nathank
(Nathan Kershaw)
2021 年 7 月 28 日午前 2:50
7
プライベートメッセージでWikiのカスタマイズが新しい変更 と円滑に動作するよう、CSSを少し調整して .cooked をターゲットにするよう提案します:
// Wiki投稿をカスタマイズ
.wiki .topic-body .cooked {
background-color: #e8f9fd;
animation: none;
}
.post-info.edits .wiki::before {
content: "Wiki投稿";
margin-right: 5px;
font-weight: bold;
}
これもOPに追加しておきます。
後日…
ついでに、背景色とテキストをカスタマイズ可能なテーマコンポーネントとして実装しました。
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