chart.jsを利用するためのshortcodeを作成

This commit is contained in:
Kazuhiro MUSASHI 2020-06-13 12:39:44 +07:00 committed by Gitea
parent 54a98e15d0
commit 7e235643f7
1 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<canvas id="{{ if .Get "canvas" }}{{ .Get "canvas" }}{{ else }}mychart{{ end }}" width="{{ if .Get "width" }}{{ .Get "width" }}{{ else }}400{{ end }}" height="{{ if .Get "height" }}{{ .Get "height" }}{{ else }}400{{ end }}"></canvas>
<script>
{{ safeHTML .Inner }}
</script>