earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Add colorblind friendly mode #125

Closed mwbernard closed 9 months ago

mwbernard commented 9 months ago

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.

ebrelsford commented 9 months ago

@mwbernard To test how this is going to look in production, build the site locally then view the generated version.

  1. Build: npm run build. The site is generated in dist/.
  2. cd dist
  3. Run a simple server (such as python3 -m http.server 8000, site will be running on localhost:8000.

Following these steps I can see the images are referenced like this:

image

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 public/ and fetch them from there as we do the data. Do that and test it with the above process?

mwbernard commented 9 months ago

@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.

mwbernard commented 9 months ago

@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?