mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 18:07:57 +00:00
Add barcode reader widget to qrcode plugin (#7746)
* Add barcode reader widget to qrcode plugin * Don't use a fixed ID
This commit is contained in:
27
plugins/tiddlywiki/qrcode/examples/make/MakeContactQR.tid
Normal file
27
plugins/tiddlywiki/qrcode/examples/make/MakeContactQR.tid
Normal file
@@ -0,0 +1,27 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeContactQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Contact
|
||||
|
||||
\define wifi-url()
|
||||
WIFI:wifi name;T:WPA;S:SSID;P:password;
|
||||
\end
|
||||
|
||||
\define image(firstname,lastname,address,tel,email)
|
||||
<img src=<<makeqr text:"""MECARD:N:$lastname$,$firstname$;ADR:$address$;TEL:$tel$;EMAIL:$email$;;""" size:"350">>/>
|
||||
\end
|
||||
|
||||
! Enter the contact details
|
||||
|
||||
First name: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/contact/firstname" tag="input" default=""/>
|
||||
|
||||
Last name: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/contact/lastname" tag="input" default=""/>
|
||||
|
||||
Address: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/contact/address" tag="input" default=""/>
|
||||
|
||||
Telephone: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/contact/tel" tag="input" default=""/>
|
||||
|
||||
Email: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/contact/email" tag="input" default=""/>
|
||||
|
||||
! Here is your QR code
|
||||
|
||||
<$macrocall $name="image" firstname={{$:/config/plugins/tiddlywiki/qrcode/contact/firstname}} lastname={{$:/config/plugins/tiddlywiki/qrcode/contact/lastname}} address={{$:/config/plugins/tiddlywiki/qrcode/contact/address}} tel={{$:/config/plugins/tiddlywiki/qrcode/contact/tel}} email={{$:/config/plugins/tiddlywiki/qrcode/contact/email}}/>
|
||||
17
plugins/tiddlywiki/qrcode/examples/make/MakeGenericQR.tid
Normal file
17
plugins/tiddlywiki/qrcode/examples/make/MakeGenericQR.tid
Normal file
@@ -0,0 +1,17 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeGenericQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Generic
|
||||
|
||||
\define image(content)
|
||||
<img src=<<makeqr text:"""$content$""" size:"350">>/>
|
||||
\end
|
||||
|
||||
! Enter the details
|
||||
|
||||
You can also use this form to encode URLs.
|
||||
|
||||
<$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/generic" default="" class="tc-edit-texteditor"/>
|
||||
|
||||
! Here is your QR code
|
||||
|
||||
<$macrocall $name="image" content={{$:/config/plugins/tiddlywiki/qrcode/generic}}/>
|
||||
28
plugins/tiddlywiki/qrcode/examples/make/MakeWifiQR.tid
Normal file
28
plugins/tiddlywiki/qrcode/examples/make/MakeWifiQR.tid
Normal file
@@ -0,0 +1,28 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeWifiQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Wifi
|
||||
|
||||
\define wifi-url()
|
||||
WIFI:T:WPA;S:SSID;P:password;;
|
||||
\end
|
||||
|
||||
\define image(network,encryption,ssid,password)
|
||||
<img src=<<makeqr text:"""WIFI:T:$encryption$;S:$ssid$;P:$password$;;""" size:"350">>/>
|
||||
\end
|
||||
|
||||
! Enter the details of your wifi network
|
||||
|
||||
Encryption: <$select tiddler="$:/config/plugins/tiddlywiki/qrcode/wifi/encryption" default="none">
|
||||
<option value="none">None</option>
|
||||
<option value="WEP">WEP</option>
|
||||
<option value="WPA">WPA</option>
|
||||
<option value="WPA2">WPA2</option>
|
||||
</$select>
|
||||
|
||||
SSID: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/wifi/ssid" tag="input" default=""/>
|
||||
|
||||
Password: <$edit-text tiddler="$:/config/plugins/tiddlywiki/qrcode/wifi/password" tag="input" default=""/>
|
||||
|
||||
! Here is your QR code
|
||||
|
||||
<$macrocall $name="image" network={{$:/config/plugins/tiddlywiki/qrcode/wifi/network}} encryption={{$:/config/plugins/tiddlywiki/qrcode/wifi/encryption}} ssid={{$:/config/plugins/tiddlywiki/qrcode/wifi/ssid}} password={{$:/config/plugins/tiddlywiki/qrcode/wifi/password}}/>
|
||||
5
plugins/tiddlywiki/qrcode/examples/make/make.tid
Normal file
5
plugins/tiddlywiki/qrcode/examples/make/make.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples/make
|
||||
tags: $:/tags/QRCodeExample
|
||||
caption: Making Barcodes
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/MakeQR]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/make/MakeGenericQR">>
|
||||
Reference in New Issue
Block a user