Fixes #100 implements a custom Markdown renderer

This commit is contained in:
Zef Hemel
2022-11-01 15:01:28 +01:00
parent b8e27b216e
commit 3d671e8195
20 changed files with 652 additions and 37 deletions
+9
View File
@@ -0,0 +1,9 @@
document.getElementById("root").addEventListener("click", (e) => {
// console.log("Got click", e.target)
const dataSet = e.target.dataset;
if(dataSet["onclick"]) {
sendEvent("preview:click", dataSet["onclick"]);
} else if(dataSet["pos"]) {
sendEvent("preview:click", JSON.stringify(["pos", dataSet["pos"]]));
}
})
+67
View File
@@ -0,0 +1,67 @@
body {
font-family: georgia,times,serif;
font-size: 14pt;
max-width: 800px;
margin-left: auto;
margin-right: auto;
padding-left: 20px;
padding-right: 20px;
}
table.front-matter {
border: 1px solid #555;
font-size: 75%;
}
table.front-matter .key {
font-weight: bold;
}
table {
width: 100%;
border-spacing: 0;
}
ul li p {
margin: 0;
}
thead tr {
background-color: #333;
color: #eee;
}
th, td {
padding: 8px;
}
tbody tr:nth-of-type(even) {
background-color: #f3f3f3;
}
a[href] {
text-decoration: none;
}
blockquote {
border-left: 1px solid #333;
margin-left: 2px;
padding-left: 10px;
}
hr {
margin: 1em 0 1em 0;
text-align: center;
border-color: #777;
border-width: 0;
border-style: dotted;
}
hr:after {
content: "···";
letter-spacing: 1em;
}
span.highlight {
background-color: yellow;
}