File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,12 @@ section.prose {
8888 @apply bg-slate-900 rounded-lg;
8989}
9090
91+ .prose pre .mermaid {
92+ background-color : white !important ;
93+ border-radius : 0.5rem ;
94+ padding : 1rem ;
95+ }
96+
9197.prose pre > code {
9298 @apply bg-none font-monogeist;
9399}
Original file line number Diff line number Diff line change 1+ {{ $width := (index .Attributes "width") | default "75%" }}
2+ < div style ="width: {{ $width }}; ">
3+ < pre class ="mermaid " style ="background-color: white; padding: 1rem; border-radius: 0.5rem; ">
4+ {{ .Inner | htmlEscape | safeHTML }}
5+ </ pre >
6+ </ div >
7+ {{ .Page.Store.Set "hasMermaid" true }}
Original file line number Diff line number Diff line change 7979 {{ partial "toc-js.html" . }}
8080
8181 {{ partial "search-modal.html" . }}
82+
83+ {{ if .Store.Get "hasMermaid" }}
84+ < script type ="module ">
85+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs' ;
86+ mermaid . initialize ( {
87+ startOnLoad : true ,
88+ theme : 'base' ,
89+ themeVariables : {
90+ fontFamily : 'Space Mono' ,
91+ primaryColor : '#ffffff' ,
92+ primaryBorderColor : '#ee0000'
93+ }
94+ } ) ;
95+ </ script >
96+ {{ end }}
8297 </ body >
8398</ html >
You can’t perform that action at this time.
0 commit comments