LoveIt/layouts/shortcodes/dev/echarts.html

11 lines
443 B
HTML
Raw Normal View History

<!-- 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 -}}
{{ $echartsMap = .Inner | printf "{%s}" | dict $id | merge $echartsMap -}}
2020-01-31 15:53:04 +01:00
{{- else -}}
{{ $echartsMap = .Inner | printf "{%s}" | dict $id -}}
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- .Page.Scratch.Set "echartsMap" $echartsMap -}}
2020-02-06 17:10:00 +01:00
<div class="echarts" id="{{ $id }}"></div>