Sunday, November 13, 2022

Favicon Error While Using Inline Favicon

Hello,

So everything is working but I get errors in my logs that I could just suppress, but I would rather just fix the error.

NGINX Error:
775#775: *2421 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory)

Django Error (warning):
Not Found: /favicon.ico

So here's where things get interesting. I don't want to serve a favicon this way because I can't do a media query. I inline my favicon such that I can do a media query to detect light/dark mode and change the color of the favicon accordingly. If I save the inline code as a svg the media query will not work.

Is there a way around this, or I am forced to choose from implementing the media query at the nginx layer or not having my theme-responsive favicon?

Thanks very much! I hope this is interesting to someone because I think it's super neat to have the favicon change color based on a media query.

Best Regards,

-James Logan

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/649de193-8817-402d-aa7c-39eed5737de2n%40googlegroups.com.

No comments:

Post a Comment