stellar / slingshot

A new blockchain architecture under active development, with a strong focus on scalability, privacy and safety
Apache License 2.0
415 stars 61 forks source link

demo: fix favicon #475

Closed leighmcculloch closed 4 years ago

leighmcculloch commented 4 years ago

What

Add a favicon and fix the rocket mounting serving of the favicon.

Why

The first time I ran and opened the server it printed out a 404 Not Found error with red text because the browser attempted to get /favicon.ico.

It doesn't look like there is a favicon.ico in the repo, but the code references one.

The mount needed changing because the StaticFiles::from mount won't serve a single file at a fixed base URL, it appends a path to a base path and loads that file. In the case of the favicon.ico at root we want it to serve that one file. There might be a better way to do this, but I couldn't find one.

The favicon.ico was generated by taking the demo/static/motocrab-research.png, removing the text in the top left, resizing the canvas to be 500x500px, centering motocrab, then exporting as a 16x16px. The PNG is included, although not used.