feat: Added html that serves privacy policy
This commit is contained in:
58
index.html
Normal file
58
index.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy - Cardly</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/9.1.2/marked.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.0.6/purify.min.js"></script>
|
||||
<style>
|
||||
.prose h1 { @apply text-4xl font-bold mb-6 text-gray-900; }
|
||||
.prose h2 { @apply text-2xl font-semibold mt-8 mb-4 text-gray-800; }
|
||||
.prose p { @apply mb-4 text-gray-600 leading-relaxed; }
|
||||
.prose ul { @apply list-disc pl-6 mb-4 text-gray-600; }
|
||||
.prose li { @apply mb-2; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gray-50 min-h-screen">
|
||||
<div class="max-w-4xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div class="bg-white shadow-sm rounded-lg p-8 md:p-12">
|
||||
<div id="content" class="prose max-w-none">
|
||||
<div class="flex justify-center items-center py-20">
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="mt-8 text-center text-gray-400 text-sm">
|
||||
© 2026 Cardly. All rights reserved.
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
async function loadPolicy() {
|
||||
const contentEl = document.getElementById('content');
|
||||
try {
|
||||
const response = await fetch('policy.md');
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to load policy.md');
|
||||
}
|
||||
const markdown = await response.text();
|
||||
const html = marked.parse(markdown);
|
||||
contentEl.innerHTML = DOMPurify.sanitize(html);
|
||||
} catch (error) {
|
||||
console.error('Error loading policy:', error);
|
||||
contentEl.innerHTML = `
|
||||
<div class="text-center py-10">
|
||||
<h2 class="text-red-500 text-xl font-semibold">Error Loading Policy</h2>
|
||||
<p class="text-gray-600 mt-2">Could not load the privacy policy content. Please make sure policy.md exists and is accessible.</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', loadPolicy);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user