create html part 24
All checks were successful
ci / build (push) Successful in 1m8s

This commit is contained in:
Christopher Hase 2025-03-28 09:32:23 +01:00
parent 18f1d05ba6
commit 4c82f6e31e

View file

@ -35,7 +35,7 @@ async function sendEmail(content: string) {
const info = await transporter.sendMail({
from: '"The Oracle" <the.oracle@holy.mountain>',
to: "Christopher.Hase@telekom.com;test@mailhog.local",
subject: "Your New Horoscope Is Ready",
subject: "Your Horoscope Is Ready",
text: content,
html: html(content)
});
@ -104,8 +104,6 @@ function parse(input: string): Node {
currentNode.value = line + "<br>";
} else {
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 = "";
// type: "Root" | "Hexagram" | "Judgement" | "Images" | "ChangingLines" ;
switch (node.type) {
case "Root":
return render(node.child!);
case "Hexagram":
//outputHTML = "<p><i>" + node.value + "</i></p>";
node.value = node.value?.replace("</h1>", "</h1><h3>"); //TODO: OK??
//outputHTML = "<p style=\"font-size: 2rem;\">" + node.value + "</p>"; //TODO: OK??
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: OK??
node.value = node.value?.replace("</h1>", "</h1><h3>");
node.value = node.value?.replace("<br>", " --- ");
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: maybe better: node.value = "<p>" + node.value + "</h3></p>";
outputHTML = outputHTML + render(node.child!);
return outputHTML;
@ -152,11 +144,8 @@ function render(node: Node): string {
outputHTML = "<p>" + node.value + "</p>";
outputHTML = outputHTML + render(node.child!);
//console.log(" " + node.type + " - outputHTML: " + outputHTML); //TODO: zu viel Info!!!
return outputHTML;
}
}