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

This commit is contained in:
Christopher Hase 2025-03-28 10:22:40 +01:00
parent 48634c0481
commit 6417565512

View file

@ -91,12 +91,12 @@ function parse(input: string): Node {
const judgement: Node = { type: "Judgement"};
currentNode.child = judgement;
currentNode = judgement;
currentNode.value = "<h2>" + line + "</h2>";
currentNode.value = "<h3>" + line + "</h3>";
} else if (line.startsWith("Images")) {
const images: Node = { type: "Images"};
currentNode.child = images;
currentNode = images;
currentNode.value = "<h2>" + line + "</h2>";
currentNode.value = "<h3>" + line + "</h3>";
} else if (line.startsWith("~") && currentNode.type != "ChangingLines") {
const changingLines: Node = { type: "ChangingLines"};
currentNode.child = changingLines;
@ -128,10 +128,10 @@ function render(node: Node): string {
return render(node.child!);
case "Hexagram":
//node.value = node.value?.replace("</h1>", "</h1><h3>");
node.value = node.value?.replace("</h1>", "</h1><div style=\"border: 1px solid gray; padding: 15px; width: 300px; text-align: center; box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);\"><h3>");
node.value = node.value?.replace("</h1>", "</h1><div style=\"border: 1px solid gray; border-radius: 15px; padding: 15px; width: 400px; text-align: center; box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);\"><h2>");
node.value = node.value?.replace("<br>", " - ");
//outputHTML = "<p>" + node.value + "</h3></p>";
outputHTML = "<p>" + node.value + "</h3></div></p>";
outputHTML = "<p>" + node.value + "</h2></div></p>";
outputHTML = outputHTML + render(node.child!);
return outputHTML;