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

功能改进建议:根据主题明暗改变侧边栏中的 social icon #69

Closed
Cubik65536 opened this issue Apr 14, 2022 · 4 comments
Closed
Labels
resolved 问题得以解决

Comments

@Cubik65536
Copy link

Cubik65536 commented Apr 14, 2022

希望可以通过将配置文件改成例如下面这样实现在明暗效果不一样的时候使用不同的 icon。因为目前如果使用同一个 icon,在白色模式下可能会看不见为暗黑模式设置的白色图标,而反之亦然。

footer:
  social:
    light:
      - icon: '<img src="https://cdn.jsdelivr.net/gh/Rush/Font-Awesome-SVG-PNG@master/black/svg/github.svg"/>'
        url: https://github.com/
    dark:
      - icon: '<img src="https://cdn.jsdelivr.net/gh/Rush/Font-Awesome-SVG-PNG@master/white/svg/github.svg"/>'
        url: https://github.com/
@xaoxuu xaoxuu added the todo label Apr 14, 2022
@github-actions
Copy link

👋 Hello,
Your suggestion is great, we will add this feature in subsequent versions, thank you very much!

👋 您好,
您的建议很棒,我们将会在后续版本中加入这个功能,非常感谢!

@L33Z22L11
Copy link
Contributor

这种功能应当让SVG图标本身来完成,对于单色图标,可以设置stroke或者fillcurrentColor,对于多色图标,可以根据prefers-color-scheme设置不同颜色,参见:
https://blog.tomayac.com/2019/09/21/prefers-color-scheme-in-svg-favicons-for-dark-mode-icons/
https://catalin.red/svg-favicon-light-dark-theme/

@xaoxuu
Copy link
Owner

xaoxuu commented Apr 19, 2024

专业👍

@xaoxuu xaoxuu added resolved 问题得以解决 and removed todo labels Apr 19, 2024
Copy link

👋 Hello,
This issue has been marked as resolved. If there are other issues, please contact us with a new issue.

👋 您好,
此 issue 已经被标记为已解决,如果还有其它问题,请提出新的 issue 联系我们。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved 问题得以解决
Projects
None yet
Development

No branches or pull requests

3 participants