Revert "simplify page with https://github.com/adityatelange/hugo-PaperMod.git"
This reverts commit c2189ef133
.
This commit is contained in:
parent
c2189ef133
commit
fc43dba964
540 changed files with 29285 additions and 6036 deletions
12
themes/blowfish/layouts/shortcodes/chart.html
Normal file
12
themes/blowfish/layouts/shortcodes/chart.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ $id := delimit (slice "chart" (partial "functions/uid.html" .)) "-" }}
|
||||
<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