Welcome to mirror list, hosted at ThFree Co, Russian Federation.

qrcode-generator.html « third-party « partials « layouts - github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 381c9fd6695bbf508a0faa65c1c4f6f2727d57d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{- $src := partial "utils/lib.html" (dict "$" . "type" "qrcode") -}}

<script src="{{ $src }}"></script>

<script>
    const typeNumber = 0;
    const errorCorrectionLevel = 'L';
    const qr = qrcode(typeNumber, errorCorrectionLevel);
    qr.addData('{{ .Permalink }}');
    qr.make();
    document.getElementById('qrcode-img').innerHTML = qr.createImgTag();
</script>