undefined / index.html
bubabuba3112's picture
it's not working
2d3c76e verified
Raw History Blame Contribute Delete
19 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PhantomDialer - Secure Calling Platform</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
500: '#6b46c1',
},
secondary: {
500: '#4299e1',
}
}
}
}
}
</script>
<link rel="manifest" href="manifest.json">
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js')
.then(registration => {
console.log('ServiceWorker registration successful');
})
.catch(err => {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
<style>
.vanta-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.content {
position: relative;
z-index: 1;
}
</style>
</head>
<body class="bg-gray-100 min-h-screen">
<div id="vanta-bg" class="vanta-bg"></div>
<div class="content min-h-screen flex flex-col">
<!-- Header -->
<header class="bg-primary-500 text-white shadow-lg">
<div class="container mx-auto px-4 py-6 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="phone" class="w-8 h-8"></i>
<h1 class="text-2xl font-bold">PhantomDialer</h1>
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">TRAI Verified</span>
</div>
<button class="bg-secondary-500 hover:bg-secondary-600 px-4 py-2 rounded-full flex items-center space-x-2 transition duration-300">
<i data-feather="user" class="w-4 h-4"></i>
<span>Login</span>
</button>
</div>
</header>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8">
<div class="max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden">
<div class="p-8">
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold text-gray-800">Secure Calling Platform</h2>
<div class="flex space-x-2">
<button class="p-2 rounded-full bg-gray-200 hover:bg-gray-300 transition duration-300">
<i data-feather="info" class="w-5 h-5 text-gray-700"></i>
</button>
<button class="p-2 rounded-full bg-gray-200 hover:bg-gray-300 transition duration-300">
<i data-feather="settings" class="w-5 h-5 text-gray-700"></i>
</button>
</div>
</div>
<!-- Call Form -->
<div class="space-y-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Phone Number</label>
<div class="flex rounded-md shadow-sm">
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500">
+91
</span>
<input type="tel" class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none border border-gray-300 focus:ring-primary-500 focus:border-primary-500" placeholder="(555) 555-5555">
<button class="inline-flex items-center px-4 rounded-r-md border border-l-0 border-gray-300 bg-gray-100 hover:bg-gray-200" onclick="showRecentNumbers()">
<i data-feather="list" class="w-4 h-4"></i>
</button>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Caller ID Selection</label>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="border rounded-lg p-4 hover:border-primary-500 cursor-pointer transition duration-300">
<div class="flex items-center space-x-3">
<div class="rounded-full bg-secondary-100 p-2">
<i data-feather="refresh-cw" class="w-5 h-5 text-secondary-500"></i>
</div>
<span class="font-medium">Random Rotation</span>
</div>
<p class="text-sm text-gray-500 mt-2">Automatically rotates through your available numbers</p>
</div>
<div class="border rounded-lg p-4 hover:border-primary-500 cursor-pointer transition duration-300">
<div class="flex items-center space-x-3">
<div class="rounded-full bg-green-100 p-2">
<i data-feather="hash" class="w-5 h-5 text-green-500"></i>
</div>
<span class="font-medium">Specific Number</span>
</div>
<p class="text-sm text-gray-500 mt-2">Choose from your registered numbers</p>
</div>
<div class="border rounded-lg p-4 hover:border-primary-500 cursor-pointer transition duration-300">
<div class="flex items-center space-x-3">
<div class="rounded-full bg-purple-100 p-2">
<i data-feather="eye-off" class="w-5 h-5 text-purple-500"></i>
</div>
<span class="font-medium">Private</span>
</div>
<p class="text-sm text-gray-500 mt-2">Show "Private" or "Unknown"</p>
</div>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Call Options</label>
<div class="space-y-3">
<div class="flex items-center">
<input id="voicemail-checkbox" type="checkbox" class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
<label for="voicemail-checkbox" class="ml-2 block text-sm text-gray-700">Detect voicemail and hang up</label>
</div>
<div class="flex items-center">
<input id="record-checkbox" type="checkbox" class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
<label for="record-checkbox" class="ml-2 block text-sm text-gray-700">Record call (legal notice required)</label>
</div>
<div class="flex items-center">
<input id="schedule-checkbox" type="checkbox" class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
<label for="schedule-checkbox" class="ml-2 block text-sm text-gray-700">Schedule call for later</label>
</div>
</div>
</div>
<div class="pt-4 flex justify-between">
<button class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
Clear
</button>
<button class="px-6 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-500 hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 flex items-center space-x-2" onclick="initiateCall()">
<i data-feather="phone-outgoing" class="w-4 h-4"></i>
<span>Initiate Call</span>
</button>
</div>
</div>
</div>
</div>
<!-- Legal Notice -->
<div class="mt-8 bg-white rounded-xl shadow-lg overflow-hidden">
<div class="p-6 bg-gray-50">
<div class="flex items-start">
<div class="flex-shrink-0">
<i data-feather="alert-triangle" class="h-5 w-5 text-yellow-500"></i>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-gray-800">Important Legal Notice - TRAI Compliant</h3>
<div class="mt-2 text-sm text-gray-600">
<p>As per Indian telecom regulations (TRAI), Caller ID modification is permitted for registered business entities. You must comply with all DoT guidelines and maintain proper call records.</p>
<p class="mt-2">By using this service, you agree to our <a href="#" class="text-primary-500 hover:text-primary-600">Terms of Service</a> and confirm compliance with Indian laws including IT Act 2000.</p>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-medium mb-4">PhantomDialer</h3>
<p class="text-gray-400 text-sm">TRAI/DOT compliant caller ID rotation service for verified business entities.</p>
</div>
<div>
<h3 class="text-lg font-medium mb-4">Features</h3>
<ul class="space-y-2 text-sm text-gray-400">
<li><a href="#" class="hover:text-white">Caller ID Rotation</a></li>
<li><a href="#" class="hover:text-white">Call Recording</a></li>
<li><a href="#" class="hover:text-white">Scheduled Calls</a></li>
<li><a href="#" class="hover:text-white">Analytics</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-medium mb-4">Legal</h3>
<ul class="space-y-2 text-sm text-gray-400">
<li><a href="#" class="hover:text-white">Terms of Service</a></li>
<li><a href="#" class="hover:text-white">Privacy Policy</a></li>
<li><a href="compliance.html" class="hover:text-white">TRAI Compliance</a></li>
<li><a href="#" class="hover:text-white">Indian Laws</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-medium mb-4">Connect</h3>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="twitter" class="w-5 h-5"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="facebook" class="w-5 h-5"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="linkedin" class="w-5 h-5"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="github" class="w-5 h-5"></i>
</a>
</div>
<p class="mt-4 text-sm text-gray-400">© 2023 PhantomDialer. All rights reserved.</p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
<script>
// Initialize Vanta.js
if (window.VANTA) {
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
VANTA.WAVES({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x4a148c,
shininess: 35.00,
waveHeight: 15.00,
waveSpeed: 0.25,
zoom: 0.75
});
}
}
</script>
<script>
// Add to homescreen prompt
let deferredPrompt;
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredPrompt = e;
const installButton = document.createElement('button');
installButton.textContent = 'Install App';
installButton.className = 'fixed bottom-4 left-4 bg-primary-500 text-white px-4 py-2 rounded-full shadow-lg z-50';
installButton.onclick = () => {
deferredPrompt.prompt();
deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === 'accepted') {
console.log('User accepted install prompt');
}
deferredPrompt = null;
});
};
document.body.appendChild(installButton);
// Auto hide after 10 seconds
setTimeout(() => {
installButton.style.display = 'none';
}, 10000);
});
feather.replace();
function showRecentNumbers() {
// This would fetch from API in production
const numbers = [
{number: "+91 XXXX-XXX-123", lastUsed: "2 hours ago"},
{number: "+91 XXXX-XXX-456", lastUsed: "Yesterday"},
{number: "+91 XXXX-XXX-789", lastUsed: "3 days ago"}
];
// Create dropdown
const dropdown = document.createElement('div');
dropdown.className = 'absolute z-10 mt-1 w-56 bg-white shadow-lg rounded-md py-1';
dropdown.id = 'numbersDropdown';
numbers.forEach(num => {
const item = document.createElement('a');
item.href = '#';
item.className = 'block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100';
item.innerHTML = `${num.number} <span class="text-gray-500 text-xs">${num.lastUsed}</span>`;
item.onclick = (e) => {
e.preventDefault();
document.querySelector('input[type="tel"]').value = num.number.split(' ')[1];
dropdown.remove();
};
dropdown.appendChild(item);
});
const inputGroup = document.querySelector('.flex.rounded-md.shadow-sm');
inputGroup.appendChild(dropdown);
// Close when clicking outside
document.addEventListener('click', function closeDropdown(e) {
if (!inputGroup.contains(e.target)) {
dropdown.remove();
document.removeEventListener('click', closeDropdown);
}
});
}
// Call initiation with random number rotation
function initiateCall() {
const phoneNumber = document.querySelector('input[type="tel"]').value;
if (!phoneNumber) {
alert('Please enter a phone number');
return;
}
// In production, this would call your API to initiate the call
alert(`Calling ${phoneNumber} with a random caller ID...`);
// Simulate API response
setTimeout(() => {
const status = Math.random() > 0.2 ? 'success' : 'failed';
const message = status === 'success'
? `Call connected using number: +91 XXXX-XXX-${Math.floor(100 + Math.random() * 900)}`
: 'Call failed - please try again';
const notification = document.createElement('div');
notification.className = `fixed bottom-4 right-4 p-4 rounded-lg shadow-lg ${status === 'success' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'}`;
notification.innerHTML = `
<div class="flex items-center">
<i data-feather="${status === 'success' ? 'check-circle' : 'alert-circle'}" class="w-5 h-5 mr-2"></i>
<span>${message}</span>
</div>
`;
document.body.appendChild(notification);
feather.replace();
setTimeout(() => notification.remove(), 5000);
}, 1500);
}
// Attach event to call button
document.addEventListener('DOMContentLoaded', () => {
feather.replace();
const callButton = document.querySelector('button[onclick="initiateCall()"]');
if (callButton) {
callButton.addEventListener('click', initiateCall);
}
});
</script>
</body>
</html>