gruh
This commit is contained in:
parent
7a4c5c2d22
commit
2b82345290
663 changed files with 38142 additions and 0 deletions
12
themes/bl/layouts/shortcodes/chart.html
Normal file
12
themes/bl/layouts/shortcodes/chart.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ $id := delimit (slice "chart" .Ordinal now.UnixNano) "-" }}
|
||||
<div class="chart">
|
||||
<canvas id="{{ $id }}"></canvas>
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
const ctx = document.getElementById("{{ $id }}");
|
||||
const chart = new Chart(ctx, {
|
||||
{{ .Inner | safeJS }}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue