euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

commit e95763fee2cbd55fa3f1e937ba62789b1fbc257a (patch)
parent c300bc8fd5c32726f7c15aedde20181e1b142bbc
Author: Alex Karle <alex@karle.co>
Date:   Mon, 25 May 2020 11:40:27 -0400

preprod: Add a new preprod.html for our staging site

I'm configuring our nginx reverse proxy to map stage.euchre.live to our
preprod version of the site, so that we can move fast and break things
while allowing relatives to play all the while.

This commit sends over a modified frontend with a warning banner should
the user be using the preprod version (so that we can easily
distinguish).

Diffstat:
Mgloat.pl | 2+-
Apublic/preprod.html | 31+++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/gloat.pl b/gloat.pl @@ -15,7 +15,7 @@ plugin Webpack => {process => [qw(js css sass)]}; get '/' => sub { my $c = shift; - $c->reply->static('index.html'); + $c->reply->static($ENV{PREPROD} ? 'preprod.html' : 'index.html'); }; get '/tables' => sub { diff --git a/public/preprod.html b/public/preprod.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <link href="asset/euchre-live.development.css" rel="stylesheet"> + <link href="suits/H.svg" rel="icon" type="image/x-icon" /> + <style> +#preprod-alert { + height: 30px; + background-color: #ff5050; +} +#preprod-warning { + color: #ffffff; + text-align: center; + font-weight: bold; + font-size: large; + vertical-align: middle; +} + </style> + <title>(PreProd) Euchre Live</title> + </head> + <body> + <div id="preprod-alert"> + <p id="preprod-warning"> + WARNING: Using the pre-production euchre.live version + </p> + </div> + <div id="content"></div> + <script src="asset/euchre-live.development.js"></script> + </body> +</html>