cclrobotics / ARTBot

Project to allow submissions of agar art and conversion of those submissions to bot-readable
MIT License
8 stars 5 forks source link

Website announcement message configurable by env var #67

Closed tsdobbs closed 4 years ago

tsdobbs commented 4 years ago

This method allows a message to be added to the top of the website by adding an environment variable called ANNOUNCEMENT. In this specific case, I'd like to add a note about COVID-19 limitations, but it could work for any kind of special announcement needed.

It's not very idiomatic to the rest of the code. Rather than leverage the API through Javascript, it passes the the announcement as a variable through the view and uses Jinja to render it into the HTML if it exists. So the front-end and back-end are less separated. We can do better.