Cyclenerd / static_status

🚦Bash script to generate a static status page.
https://cyclenerd.github.io/static_status/
GNU General Public License v3.0
536 stars 71 forks source link

write status icon as svg file #33

Closed kevinpapst closed 3 years ago

kevinpapst commented 3 years ago

Notes

This PR adds one more output file: a SVG image representing the status as "colored dot" and the image filesize will be ~ 165 byte.

I have seen this pretty often in websites, that they want to directly signal whether everything is fine or something might be going on in the infrastructure. For example like this: Bildschirmfoto 2021-08-13 um 11 36 34

One just needs to remember to include the image with a cache breaker URL (eg. an appended timestamp: <a href="status.html">Status page <img src="status.svg?{{ timestamp }}"></a>

Static websites needs to fallback to render the icon with javascript, eg with: document.write('<img src="status.svg?' + Date.now() + '">')

Possible enhancements:

Cyclenerd commented 3 years ago

Very good idea! Thank you very much.

kevinpapst commented 3 years ago

Thanks for merging! And totally forgot to add a note to the docs, will sent a new PR next week.