pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00
3 changed files with 15 additions and 9 deletions
Showing only changes of commit 2606f89e95 - Show all commits

View File

@ -1,32 +1,32 @@
<html lang="en" style="background-color: grey; width: 100%;">
<html lang="en" style="background-color:grey;width:100%;">
<head>
<title>OwlBoard - Register</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html {
background-color: #404c55;
background-image: radial-gradient(#2b343c,#404c55);
background-color:#404c55;
background-image:radial-gradient(#2b343c,#404c55);
}
a {
color: white;
color:white;
}
</style>
</head>
<body>
<br><br>
<table style="width: 100%; text-align: center; color: azure; font-family: sans-serif;">
<table style="width:100%;text-align:center;color:azure;font-family:sans-serif;">
<tr>
<td>
<img src="https://owlboard.info/images/logo/wide_logo.svg" style="height: 100px; padding-top: 20px; margin-top: 0px">
<img src="https://owlboard.info/images/logo/wide_logo.svg" style="height:100px;padding-top:0px;margin-top:0px">
</td>
</tr>
<tr>
<td>
<h1 style="color: #00b7b7">Register for OwlBoard</h1>
<h1 style="color:#00b7b7">Register for OwlBoard</h1>
<br>
<p>Use the link below to register for OwlBoard (Staff Version)</p>
<br>
<a href="https://owlboard.info/auth.html?key=>>ACCESSCODE<<" style="color: azure; font-size: larger; background-color: #007979; padding: 8px; padding-left: 12px; padding-right: 12px; text-decoration: none; border-radius: 14px;">Register</a>
<a href="https://owlboard.info/auth.html?key=>>ACCESSCODE<<" style="color:azure;font-size:larger;background-color:#007979;padding:8px;padding-left:12px;padding-right:12px;text-decoration:none;border-radius:14px;">Register</a>
<br><br><br>
<p>Alternatively copy and paste the link "https://owlboard.info/auth.html?key=>>ACCESSCODE<<</p>
<p>This registration is for one device only, you can register again using the

View File

@ -35,7 +35,8 @@ async function generateConfirmationEmail(eml, uuid) {
try {
let htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
let mini = minify(((htmlTpl).replace(/>>ACCESSCODE<</g, uuid)), { // Add collapse whitespace here
removeComments: true
removeComments: true,
collapseWhitespace: true
});
let txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
return msg = {

View File

@ -0,0 +1,5 @@
const htmlShrink = require('html-minifier').minify
module.exports = async function minify(input) { // Do I need to name this function?
// Minify HTML input, including inline styles.
}