Sunday, November 20, 2022

steps I took to add a picture to the website frontpage

The current iteration of https://derivationmap.net/ uses data from a JSON file to dynamically generate page content. 

On the front page of https://derivationmap.net/ there's currently an SVG. I wanted to place a PNG next to the SVG. Before placing the PNG, I wanted to make the SVG narrower. Looking at the source code for the page index.html, I see

<svg id='viz'></svg>

Inspecting the source code of the rendered page, I see

var width = 600;

which comes from https://github.com/allofphysicsgraph/proofofconcept/blob/gh-pages/v7_pickle_web_interface/flask/templates/_d3_js.html#L29

To test out a change to a narrower width, I start "Docker desktop" on my Mac and, in the directory allofphysicsgraph/proofofconcept/v7_pickle_web_interface, run the command

docker-compose up --build --remove-orphans

In a web browser I was then able to access http://localhost:80 and got a warning from Chrome that the certs were invalid. Incognito mode seemed to be working better.