B-iggy
(B Iggy)
2019 年 4 月 4 日午後 4:52
1
[deprecated ]
Discourse コミュニティの皆様、こんにちは。
多くのリクエストにお応えし、私の Alien Night Theme からカプセル化されたテーマスイッチャーコンポーネントを共有します。
現時点では、ボタンを押すだけで、テーマがダークモード用のテーマに切り替わります。
将来的には、設定ページを実装して、テーマを切り替える際に使用する独自のグローバル CSS クラスを定義できるようにするかもしれません。
あるいは、ユーザーに選択を許可している最初の 2 つのテーマ間を切り替えるだけにするかもしれません。
インストールとダウンロード
This is a guide for installing and managing themes and theme components in Discourse.
Required user level: Administrator
Installing and customizing themes can significantly improve the look and feel of your Discourse site. You can easily import and manage themes and their components through the Discourse admin panel.
This guide covers:
Importing new themes and theme components
Adding theme components to a theme
Managing automatic updates
Additional resourc…
A free Theme Switcher Theme Component for Discourse
プレビュー
フィードバックやご質問がございましたら、お気軽にお知らせください
「いいね!」 23
You can let admins select which themes they want to use. We have two different themes and each theme has it own dark mode.
When we click the switch to change light to dark, this component below should have change the logo’s color to light as the opposite. Now it doesn’t work with this switch.
https://meta.discourse.org/t/alternative-logo-for-dark-themes/88502
「いいね!」 1
B-iggy
(B Iggy)
2019 年 4 月 4 日午後 5:55
3
Ok, I’m not advanced in Discourse modding but I try to implement it.
Help from professional guys are appreciated @Johani
Hmm, good point. Not sure how I can make a cross-component-compatibility-mode.
I’ll think about it.
Thanks for the first feedback so far!
「いいね!」 3
Defining the themes in the settings is possible, but will complicate things. The hamburger menu theme selector is a good working example of how you’d change the theme based on ID.
https://github.com/discourse/discourse-hamburger-theme-selector/blob/master/common/header.html
「いいね!」 5
I had some time tonight, so I worked on modifying the hamburger theme selector to toggle between two themes: https://meta.discourse.org/t/header-theme-toggle/113496 . Thanks so much for inspiring this with your theme @B-iggy !
「いいね!」 11
B-iggy
(B Iggy)
2019 年 4 月 5 日午前 6:04
6
Good Morning @awesomerobot ,
oh wow, that was quick
Much better than I could have done anyways.
I think this topic here is obsolete/redundant then
「いいね!」 5
Not necessarily, there are some benefits of switching the CSS rather than switching the entire theme. Everything’s self contained and you don’t need to fully refresh for all the changes to take effect.
「いいね!」 7
Your component might be better with some improvements. I hope you continue to develop
「いいね!」 2
szergely
(Szergely Gergely)
2019 年 4 月 6 日午後 9:29
9
Awesome plugin! How can i force it to be in the first place (next to the search bar)?
「いいね!」 1
B-iggy
(B Iggy)
2019 年 4 月 7 日午前 6:06
10
Good Morning @szergely
glad to hear you like it
Instead of changing the code on your end I think it makes sense to have it next to the search icon per default.
So I pushed this change now. Let me know if it’s fine
https://github.com/B-iggy/discourse-theme-switcher/commit/b223cea92fee96ecd0760e0180e03841c79f010c
「いいね!」 3
szergely
(Szergely Gergely)
2019 年 4 月 7 日午前 8:34
11
Yes now its there! Thank you for the fast support, i really like this light/dark button!
「いいね!」 3
B-iggy
(B Iggy)
2019 年 12 月 21 日午前 6:50
13
残念ながら、自分の投稿の上部を編集できません
そのため、プレビューリンクが更新されたという重要な通知があります:
新しいバージョンをプッシュしましたが、「最新バージョンに更新」が機能しなくなったため、再度インストールしました
「いいね!」 2
jrgong
(jrgong)
2020 年 1 月 21 日午前 10:29
15
サムのミニマルテーマでダークモードを使用すると、次のようになります:
jrgong
(jrgong)
2020 年 1 月 23 日午後 1:22
16
また、代替ロゴを追加するための回避策はありますか?現在のロゴは暗い背景では読みづらいため、ダークモード用に反転したロゴを追加したいと考えています。
sam
(Sam Saffron)
2020 年 1 月 28 日午前 3:05
17
私のテーマにはハードコードされた色が多数含まれており、ライトカラーモードでのみ正しく機能します。この問題を修正する用意はありますが、現時点ではダークモードでは正しく動作しません。
「いいね!」 2
jrgong
(jrgong)
2020 年 2 月 17 日午前 10:21
18
下部を小さくすることについてご意見はありますか?追加コンポーネントを使用すると、ヘッダーのスペースを多く取ってしまいます。例えば、このGhostテーマの右上にあるダークモードボタンが好きです:
jrgong
(jrgong)
2020 年 3 月 26 日午後 3:06
20
プラグインをヘッダーからユーザーのドロップダウンパネルに移動させる方法はありますか?
sam
(Sam Saffron)
2020 年 3 月 27 日午前 1:14
21
簡単な方法はありません。新しいコンポーネントが必要です。
「いいね!」 1