This commit is contained in:
parent
18f1d05ba6
commit
4c82f6e31e
1 changed files with 4 additions and 15 deletions
19
broker.ts
19
broker.ts
|
@ -35,7 +35,7 @@ async function sendEmail(content: string) {
|
||||||
const info = await transporter.sendMail({
|
const info = await transporter.sendMail({
|
||||||
from: '"The Oracle" <the.oracle@holy.mountain>',
|
from: '"The Oracle" <the.oracle@holy.mountain>',
|
||||||
to: "Christopher.Hase@telekom.com;test@mailhog.local",
|
to: "Christopher.Hase@telekom.com;test@mailhog.local",
|
||||||
subject: "Your New Horoscope Is Ready",
|
subject: "Your Horoscope Is Ready",
|
||||||
text: content,
|
text: content,
|
||||||
html: html(content)
|
html: html(content)
|
||||||
});
|
});
|
||||||
|
@ -104,8 +104,6 @@ function parse(input: string): Node {
|
||||||
currentNode.value = line + "<br>";
|
currentNode.value = line + "<br>";
|
||||||
} else {
|
} else {
|
||||||
currentNode.value = currentNode.value + line + "<br>";
|
currentNode.value = currentNode.value + line + "<br>";
|
||||||
|
|
||||||
//console.log("currentNode.value: " + currentNode.value); //TODO: zu viel Info!!!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,19 +123,13 @@ function render(node: Node): string {
|
||||||
|
|
||||||
var outputHTML: string = "";
|
var outputHTML: string = "";
|
||||||
|
|
||||||
// type: "Root" | "Hexagram" | "Judgement" | "Images" | "ChangingLines" ;
|
|
||||||
|
|
||||||
|
|
||||||
switch (node.type) {
|
switch (node.type) {
|
||||||
case "Root":
|
case "Root":
|
||||||
return render(node.child!);
|
return render(node.child!);
|
||||||
case "Hexagram":
|
case "Hexagram":
|
||||||
//outputHTML = "<p><i>" + node.value + "</i></p>";
|
node.value = node.value?.replace("</h1>", "</h1><h3>");
|
||||||
|
node.value = node.value?.replace("<br>", " --- ");
|
||||||
node.value = node.value?.replace("</h1>", "</h1><h3>"); //TODO: OK??
|
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: maybe better: node.value = "<p>" + node.value + "</h3></p>";
|
||||||
//outputHTML = "<p style=\"font-size: 2rem;\">" + node.value + "</p>"; //TODO: OK??
|
|
||||||
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: OK??
|
|
||||||
|
|
||||||
outputHTML = outputHTML + render(node.child!);
|
outputHTML = outputHTML + render(node.child!);
|
||||||
|
|
||||||
return outputHTML;
|
return outputHTML;
|
||||||
|
@ -152,11 +144,8 @@ function render(node: Node): string {
|
||||||
outputHTML = "<p>" + node.value + "</p>";
|
outputHTML = "<p>" + node.value + "</p>";
|
||||||
outputHTML = outputHTML + render(node.child!);
|
outputHTML = outputHTML + render(node.child!);
|
||||||
|
|
||||||
//console.log(" " + node.type + " - outputHTML: " + outputHTML); //TODO: zu viel Info!!!
|
|
||||||
|
|
||||||
return outputHTML;
|
return outputHTML;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue