From f6dbce3b9761ab9535571964e56e02c6493bccc2 Mon Sep 17 00:00:00 2001 From: Miraty Date: Thu, 3 Mar 2022 18:26:21 +0100 Subject: [PATCH] Merge main and body --- index.php | 294 ++++++++++++++++++++++++++--------------------------- style.less | 25 ++--- 2 files changed, 156 insertions(+), 163 deletions(-) diff --git a/index.php b/index.php index 7023602..f9dd933 100755 --- a/index.php +++ b/index.php @@ -124,180 +124,176 @@ if ( -
+
+ +
+

LibreQR

+

+
+
+
-
- -
-

LibreQR

-

-
-
-
+
- +
-
+
+
+ +
+ +
+
+ +
-
+
+ +
- -
- -
+ +

+ +

- -
- -
- -
-
- -

- -

-
- -
- -
-
- -

- -

-
- - - -
- -
-
- -

- -

-
- - - -
- -
- -
- -
- -
- -
- -
+
- -
- -
+
+ +

+ +

+
+ + + +
+ +
+
+ +

+ +

+
+ + + +
+ +
+ +
+ +
+ +
+ +
+
-
- +
+ +
+ +
+
+
+ +
+ +
+ + + + hexdec(substr($params['bgColor'],0,2)), + 'g' => hexdec(substr($params['bgColor'],2,2)), + 'b' => hexdec(substr($params['bgColor'],4,2)), + ); + + require "barcode-generator/Utils/QrCode.php"; + $qrCode = new QrCode(); + if (!is_null($params['margin'])) + $qrCode->setPadding($params['margin']); + $qrCode + ->setText($params['txt']) + ->setSize($params['size']) + ->setErrorCorrection($params['redundancy']) + ->setForegroundColor(array( + 'r' => hexdec(substr($params['mainColor'],0,2)), + 'g' => hexdec(substr($params['mainColor'],2,2)), + 'b' => hexdec(substr($params['mainColor'],4,2)), + )) + ->setBackgroundColor($rgbBgColor) + ->setImageType(QrCode::IMAGE_TYPE_PNG); + $dataUri = $qrCode->getDataUri(); + $qrSize = $qrCode->getSize() + 2 * $qrCode->getPadding(); + + ?> + +
+
+
- + +
- $rgbBgColor = array( - 'r' => hexdec(substr($params['bgColor'],0,2)), - 'g' => hexdec(substr($params['bgColor'],2,2)), - 'b' => hexdec(substr($params['bgColor'],4,2)), - ); + - require "barcode-generator/Utils/QrCode.php"; - $qrCode = new QrCode(); - if (!is_null($params['margin'])) - $qrCode->setPadding($params['margin']); - $qrCode - ->setText($params['txt']) - ->setSize($params['size']) - ->setErrorCorrection($params['redundancy']) - ->setForegroundColor(array( - 'r' => hexdec(substr($params['mainColor'],0,2)), - 'g' => hexdec(substr($params['mainColor'],2,2)), - 'b' => hexdec(substr($params['mainColor'],4,2)), - )) - ->setBackgroundColor($rgbBgColor) - ->setImageType(QrCode::IMAGE_TYPE_PNG); - $dataUri = $qrCode->getDataUri(); - $qrSize = $qrCode->getSize() + 2 * $qrCode->getPadding(); +
+ diff --git a/style.less b/style.less index e50b9a8..cc5e4a8 100755 --- a/style.less +++ b/style.less @@ -32,10 +32,18 @@ html { } body { + display: flex; + flex-direction: column; + + width: 814px; + height: 100%; + margin: 0px; + margin-left: auto; + margin-right: auto; + font-weight: normal; font-size: 20px; - height: 100%; @media @light { color: @text-light; @@ -170,15 +178,6 @@ summary { text-decoration: none; } -main { - display: flex; - flex-direction: column; - margin-left: auto; - margin-right: auto; - width: 814px; - height: 100%; -} - header { text-align: center; padding-top: 12px; @@ -230,10 +229,8 @@ h2 { } .param { - padding: 10px; - padding-left: 0px; + padding: 4px; margin-left: 0px; - padding-right: 0px; margin-right: 0px; } @@ -458,7 +455,7 @@ input[type=submit] { @media (max-width: 850px) { - main { + body { width: auto; }