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

Color mode switcher #978

Closed
shaedrich opened this issue Mar 22, 2024 · 2 comments · Fixed by #979
Closed

Color mode switcher #978

shaedrich opened this issue Mar 22, 2024 · 2 comments · Fixed by #979
Labels
discuss during sync Should be discussed during an upcoming sync

Comments

@shaedrich
Copy link
Contributor

It's nice that you include a language switcher on your website. However, it's not exactly apparent that it is one. I guessed, it was and was proven right, but it could have an icon of sorts resembling light and dark.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2024
@SeanTAllen
Copy link
Member

This is provided by the theme we use. We won't be changing the icon.

If that isn't what you meant, do let me know. Otherwise, if you think something else would be better, I'd open an issue with https://squidfunk.github.io/mkdocs-material/.

@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2024
@shaedrich
Copy link
Contributor Author

shaedrich commented Mar 22, 2024

Well, you could change it, as far as I see it:

https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/?h=

The following properties must be set for each toggle:

icon

💧⚠️ This property must point to a valid icon path referencing any icon bundled with the theme, or the build will not succeed. Some popular combinations:

  • grafikmaterial/brightness-7 + material/brightness-4
  • grafikmaterial/toggle-switch + material/toggle-switch-off-outline
  • grafikmaterial/weather-night + material/weather-sunny
  • grafikmaterial/eye + material/eye-outline
  • grafikmaterial/lightbulb + material/lightbulb-outline

So, instead of material/toggle-switch + material/toggle-switch-off-outline, you could use material/brightness-7 + material/brightness-4 or material/weather-night + material/weather-sunny—would that be an option?

# Light mode
- scheme: default
primary: brown
accent: amber
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
# Dark mode
- scheme: slate
primary: brown
accent: amber
toggle:
icon: material/toggle-switch
name: Switch to light mode

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2024
shaedrich added a commit to shaedrich/ponylang-website that referenced this issue Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss during sync Should be discussed during an upcoming sync
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants