:octocat: examples cleanup

This commit is contained in:
smiley
2022-07-09 18:10:23 +02:00
parent 9d309e2ff8
commit e971678ac5
17 changed files with 382 additions and 420 deletions
+29 -33
View File
@@ -6,8 +6,6 @@
* @license MIT
*/
namespace chillerlan\QRCodeExamples;
use chillerlan\QRCode\{QRCode, QROptions};
use chillerlan\QRCode\Data\QRMatrix;
use chillerlan\QRCode\Common\EccLevel;
@@ -16,36 +14,6 @@ require_once '../vendor/autoload.php';
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>QRCode test</title>
<style>
div.qrcode{
margin: 5em;
}
/* rows */
div.qrcode > div {
height: 10px;
}
/* modules */
div.qrcode > div > span {
display: inline-block;
width: 10px;
height: 10px;
}
</style>
</head>
<body>
<?php
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
$options = new QROptions([
'version' => 5,
'outputType' => QRCode::OUTPUT_MARKUP_HTML,
@@ -80,7 +48,35 @@ header('Content-Type: text/html; charset=utf-8');
],
]);
echo (new QRCode($options))->render($data);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>QRCode test</title>
<style>
div.qrcode{
margin: 5em;
}
/* rows */
div.qrcode > div {
height: 10px;
}
/* modules */
div.qrcode > div > span {
display: inline-block;
width: 10px;
height: 10px;
}
</style>
</head>
<body>
<?php
echo (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
?>
</body>