diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-03-12 21:30:47 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-03-12 21:30:47 +0800 |
commit | 7043881ae2a712487c0557926d75384a9d35b6ac (patch) | |
tree | 2f89714a891b357ebbc029b5f4361909b888ef7a /layouts/partials | |
parent | 1da110d6b1d03824eba1aed1cf14ca5dee763e58 (diff) |
feat: generate flowchart diagrams from code blocks (#35)
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/scripts.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index fc254b5..01e5e16 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -8,6 +8,19 @@ <script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script> <script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script> {{ if .Site.Params.fancybox }}<script type="text/javascript" src="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.js" | relURL }}"></script>{{ end }} +{{- end -}} + +<!-- flowchart --> +{{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}} +<script> + {{- if .Params.flowchartDiagrams.options -}} + window.flowchartDiagramsOptions = {{ .Params.flowchartDiagrams.options | safeJS }}; + {{- else if .Site.Params.flowchartDiagrams.options -}} + window.flowchartDiagramsOptions = {{ .Site.Params.flowchartDiagrams.options | safeJS }}; + {{- end -}} +</script> +<script src="https://cdn.jsdelivr.net/npm/raphael@2.2.7/raphael.min.js" integrity="sha256-67By+NpOtm9ka1R6xpUefeGOY8kWWHHRAKlvaTJ7ONI=" crossorigin="anonymous"></script> +<script src="https://cdn.jsdelivr.net/npm/flowchart.js@1.8.0/release/flowchart.min.js" integrity="sha256-zNGWjubXoY6rb5MnmpBNefO0RgoVYfle9p0tvOQM+6k=" crossorigin="anonymous"></script> {{- end }} <script type="text/javascript" src="{{ "dist/even.min.js?v=3.0.1" | relURL }}"></script> |