From 96f1878ac0e416f463a9b60e8a6da2846bf4e77a Mon Sep 17 00:00:00 2001 From: Maksim Pischulenok Date: Tue, 10 Jun 2025 10:23:49 +0300 Subject: [PATCH] Add QR code positioning support via qrOffset URL parameter Add support for positioning the QR code element by introducing a new qrOffset URL parameter. The parameter controls the bottom and right positioning of the QR code with a default value of 20px if not specified. This allows for better control over the QR code placement in the layout. --- src/main/resources/static/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 96d67b6..f50a6e7 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -71,10 +71,13 @@ // Parse query parameters for QR code size const urlParams = new URLSearchParams(window.location.search); const qrSize = parseInt(urlParams.get('qrSize')) || 100; // Default to 100px if not specified + const qrOffset = parseInt(urlParams.get('qrOffset')) || 20; // Default to 20px if not specified const qrCodeElement = document.getElementById('qr-code'); qrCodeElement.style.width = `${qrSize}px`; qrCodeElement.style.height = `${qrSize}px`; + qrCodeElement.style.bottom = `${qrOffset}px`; + qrCodeElement.style.right = `${qrOffset}px`; } // Configure QR code on page load