LoveIt/layouts/shortcodes/dev/echarts.html

10 lines
442 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 -}}
2019-08-24 13:32:41 +02:00
<div class="echarts" id="{{ $id }}"></div>