-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
51 lines (45 loc) · 2.18 KB
/
index.html
File metadata and controls
51 lines (45 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text to QR Code Converter</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Text to QR Code Converter</h1>
<div class="error-message" id="errorMessage"></div>
<div class="input-section">
<textarea id="userText" placeholder="Type or paste your text here..."></textarea>
<div class="buttons">
<button id="generateBtn">Generate QR Code</button>
<button id="clearBtn">Clear Text</button>
</div>
</div>
<div class="qr-container" id="qrContainer" style="display: none;">
<h3>Scan this QR code to download your text</h3>
<div id="qrcode"></div>
<div class="download-buttons" id="downloadButtons">
<button class="word-btn" id="downloadWord">Download as Word</button>
<button class="pdf-btn" id="downloadPdf">Download as PDF</button>
</div>
</div>
<div class="instructions">
<h3>How to use:</h3>
<ol>
<li>Enter your text in the box above</li>
<li>Click "Generate QR Code"</li>
<li>Scan the QR code with your phone</li>
<li>On your phone, choose to download as Word or PDF</li>
<li>Alternatively, use the download buttons below the QR code</li>
</ol>
<p><strong>Note:</strong> For best results, please host this page on a web server. Scanning QR codes may not work properly when opening the HTML file directly from your computer.</p>
</div>
</div>
<script src="script.js"></script>
</body>
</html>