Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change comments color palette on dark mode #2

Open
TimTree opened this issue Jun 23, 2020 · 1 comment
Open

Change comments color palette on dark mode #2

TimTree opened this issue Jun 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@TimTree
Copy link
Owner

TimTree commented Jun 23, 2020

It is indeed possible to dynamically change the comments colors for dark mode: https://talk.hyvor.com/documentation/faq/dynamically-change-colors

The solution is to run hyvor_talk.setPalette(PALETTE_OBJ_FOR_DARK_MODE); in the JavaScript function that swaps light/dark mode. However, the plugin gatsby-plugin-dark-mode injects a predefined dark mode function, which I cannot easily modify. I may need to re-implement dark mode from scratch, a nontrivial task.

@TimTree TimTree added the enhancement New feature or request label Jun 23, 2020
@TimTree
Copy link
Owner Author

TimTree commented Aug 23, 2020

Thanks to a recent update to the hyvor-talk-react plugin, I was able to implement dark mode comments in commit 19ef83d.

However, the comments will not change color schemes if the user toggles the theme after the comments have loaded. For that to happen, I'll probably need to use the above solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant