gcg-website/layouts/shortcodes/chart.html
Denys Konovalov aa7c6de313
All checks were successful
Website Prod/Test / Produktivumgebung (push) Successful in 12s
Website Prod/Test / Testumgebung (push) Successful in 8s
Website Pull Request / Pull-Request-Testbuild (pull_request) Successful in 24s
Refactor charts component (#295)
Reviewed-on: #295
2024-09-19 20:26:42 +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 }}