Add qrcode generator

This commit is contained in:
Sven Seeberg 2021-12-31 14:48:46 +01:00
commit 2c01c731ed
Signed by: sven.seeberg
GPG Key ID: 29559DD5A83806B5
3 changed files with 59 additions and 0 deletions

7
bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

29
index.html Normal file
View File

@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Netzbegrünung QRCode Generator</title>
<link href="bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="qrcode.js"></script>
<link href="qrcode.css" rel="stylesheet">
</head>
<body class="text-center">
<main class="form-qrcode">
<form>
<div class="form-floating">
<img class="mb-4" src="https://blog.netzbegruenung.de/files/2013/10/netzbegruenung-logo-website.png" alt="" height="57">
<h1 class="h3 mb-3 fw-normal">QR Code Generator</h1>
</div>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInput" placeholder="http://blog.netzbegruenung.de">
<label for="floatingInput">Adresse / Text</label>
</div>
<button type='button' class="w-100 btn btn-lg btn-primary" onclick='document.getElementById("qrcode").innerHTML=""; new QRCode(document.getElementById("qrcode"), document.getElementById("floatingInput").value);'>Generieren</button>
</form>
<div class="text-center m-4" id="qrcode" style=""></div>
</main>
</body>
</html>

23
qrcode.css Normal file
View File

@ -0,0 +1,23 @@
html,
body {
height: 100%;
}
body {
display: flex;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-qrcode {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}
.form-qrcode .form-floating:focus-within {
z-index: 2;
}