Skip to content

Commit 541df89

Browse files
authored
Qr code update (#85)
* implode swap parameters * updated qr-code and changed to .png * added svg version of qrcode * added script to clear the cache * changed gitignore and the icons * Added flex wrap and gap * Changed Icons * Added icon size variable * updated UNMC logo * Changed gap to margin * fixed vulnerabilities * switched hashing algorithm * added qr route back but routes it to png * Reformatted Code * Removed Trailing White Space
1 parent ef819d7 commit 541df89

File tree

20 files changed

+385
-114
lines changed

20 files changed

+385
-114
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"require": {
88
"unl/php-wdn-templates": "^5.3",
99
"saltybeagle/savvy": "0.8.1",
10-
"endroid/qrcode": "^1.5",
1110
"jasig/phpcas": "1.3.x-dev",
1211
"ramsey/uuid": "^3.5",
13-
"theiconic/php-ga-measurement-protocol": "^2.3"
12+
"theiconic/php-ga-measurement-protocol": "^2.3",
13+
"endroid/qr-code": "^4.5"
1414
},
1515
"require-dev": {
1616
"phpstan/phpstan": "^0.12.46"

composer.lock

Lines changed: 136 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.sample.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@
3434
define('CAS_CA_FILE', '/etc/pki/tls/cert.pem');
3535
$auth = new \UNL\Templates\Auth\AuthCAS('2.0', 'shib.unl.edu', 443, '/idp/profile/cas', CAS_CA_FILE);
3636

37-
// Set QR icon for center of QR code (expects 235x235 png), defaults to blank icon
38-
$qrIconPng = __DIR__ . '/data/qr/icons/unl_qr_235.png';
37+
// Set QR icon for center of QR code,
38+
// Square icons are placed in center of QR code at specified size
39+
// QR codes are 1080 x 1080 with 36 margin
40+
// If an icon is not provided we will default to a empty QR code
41+
$qrIconPng = __DIR__ . '/data/qr/icons/UNL.png';
42+
$qrIconSvg = __DIR__ . '/data/qr/icons/UNL.svg';
43+
$qrIconSize = 500;
3944

4045
// allow urls that begin with these strings
4146
$allowed_protocols = array('http://', 'https://');

data/qr/cache/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/*.png
1+
/*.png
2+
/*.svg

data/qr/icons/.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*.png
2-
!default_qr_235.png
3-
!unl_qr_235.png
4-
!unmc_qr_235.png
5-
!unk_qr_235.png
2+
/*.svg
3+
!UNL.png
4+
!UNL.svg
5+
!UNMC.png
6+
!UNMC.svg
7+
!UNK.png
8+
!UNK.svg

data/qr/icons/UNK.png

48.1 KB
Loading

data/qr/icons/UNK.svg

Lines changed: 1 addition & 0 deletions
Loading

data/qr/icons/UNL.png

38.5 KB
Loading

data/qr/icons/UNL.svg

Lines changed: 1 addition & 0 deletions
Loading

data/qr/icons/unk_qr_235.png

-2.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)