gcg-website/layouts/shortcodes/chart.html
Denys Konovalov 1980b494e4
All checks were successful
Website Pull Request / Pull-Request-Testbuild (pull_request) Successful in 26s
refactor charts
2024-09-19 22:03:45 +02:00

14 lines
449 B
HTML

{{ with .Get "id" }}
{{ $chartId := . }}
<script src="https://assets.cantorgymnasium.de/echarts/v5/echarts.min.js"></script>
{{ with resources.Get "js/echarts-locale.js" | resources.Minify }}
<script src="{{ .Permalink }}"></script>
{{ end }}
<div id="chart-container"></div>
{{ with resources.Get (print "charts/" $chartId ".js") | js.Build | resources.Minify }}
<script src="{{ .Permalink }}"></script>
{{ end }}
{{ end }}