Skip to content

Commit

Permalink
Nieuwe mermaid plug-in
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderke committed Mar 19, 2024
1 parent 882aa36 commit dcce7f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
20 changes: 5 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="https://cdn.jsdelivr.net/gh/digitalbazaar/respec-mermaid@1.0.1/dist/main.js" class="remove"></script>
<script class="remove" src="https://cdn.jsdelivr.net/gh/w3c/respec-mermaid@1.1.0/dist/main.js"></script>
<script src="https://gitdocumentatie.logius.nl/publicatie/respec/organisation-config.js" class="remove"></script>
<script src="js/config.js" class="remove"></script>
<script class="remove"> respecConfig = {...organisationConfig, ...respecConfig}</script>
Expand All @@ -16,21 +16,11 @@

<body>
<section id="abstract" data-include-format="markdown" data-include="abstract.md"></section>
<section id="sotd"></section><!-- Wordt automatisch gevuld -->
<script>
let content = "";

const getClass = function(key) {
if (respecConfig.content[key]!==""){return ` class="${respecConfig.content[key]}"`}
}

for (let contentKey in respecConfig.content) {
content += `<section data-include-format="markdown" data-include="${contentKey}.md" ${getClass(contentKey)||""}></section>`
}

document.getElementById("sotd").insertAdjacentHTML('afterend', content);
</script>
<section id="sotd"></section>
<section id='conformance'></section>
<section class="informative" data-include-format="markdown" data-include="ch01.md"></section>
<section data-include-format="markdown" data-include="ch02.md"></section>
<section class="appendix" data-include-format="markdown" data-include="mermaid.md"></section>
<section id='tof'></section>
<section id="index"></section>
</body>
Expand Down
1 change: 1 addition & 0 deletions js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ var respecConfig = {
uri: "template.pdf",
},
],
postProcess: [window.respecMermaid.createFigures]
};

0 comments on commit dcce7f4

Please sign in to comment.