mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
initial commit
This commit is contained in:
12
layouts/shortcodes/chart.html
Normal file
12
layouts/shortcodes/chart.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="chart">
|
||||
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
||||
<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>
|
||||
Reference in New Issue
Block a user