From 372ce92e2e4419f6c3e7e4a85596e7af33ef9861 Mon Sep 17 00:00:00 2001 From: Lichene Date: Fri, 14 Nov 2025 15:15:32 +0100 Subject: [PATCH] render markdown --- ... Embeddings Reveal (Almost) As Much As Text.md | 0 public/js/arf.js | 14 +++++++++++--- public/viewer.html | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) rename Notes/Text Embeddings Reveal (Almost) As Much As Text.txt => notes/Text Embeddings Reveal (Almost) As Much As Text.md (100%) create mode 100644 public/viewer.html diff --git a/Notes/Text Embeddings Reveal (Almost) As Much As Text.txt b/notes/Text Embeddings Reveal (Almost) As Much As Text.md similarity index 100% rename from Notes/Text Embeddings Reveal (Almost) As Much As Text.txt rename to notes/Text Embeddings Reveal (Almost) As Much As Text.md diff --git a/public/js/arf.js b/public/js/arf.js index b600bbb..2522c48 100644 --- a/public/js/arf.js +++ b/public/js/arf.js @@ -109,13 +109,21 @@ function update(source) { }) .append("a") .attr("target", "_blank") - .attr("xlink:href", function (d) { + .attr( + "xlink:href", + (d) => + "viewer.html?file=https://git.hackinpovo.it/HackInPovo/resources/raw/branch/main/notes/" + + d.name + + ".md", + ) + .attr("target", "_blank") // ← open in new tab + /* .attr("xlink:href", function (d) { return ( - "https://git.hackinpovo.it/HackInPovo/resources/raw/branch/main/Notes/" + + "https://git.hackinpovo.it/HackInPovo/resources/raw/branch/main/notes/" + d.name + ".txt" ); - }) + })*/ .append("svg:text") .attr("x", function (d) { // Get the sibling text element (the node name) and calculate position diff --git a/public/viewer.html b/public/viewer.html new file mode 100644 index 0000000..c330f63 --- /dev/null +++ b/public/viewer.html @@ -0,0 +1,15 @@ + + + + + + +
+ + +