Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (32 loc) · 887 Bytes

README.md

File metadata and controls

36 lines (32 loc) · 887 Bytes

khrone:img-qrcode

Provides nice template for generating QR codes as <img> directly into HTML. It uses the jquery-qrcode to encode messages.

Usage

The simplest:

{{> QrCode text="khrone:img-qr-code" }}

is generating code:

<div class="qr-code-container">
    <img class="qr-code" src="{ ... }" />
</div>

The img is 256x256 px size.

You can also add smart arguments on the text attribute like so:

{{> QrCode text=currentUserEmail }}

Where currentUserEmail is a data object returned by your helper or sent from the router:

Template.AdministrationPatientsList.helpers({
    currentUserEmail: function(){
        return '[email protected]';
    }
});

Parameters

  • text - text to be encoded
  • size - (optional) size of image (for example ````128px`````)