102 أسطر
5.6 KiB
HTML
102 أسطر
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description"
|
|
content="Generate QR codes instantly with our free and easy-to-use QR code generator. Download QR codes in SVG and PNG formats.">
|
|
<meta name="keywords" content="QR Code Generator, Free QR Code, SVG, PNG, QR Code Download">
|
|
<meta name="author" content="muathye.com">
|
|
<meta property="og:title" content="QR Code Generator - Free QR Code Generator Online">
|
|
<meta property="og:description"
|
|
content="Generate QR codes instantly with our free and easy-to-use QR code generator. Download QR codes in SVG and PNG formats.">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:url" content="https://qr-generator.muathye.com">
|
|
<meta property="og:image" content="https://qr-generator.muathye.com/icon-512x512.png">
|
|
<title>QR Code Generator - Free QR Code Generator Online</title>
|
|
<link href="tailwind.min.css" rel="stylesheet">
|
|
<link rel="manifest" href="manifest.json">
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "https://schema.org",
|
|
"@type": "WebPage",
|
|
"name": "QR Code Generator",
|
|
"description": "Generate QR codes instantly with our free and easy-to-use QR code generator. Download QR codes in SVG and PNG formats.",
|
|
"url": "https://qr-generator.muathye.com",
|
|
"author": {
|
|
"@type": "Organization",
|
|
"name": "muathye.com"
|
|
},
|
|
"potentialAction": {
|
|
"@type": "Action",
|
|
"name": "Generate QR Code"
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body class="flex items-center justify-center min-h-screen bg-gray-50 p-4">
|
|
<div class="w-full max-w-md mx-auto bg-white p-8 rounded-lg shadow-lg">
|
|
<h1 class="text-3xl font-bold text-center mb-2 text-gray-800">Free QR Code Generator</h1>
|
|
<p class="text-center text-sm text-gray-500 mt-2 mb-6">
|
|
Powered by <a href="https://muathye.com" target="_blank"
|
|
class="text-blue-500 hover:underline">muathye.com</a>
|
|
</p>
|
|
<textarea id="text-input" class="w-full p-2 mb-4 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter text to generate QR code"></textarea>
|
|
|
|
<!-- Color Pickers -->
|
|
<div class="mb-4 flex items-center space-x-4">
|
|
<div class="flex">
|
|
<label for="foreground-color" class="inilne mr-1 text-gray-700">Foreground Color:</label>
|
|
<input type="color" id="foreground-color" value="#000000" class="inline p-1 border border-gray-300 rounded">
|
|
</div>
|
|
<div class="flex">
|
|
<label for="background-color" class="inilne mr-1 text-gray-700">Background Color:</label>
|
|
<input type="color" id="background-color" value="#FFFFFF" class="inline p-1 border border-gray-300 rounded">
|
|
</div>
|
|
</div>
|
|
<button id="generate-btn"
|
|
class="text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400 font-medium rounded-lg text-sm px-5 py-2.5 text-center me-2 mb-2 w-full mb-4">Generate
|
|
QR Code</button>
|
|
<div id="qr-container" class="flex justify-center mb-4">
|
|
<canvas id="qr-code" class="mt-4"></canvas>
|
|
</div>
|
|
<div id="download-buttons" class="grid grid-cols-2 gap-4 hidden">
|
|
<button id="download-svg"
|
|
class="text-gray-900 bg-white hover:bg-gray-100 border border-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 me-2 mb-2">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="3"
|
|
stroke-linecap="round">
|
|
<path d="M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"></path>
|
|
</svg>
|
|
<span class="sr-only">Download as SVG</span>
|
|
<span class="px-1">SVG</span> Download
|
|
</button>
|
|
<button id="download-png"
|
|
class="text-gray-900 bg-white hover:bg-gray-100 border border-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 me-2 mb-2">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="3"
|
|
stroke-linecap="round">
|
|
<path d="M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"></path>
|
|
</svg>
|
|
<span class="sr-only">Download as PNG</span>
|
|
<span class="px-1">PNG</span> Download
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<script src="qrcode.min.js"></script>
|
|
<script src="script.js"></script>
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/sw.js')
|
|
.then(registration => {
|
|
console.log('Service Worker registered with scope:', registration.scope);
|
|
})
|
|
.catch(error => {
|
|
console.log('Service Worker registration failed:', error);
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |