nathank
(Nathan Kershaw)
2021 年 8 月 6 日午後 9:59
1
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
Detailed Description
Installing this component enables you to control the background colour of Wiki posts, and to add some text to the history/edit icon in the top right of the post.
It is a fork of discourse-wikified-post-background-color by @pacharanero , incorporates stuff from Change the style of a wiki post and re-used code from Personal Message Bubbles by @Rhidian .
Settings
Wiki post background color
The background colour of Wiki posts can be set to whatever you like. It defaults to ‘highlight’, but you can use any of these options:
It works best when a Scheme colour is chosen (i.e. primary, secondary, tertiary, etc), as these are responsive to automatic dark mode.
A named color recognised in CSS (e.g. blue, red, yellow, black, etc)
An HTML color code (e.g. #effbfb , etc)
Shared edits background color
You can choose one of the same color options for Shared Edits posts (see the Shared Edits Plugin )
Wiki added text
This adds the little bit of green text (defaulting to Wiki Post) in the top right corner of the post:
This is dynamic, and changes colour along with the history icon if there has been a recent edit (this is an unintended happy thing):
If you don’t want any text there, then delete the text in the setting and save it.
Shared edits added text
The text displayed when it is a Shared Edits post. This is in the Danger color from your palate.
Roadmap
Auto tag Topics with ‘wiki’
Please make suggestions as replies to this post.
Install this theme component
「いいね!」 25
Lovely stuff @nathank
I’m going to archive the old wikified post background color repo, in favour of this your new version, which adds much more.
「いいね!」 4
Zup
2021 年 12 月 12 日午後 6:12
3
このエラーが発生している人は他にいますか?
Error: Undefined variable: "$Shared-edits-hide". on line 42 of common.scss >> @if ($Shared_edits_hide == "Yes"){ -----^
nathank
(Nathan Kershaw)
2021 年 12 月 12 日午後 7:06
4
それを再現できませんし、コードに明らかな問題も見られません。他に何か情報を提供していただけますか?
「いいね!」 1
Zup
2021 年 12 月 12 日午後 7:50
5
共有編集を非表示がいいえ に設定されていたためです。TC設定でエラーが発生しました。はい に設定した後、エラーは解消されました。
nathank
(Nathan Kershaw)
2021 年 12 月 12 日午後 9:25
6
Zup:
共有編集を非表示をいいえ に設定していたためです。
最新のDiscourseベータ版で、いいえでもはいでも、それは得られません。古いDiscourseバージョンを使用していますか?バージョン管理は一切行っていません。申し訳ありません。
「いいね!」 1
Zup
2021 年 12 月 12 日午後 9:30
7
すみません、私のミスでした。少し古くなっていました。指摘されるまで、最近のアップデート後に再度テストするのを忘れていました。ありがとうございます。
「いいね!」 1
nathank
(Nathan Kershaw)
2021 年 12 月 13 日午後 12:50
8
共有編集投稿に対応するため、コンポーネントを更新しました。
これには、共有編集の変更への対応が含まれます。
「いいね!」 2
nathank
(Nathan Kershaw)
2022 年 8 月 10 日午前 2:39
9
デフォルトの背景色をわずかに調整しました。@メンションが見えにくかったためです 。
また、共有編集の背景色がデフォルトで tertiary-very-low になりました。
master ← colour-very-low
opened 02:33AM - 10 Aug 22 UTC
Makes it so that @mentions aren't obscured in wikis, and reduced the intensity o… f the background color where possible.
Also changed default Shared Edits colour to Tertiary-very-low.
「いいね!」 1
volanar
(Volanar)
2023 年 8 月 17 日午後 8:10
10
優れたコンポーネントです。しかし、トピックページでのみ表示が改善されます。カテゴリページ、トピックリスト「最近」、「未読」などにウィキアイコンが表示されるように変更することは可能でしょうか?
nathank
(Nathan Kershaw)
2023 年 8 月 17 日午後 9:54
11
良い提案ですね。きっと可能だと思います(プルリクエスト歓迎です!)。
私はインスタンスで投稿に#wikiというタグを付けることで、それを処理しています。もちろん半手動ですが、高度な検索でwikiの投稿/トピックを特定できます。サイドバーナビゲーションからも簡単に発見できるという利点もあります。
このコンポーネントの一部として、wiki投稿の自動タグ付け(または、あなたが提案するように)ができれば良いと思っていましたが、残念ながら、それに取り組むほどの苦痛を感じていません。
「いいね!」 2
Canapin
(Coin-coin le Canapin)
2023 年 8 月 18 日午後 4:36
12
これは2021年にここで尋ねました:Add an icon in front of wikis in the topic list?
回答は次のとおりでした:
機能リクエスト:
Following the suggestion from @Johani here:
To which Johani replied:
Unfortunately, wiki is a post-level, not a topic-level property. So, It’s not added to the topic list item model. You can use a tag or create a feature request for Discourse to add that class.
I suppose the vast majority of wikis are first posts, but I understand the post level issue.
However, having the possibility of emphasizing wikis on the topic list would be a neat addition and may incite people to visit them and m…
「いいね!」 1
thoka
(Thomas Kalka)
2023 年 9 月 5 日午前 11:25
13
(自動)ダークモードに合わせて背景色を調整する方法についてアドバイスを求めています。
現在、背景に選択した明るい色は、ダークモードで投稿が読めなくなってしまいます。
ウィキやパッドの背景色を定義するために、カラーパレットを拡張し、色の計算を行うことは可能でしょうか?
thoka
(Thomas Kalka)
2023 年 9 月 5 日午前 11:32
14
「wiki」トピックにタグを使用できます。
タグはCSSでスタイル設定できます(IIRC)。
タグのリスト表示/ドリルダウンオプションも追加で利用できます。
さらに、プラグインでwikiを含むトピックにwikiタグを自動的に追加できます。
nathank
(Nathan Kershaw)
2023 年 9 月 6 日午前 6:45
15
Scheme カラーを推奨する理由は以下のとおりです。\n\n[quote="Nathan Kershaw, post:1, topic:199492, username:nathank"]\nScheme カラー(つまり、プライマリ、セカンダリ、ターシャリなど)を選択すると、自動ダークモードにレスポンシブに対応するため、最も効果的です。\n[/quote]\nもし、カラーでオフ・ピステを行いたい場合は、ダークモードに対処する巧妙な方法を見つける必要があります。\n\nダークモードカラーの指定を可能にすることも、Nice feature になるでしょう。時間があれば、それを見てみます。
「いいね!」 1
thoka
(Thomas Kalka)
2023 年 9 月 6 日午前 8:16
16
はい。しかし、これらの色は背景にはあまりにも目立ちすぎます。
そのため、10%のSchemeカラーと90%の背景を混ぜたようなものを夢見ていました。SASS(またはそれに類するもの)はフロントエンドでは利用できないと思います。
しかし、このような CSSマジックは機能するでしょうか?
更新:rgba(0, 255, 0, 0.1) はダークモードとライトモードの両方でかなりうまく機能します。
Canapin
(Coin-coin le Canapin)
2023 年 9 月 6 日午前 8:30
17
SASS関数はテーマカスタマイズセクションで利用可能です。変更を保存するとコンパイルされます。ただし、テーマやCSS変数でSASS関数を使用することはできません。
カラーコードからSASS関数を使用したい場合は、対応するSASS変数を使用する必要があります。
機能します
body {
background: darken($secondary, 10%);
}
機能しません
body {
background: darken($my_theme_variable, 10%);
}
機能しません
body {
background: darken(var(--secondary), 10%);
}
そして、あなたのリンクが説明していることは機能するはずだと思います。
「いいね!」 3
nathank
(Nathan Kershaw)
2024 年 7 月 10 日午後 8:26
18
これは試す価値があるかもしれません。SASSのmix()関数の使用方法に関するガイド(私の参照用)を以下に示します。