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

Added option to site Params for customizing the theme selection icon. #830

Closed
wants to merge 1 commit into from

Conversation

petebannister
Copy link

I was building a help system with light/dark theme selection and preferred a different icon for the theme selector (fa-adjust). This PR makes it possible to set the font-awesome class in the site configuration params using e.g.

[params]
  themeSelectIcon = "fa-adjust"

@McShelby
Copy link
Owner

McShelby commented Apr 17, 2024

Thanks for submitting the patch. It's a valuable addtion to the theme's features.

There are a few things to change before adding this to the theme:

  • For consistency it is preferable to work as in the icon / badge shortcode:

    If an icon name is configured without the fa- prefix the theme automatically prepends it with fa-fw fas fa-

    If an fa- prefix is found in the configured icon name, the theme doesn't add anything and puts everything into your hand.

    This gives you the maximum versatility without dropping convenience for simple cases.

  • For completeness, this mechanism should also be applied to the language picker, home and clear-history icon

If you provide the changes for the first bullet point to the theme selection icon, I would implement it for the addtional icons of the second bullet point.

@McShelby McShelby added the unresolved No progress on this issue label Oct 22, 2024
@McShelby McShelby closed this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unresolved No progress on this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants