Theme Switcher Component

Unless @B-iggy can add an option to choose location? :smiley:

It’s not easy indeed.
If you mean something like this I can maybe try to merge it somehow.

I did not test it with every theme but let me know if something breaks.

What do you mean with bottom? This theme switcher component is rather horizontally align. Do you mean to reduce the width?

Replacing the logo based on toggling light or dark mode is not so easy and would require more options. I’ll note it down, maybe for the future.

إعجابَين (2)

My idea was in the panel menu (not the user panel menu):

Sorry it must have been a typo. I meant button :smiley: The link to the liebling theme was an example for alternative button

You don’t necessarily need to replace the logo. Maybe just using a fa-icon switching colors and box-shadow via CSS should do the job.

إعجاب واحد (1)

It would be best to use this component : Hamburger Theme Selector - #63 by sam

It’s not a switch but what you’re asking might need too much work.

إعجاب واحد (1)

Hi,

Thank you for your component.

I wish this component had the translation support.

Hey @B-iggy thank you for this component!

I got a little confused on how I’m setting the two themes I’m gonna toggle between.
I have the classic “Light” and “Dark” theme and added both on the theme switcher.
When I toggle though it switches to alien theme and not the dark that I’d like to :thinking:

Is there a way to make it use only these two themes that I want?

Thank you for your time and contribution :rocket:

إعجابَين (2)

Hey @akapetzoglou1
wow, time is passing by crazy this year. Sorry for the delay. Currently struggling with certain things, hence contributing to Discourse unfortunately falls off.

It is not meant to toggle whole themes. Only a predefined dark and light one, I have configured in the CSS.
I think there is a theme switcher out there, that does what you want.
At least, if I understand it correctly.

3 إعجابات

Hey @B-iggy

is there any way to use the component to toggle between two color schemes
Now that there is a setting in the user profile for a dark mode, it would be neat to be able to toggle between the regular and the dark one.

3 إعجابات

Hey Sir I am using this theme component But after using it in classic default theme when i switch to dark mode The admin panel looks like this

All text Goes invisible
i have tried changing secondary color but if i change that it Changes Full theme background also Changes Which i don’t want i only want to change secondary text color so it is visible
Please if u have any solutions share it plz

يوجد مكون مبدل سمات في سمة Air. ومع ذلك، يوجد الزر في قائمة الهامبرغر. هل يمكن لأي شخص لديه الوقت تكييف discourse-color-scheme-toggle مع مكون مبدل السمات ووجود زر رأس للتبديل السريع بين السمة الفاتحة والداكنة؟

إعجابَين (2)

أود ذلك أيضًا. كنت أحاول إنجاز بعض العمل لمعرفة ذلك، لكنني لم أفهم أي شيء منه بعد! لقد طبقت الذي أشرت إليه، لكنني كنت آمل في تبديل رأس يمكن رؤيته بسهولة.

إعجاب واحد (1)

تحتوي مكونات السمة هذه على خطأ، إذا قام المستخدم بتعيين الوضع المظلم على جهازه وتعيين الوضع الفاتح في المفتاح على المنتدى، فلن يتغير الشعار، وسيعرض المستخدم شعارًا فاتحًا (للوضع المظلم) في الوضع الفاتح.

مكون السمة هذا لا يعمل مع الشريط الجانبي، هل هناك خطط لدعمه؟ شكرًا على النظر وعلى ما تم إنشاؤه بالفعل!

إعجاب واحد (1)

مرحباً يا رفاق،
لقد كنت مشغولاً في الأشهر القليلة الماضية ولكنني أردت حقًا أن أمنح هذه المكونات المزيد من الاهتمام مرة أخرى :slight_smile:
سأحاول التحقق من مقدار ما هو مطلوب مع كل التغييرات الأخيرة من Discourse ونشر تحديث هنا.

3 إعجابات

حسناً، بعد إعادة العمل على سمة ليلة الفضاء الخارجي، أدركت أن هذه المكونة لم تعد منطقية.

مكون تبديل الوضع الداكن/الفاتح يقوم بالضبط بما حاولت فعله بهذه المكونة هنا. ولكن بشكل أفضل بكثير.
على المدى الطويل، فإن نهجي في العمل مع أطنان من الفئات والتلاعب بها ليس قابلاً للصيانة.
بدلاً من ذلك، هذه المكونة أدناه تأخذ مخططات لوحة الألوان الخاصة بك وتقلب متغيرات CSS المناسبة:

إنها حاليًا، على ما يبدو، معطلة (تعمل في سمة ليلة الفضاء الخارجي الخاصة بي على الرغم من ذلك)، ولكن في المستقبل يرجى استخدامها بدلاً من ذلك.

لقد قمت بتعيين المكونة الخاصة بي هنا على أنها قديمة/مهملة في الوقت الحالي.

إعجاب واحد (1)