2019-08-17 17:16:09 +02:00
|
|
|
<!-- shuffle md5 as id -->
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
|
|
|
{{- $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
|
|
|
{{- if $echartsMap -}}
|
2019-11-23 18:10:17 +01:00
|
|
|
{{ $echartsMap = .Inner | printf "{%s}" | dict $id | merge $echartsMap -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- else -}}
|
2019-11-23 18:10:17 +01:00
|
|
|
{{ $echartsMap = .Inner | printf "{%s}" | dict $id -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
2019-08-24 13:32:41 +02:00
|
|
|
<div class="echarts" id="{{ $id }}"></div>
|