Skip to content
Snippets Groups Projects
Commit f6cafe7a authored by Jennifer Mankoff's avatar Jennifer Mankoff
Browse files

Fixed Mermaid!

parent 44347b0b
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,7 @@ remarkConfig: ...@@ -80,7 +80,7 @@ remarkConfig:
# Custom vars # Custom vars
version: 1.1.0 version: 2.1.0
# Exclude from processing. # Exclude from processing.
# The following items will not be processed, by default. Create a custom list # The following items will not be processed, by default. Create a custom list
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<script type="text/javascript" src="{{'assets/js/mathjax-sre.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/mathjax-sre.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/html2canvas.min.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/html2canvas.min.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/presentation-export.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/presentation-export.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/mermaid.js' | relative_url}}"></script>
<script type="text/javascript"> <script type="text/javascript">
var slideshow = remark.create({ var slideshow = remark.create({
...@@ -55,9 +56,23 @@ ...@@ -55,9 +56,23 @@
highlightLines: 'true', highlightLines: 'true',
slideNumberFormat: 'Slide %current% of %total%' slideNumberFormat: 'Slide %current% of %total%'
}); });
var config = {
startOnLoad:false,
cloneCssStyles:false,
htmlLabels:true,
useMaxWidth:false,
callback:function(id){
console.log(id,' rendered');
}
};
mermaid.initialize(config);
slideshow.on("afterShowSlide", s => {
const [slide] = document.getElementsByClassName("remark-visible");
mermaid.init(Array.from(slide.getElementsByClassName("mermaid")));
});
</script> </script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>
<!-- <!--
class center middle class center middle
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<script type="text/javascript" src="{{'assets/js/mathjax-sre.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/mathjax-sre.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/html2canvas.min.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/html2canvas.min.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/presentation-export.js' | relative_url}}"></script> <script type="text/javascript" src="{{'assets/js/presentation-export.js' | relative_url}}"></script>
<script type="text/javascript" src="{{'assets/js/mermaid.js' | relative_url}}"></script>
<script type="text/javascript"> <script type="text/javascript">
var slideshow = remark.create({ var slideshow = remark.create({
...@@ -56,8 +57,25 @@ ...@@ -56,8 +57,25 @@
highlightLines: 'true', highlightLines: 'true',
slideNumberFormat: 'Slide %current% of %total%' slideNumberFormat: 'Slide %current% of %total%'
}); });
var config = {
startOnLoad:false,
cloneCssStyles:false,
htmlLabels:true,
useMaxWidth:false,
callback:function(id){
console.log(id,' rendered');
}
};
mermaid.initialize(config);
slideshow.on("afterShowSlide", s => {
const [slide] = document.getElementsByClassName("remark-visible");
mermaid.init(Array.from(slide.getElementsByClassName("mermaid")));
});
</script> </script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body> </body>
<!-- <!--
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
.mermaid .label { .mermaid .label {
color: #333; color: #333;
font-size: 16pt;
} }
.node rect, .node rect,
...@@ -59,19 +58,6 @@ text.actor { ...@@ -59,19 +58,6 @@ text.actor {
stroke: grey; stroke: grey;
} }
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #333;
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
stroke: #333;
}
#arrowhead { #arrowhead {
fill: #333; fill: #333;
} }
...@@ -101,13 +87,6 @@ text.actor { ...@@ -101,13 +87,6 @@ text.actor {
stroke: none; stroke: none;
} }
.loopLine {
stroke-width: 2;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #CCCCFF;
}
.note { .note {
stroke: #aaaa33; stroke: #aaaa33;
fill: #fff5ad; fill: #fff5ad;
...@@ -116,8 +95,6 @@ text.actor { ...@@ -116,8 +95,6 @@ text.actor {
.noteText { .noteText {
fill: black; fill: black;
stroke: none; stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
} }
/** Section styling */ /** Section styling */
...@@ -158,8 +135,6 @@ text.actor { ...@@ -158,8 +135,6 @@ text.actor {
.sectionTitle { .sectionTitle {
text-anchor: start; text-anchor: start;
font-size: 10px;
text-height: 12px;
} }
/* Grid and axis */ /* Grid and axis */
...@@ -188,19 +163,16 @@ text.actor { ...@@ -188,19 +163,16 @@ text.actor {
.taskText { .taskText {
text-anchor: middle; text-anchor: middle;
font-size: 10px;
} }
.taskTextOutsideRight { .taskTextOutsideRight {
fill: black; fill: black;
text-anchor: start; text-anchor: start;
font-size: 10px;
} }
.taskTextOutsideLeft { .taskTextOutsideLeft {
fill: black; fill: black;
text-anchor: end; text-anchor: end;
font-size: 10px;
} }
/* Specific task settings for the sections*/ /* Specific task settings for the sections*/
...@@ -308,22 +280,13 @@ text.actor { ...@@ -308,22 +280,13 @@ text.actor {
.titleText { .titleText {
text-anchor: middle; text-anchor: middle;
font-size: 16px;
fill: black; fill: black;
} }
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
}
div.mermaidTooltip { div.mermaidTooltip {
position: absolute; position: absolute;
text-align: center; text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: #ffffde; background: #ffffde;
border: 1px solid #aaaa33; border: 1px solid #aaaa33;
border-radius: 2px; border-radius: 2px;
...@@ -472,17 +435,3 @@ g.classGroup rect { ...@@ -472,17 +435,3 @@ g.classGroup rect {
fill: #FFFFFF00 !important; fill: #FFFFFF00 !important;
} }
/* Keep svgs within containing div */
div.mermaid > svg {
width: 100%;
aspect-ratio: none;
}
g > foreignObject > div {
position:relative;
font-size: .8em;
height:auto;
width:auto;
padding:3px;
display:inline-block;
}
...@@ -661,19 +661,25 @@ html.remark-container, body.remark-container { ...@@ -661,19 +661,25 @@ html.remark-container, body.remark-container {
} }
.left-column-half { .left-column-half {
color: #111; vertical-align:top;
width: 50%; width: 50%;
float: left; height: 92%;
h2:last-of-type, h3:last-child { float: left;
color: #000; h2:last-of-type, h3:last-child {
} color: #000;
padding-left: 1em; }
padding-left: 1em;
} }
.right-column-half { .right-column-half {
width: 45%; width: 45%;
float: right; height: 92%;
padding-top: 1em; float: right;
vertical-align:top;
h2:last-of-type, h3:last-child {
color: #000
}
padding-left: 1em;
} }
.left-column40 { .left-column40 {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment