From 4c82f6e31e56f9b4c837fc6ce033314c75138cf6 Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Fri, 28 Mar 2025 09:32:23 +0100 Subject: [PATCH] create html part 24 --- broker.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/broker.ts b/broker.ts index 029597b..575bd63 100644 --- a/broker.ts +++ b/broker.ts @@ -35,7 +35,7 @@ async function sendEmail(content: string) { const info = await transporter.sendMail({ from: '"The Oracle" ', 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 + "
"; } else { currentNode.value = currentNode.value + line + "
"; - - //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 = "

" + node.value + "

"; - - node.value = node.value?.replace("", "

"); //TODO: OK?? - //outputHTML = "

" + node.value + "

"; //TODO: OK?? - outputHTML = "

" + node.value + "

"; //TODO: OK?? - + node.value = node.value?.replace("", "

"); + node.value = node.value?.replace("
", " --- "); + outputHTML = "

" + node.value + "

"; //TODO: maybe better: node.value = "

" + node.value + "

"; outputHTML = outputHTML + render(node.child!); return outputHTML; @@ -152,11 +144,8 @@ function render(node: Node): string { outputHTML = "

" + node.value + "

"; outputHTML = outputHTML + render(node.child!); - //console.log(" " + node.type + " - outputHTML: " + outputHTML); //TODO: zu viel Info!!! - return outputHTML; } - } \ No newline at end of file