-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
A proper favicon #1603
Comments
I'd like this to be customizable. I'm going to load it from the template loading system such that a custom favicon for a specific instance can be dropped in using a file in |
I don't think abusing the template loader mechanism for this will work: Jinja provides an API for loading text templates, but I don't think it can be sensibly abused to open binary image files instead. Loaded code is here: https://github.com/pallets/jinja/blob/main/src/jinja2/loaders.py |
For the moment then I will hard-code a new favicon and leave it to ASGI plugins if people want to define their own. |
Also people can use a custom base template and link to a custom favicon if they want to. |
This one is 101KB and 1536*1536 which is a bit big! https://github.com/simonw/datasette-app/blob/main/build/icon.png |
https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/ suggests 64x64, I'm going with 128x128 just in case anyone invents a retina-retina screen. |
Here's the 128x128 one - 11kb, I resized it using Preview: Now running it through Squoosh using OxiPNG effort=3 colours=24 - brought it down to 1.36KB. |
I'm going to drop it in |
I'm not crazy about the look - I think this version of the grid may have too many lines for this particular display size. I'm going to try reducing the number of lines in Figma to see if I like that better. https://www.figma.com/file/LKjceTFNtKm6wCbScDqm1Y/Datasette-Logo |
The new Lines 182 to 192 in 0467723
|
New favicon now live on https://latest.datasette.io/ - see also https://latest.datasette.io/favicon.ico |
Oops, I pushed the one I liked least out of the two options! Fixing now. |
Now live on https://latest.datastte.io/ - I'm happy enough with this for the moment: |
One last go at tidying this up. I decided to do a 32x32 pixel version in Pixelmator, using this trick to access a pixel brush: https://osxdaily.com/2016/11/17/enable-pixel-brush-pixelmator-mac/ Frustrating how the white boxes are all exactly four pixels high and ALMOST all four pixels wide, but one of them has to be three pixels wide to fit the space. |
Resized it down to 208 bytes with https://squoosh.app |
Wrote up a TIL: https://til.simonwillison.net/pixelmator/pixel-editing-favicon |
Tips here: https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/ - I think a PNG served at
/favicon.ico
is the best option, since safari doesn't support SVG yet.Relevant code:
datasette/datasette/app.py
Lines 182 to 183 in cb29119
I can reuse the icon for https://datasette.io/desktop
The text was updated successfully, but these errors were encountered: