Write some better html.
This commit is contained in:
parent
06500b3653
commit
7e835b05b0
20
index.js
20
index.js
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user