diff --git a/examples/authenticator.php b/examples/authenticator.php deleted file mode 100644 index fe5fc9a8b..000000000 --- a/examples/authenticator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright 2017 Smiley - * @license MIT - */ - -require_once '../vendor/autoload.php'; - -use chillerlan\{ - GoogleAuth\Authenticator, - QRCode\QRCode, - QRCode\Output\QRMarkup -}; - -$authenticator = new Authenticator; - -$secret = $authenticator->createSecret(); // -> userdata -$data = $authenticator->getUri($secret, 'label', 'example.com'); - -// markup - svg -echo '
'.(new QRCode($data, new QRMarkup))->output().'
'; - - diff --git a/examples/custom.php b/examples/custom.php deleted file mode 100644 index 2c1c7e0fd..000000000 --- a/examples/custom.php +++ /dev/null @@ -1,37 +0,0 @@ -pixelCount; $row++){ - for($col = 0; $col < $this->pixelCount; $col++){ - $output .= (string)(int)$this->matrix[$row][$col]; - } - } - - return $output; - } - -} - -$starttime = microtime(true); - -echo (new QRCode('otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net', new MyCustomOutput))->output(); - -echo PHP_EOL.'QRCode: '.round((microtime(true)-$starttime), 5); diff --git a/examples/example.php b/examples/example.php deleted file mode 100644 index 9f57525b8..000000000 --- a/examples/example.php +++ /dev/null @@ -1,88 +0,0 @@ - - * @copyright 2015 Smiley - * @license MIT - */ - -require_once '../vendor/autoload.php'; - -use chillerlan\QRCode\Output\{ - QRMarkup, QRMarkupOptions, QRImage, QRString, QRStringOptions -}; -use chillerlan\QRCode\QRCode; - -$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; - -?> - - - - - - QRCode test - - - -output().'" />'; - -// markup - svg -echo '
'.(new QRCode($data, new QRMarkup))->output().'
'; - -// markup - html -$outputOptions = new QRMarkupOptions; -$outputOptions->type = QRCode::OUTPUT_MARKUP_HTML; - -echo '
'.(new QRCode($data, new QRMarkup($outputOptions)))->output().'
'; - -// string - json -echo '
'.(new QRCode($data, new QRString))->output().'
';
-
-// string - text
-$outputOptions = new QRStringOptions;
-$outputOptions->type = QRCode::OUTPUT_STRING_TEXT;
-$outputOptions->textDark = '🔴';
-$outputOptions->textLight = 'â­•';
-
-echo '
'.(new QRCode($data, new QRString($outputOptions)))->output().'
'; - -?> - - diff --git a/examples/example_image.png b/examples/example_image.png deleted file mode 100644 index b98aa1a00..000000000 Binary files a/examples/example_image.png and /dev/null differ diff --git a/examples/html.php b/examples/html.php deleted file mode 100644 index 3824a06fc..000000000 --- a/examples/html.php +++ /dev/null @@ -1,54 +0,0 @@ - - -.qrcode, -.qrcode > p, -.qrcode > p > b, -.qrcode > p > i { - margin:0; - padding:0; -} - -/* row element */ -.qrcode > p { - height: 1.25mm; - display: block; -} - -/* column element(s) */ -.qrcode > p > b, .qrcode > p > i{ - display: inline-block; - width: 1.25mm; - height: 1.25mm; -} - -.qrcode > p > b{ - background-color: #000; -} - -.qrcode > p > i{ - background-color: #fff; -} - -'; - -$qrStringOptions = new QRMarkupOptions; -$qrStringOptions->type = QRCode::OUTPUT_MARKUP_HTML; - -$qrOptions = new QROptions; -$qrOptions->typeNumber = QRCode::TYPE_05; -$qrOptions->errorCorrectLevel = QRCode::ERROR_CORRECT_LEVEL_L; - -$qr = new QRCode('skype://callto:echo123', new QRMarkup($qrStringOptions), $qrOptions); - -echo '
'.$qr->output().'
'; diff --git a/examples/image.php b/examples/image.php deleted file mode 100644 index 672df2012..000000000 --- a/examples/image.php +++ /dev/null @@ -1,15 +0,0 @@ -pixelSize = 10; -$qrImageOptions->cachefile = 'example_image.png'; - -(new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', new QRImage($qrImageOptions)))->output(); - -echo ''; diff --git a/public/index.html b/public/index.html index f7cf8dc96..2594a2dee 100644 --- a/public/index.html +++ b/public/index.html @@ -10,10 +10,9 @@ input:focus, textarea:focus, select:focus{ border: 1px solid #ccc; } label{ cursor: pointer; } #qrcode-settings, div#qrcode-output{ text-align: center; } - div#qrcode-output > p {margin: 0;padding: 0;height: 3px;} - div#qrcode-output > p > b, div#qrcode-output > p > i {display: inline-block;width: 3px;height: 3px;} - div#qrcode-output > p > b {background-color: lightseagreen;} - div#qrcode-output > p > i {background-color: #fff;} + div#qrcode-output > div {margin: 0;padding: 0;height: 3px;} + div#qrcode-output > div > span {display: inline-block;width: 3px;height: 3px;} + div#qrcode-output > div > span {background-color: lightgrey;} @@ -63,50 +62,50 @@
Finder
Alignment
Timing
Format
Version
Data
Dark Module
@@ -114,12 +113,12 @@
Separator