Write some better html.

This commit is contained in:
Gitea 2019-03-16 18:34:09 -04:00
parent 06500b3653
commit 7e835b05b0

View File

@ -30,10 +30,24 @@ const logger = {
app.get('/', (req, res) => {
const theStrategy = strategies[ Math.floor(Math.random()*strategies.length) ];
res.write('<head><meta name="viewport" content="width=device-width, initial-scale=1"></head><body style="background-color:#111; margin:0; padding:0; display:flex;align-items:center;justify-content:center;min-height:24em;"><div style="color:#eee;margin:0 auto; max-width:80%;flex:1;text-align:center;font-family:Futura;font-size:30px;line-height:40px">');
res.write(theStrategy.toLowerCase());
const theTree =
`<!doctype html>
<html lang='en'>
<head>
<title>
${theStrategy.toLowerCase()}
</title>
<meta charset="utf-8">
</head>
<body style="background-color:#111; margin:0; padding:0; display:flex;align-items:center;justify-content:center;min-height:24em;">
<div style="color:#eee;margin:0 auto; max-width:80%;flex:1;text-align:center;font-family:Futura;font-size:30px;line-height:40px">
${theStrategy.toLowerCase()}
</div>
</body>
</html>`;
res.write(theTree);
logger.log('\non '+moment().format("dddd, MMMM Do YYYY, h:mma").toLowerCase()+' a card was drawn');
res.write('</div></body>');
res.end();
});