WithCandour / statamic-aardvark-seo

Candour's SEO addon for Statamic
https://statamic.com/marketplace/addons/aardvark-seo
11 stars 18 forks source link

Add support for themed favicon #33

Closed aerni closed 3 years ago

aerni commented 4 years ago

This adds support for separate favicons for light and dark mode. A simple script is detecting whether the browser is in light or dark mode and serves the right icon.

To proof the concept, it's currently using this script . I'd probably add the script as part of the addon itself, to not rely on a CDN. Here's an article that further describes the concept.

I'd love to see this merged. Let me know if I can further assist you.

AndrewHaine commented 4 years ago

Thanks @aerni , we'll review this internally and get back to you soon

aerni commented 4 years ago

Are you still thinking about implementing this?

aerni commented 3 years ago

If I'm not mistaken, v2 of this addon now allows for other file formats than just png for the favicon. This means, that you could also use an svg instead and change the styling for the dark mode with a media query.

AndrewHaine commented 3 years ago

Hi @aerni ,

Yep that's correct Aardvark v1 and v2 will allow you to upload an SVG so I would suggest that would be the best way to do this, this is supported in most modern browsers so sounds like the best option - I'll close this off and mark that as the recommendation.