-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add colorblind friendly mode #125
Conversation
…nd-palette"" This reverts commit d41fc05.
const schemeFolder = colorblindFriendly.value ? 'colorblindFriendly/' : 'default/' | ||
const url = `../assets/img/minimaps/${schemeFolder}${crop}_${selectedModel.value}.svg` | ||
|
||
return new URL(url, import.meta.url).href |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where we get the dynamic image URL for each minimap
@mwbernard To test how this is going to look in production, build the site locally then view the generated version.
Following these steps I can see the images are referenced like this: But the images aren't actually there in the built version. I think the easiest thing to do will be to move these images into |
@ebrelsford Thanks for the help on this! Seems to be working well for me in the built version - so I've updated the script to output there. I also added a couple smaller style adjustments for stuff that had been bothering me, so I think this is looking good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, confirmed this should work in prod.
Could be a follow-up issue but as I note in #127 these SVGs are a bit heavy and may be contributing to mobile issues, how hard would it be to generated PNGs instead?
@ebrelsford there's likely a better way to just generate these pngs directly with canvas, but this was fairly easy to add to the existing code. We're still generating svg files, but then using a library to convert those files to pngs and deleting the svgs once that's done. Does that work for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect thanks!
We had an issue with the minimap images not appearing anymore on the live site after this code was merged, so I reverted that commit and will address the problems here before re merging this code.
@ebrelsford do you have any thoughts on why the live site was failing to access the minimap images here.