File size: 4,225 Bytes
17472d9
 
 
 
d43a946
114a9ec
17472d9
 
d43a946
 
 
 
 
 
 
 
 
 
 
17472d9
329d714
17472d9
329d714
 
 
 
 
 
 
 
17472d9
329d714
 
 
17472d9
329d714
17472d9
 
 
329d714
 
 
 
 
 
 
 
 
17472d9
329d714
17472d9
 
329d714
17472d9
 
329d714
 
 
 
 
 
 
17472d9
 
329d714
17472d9
 
 
 
 
 
 
d43a946
 
 
 
60591eb
17472d9
 
 
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Admin - RoktoSopkhyo</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');
        body {
            font-family: 'Hind Siliguri', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        .min-h-screen {
            min-height: 100vh;
            min-height: -webkit-fill-available;
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen p-4 font-sans">

    <div id="loginSection" class="max-w-md mx-auto mt-20 bg-gray-800 p-10 rounded-[2.5rem] shadow-2xl border border-gray-700">
        <div class="text-center mb-8">
            <div class="inline-block p-4 bg-red-600/10 rounded-full mb-4">
                <i class="fas fa-user-shield text-red-500 text-4xl"></i>
            </div>
            <h2 class="text-3xl font-black text-white">Admin Login</h2>
            <p class="text-gray-500 text-sm mt-2">ম্যানেজ প্যানেলে প্রবেশ করুন</p>
        </div>
        <div class="space-y-4">
            <input type="email" id="email" placeholder="Email Address" class="w-full p-4 bg-gray-900 border border-gray-700 rounded-2xl focus:ring-2 focus:ring-red-500 outline-none transition">
            <input type="password" id="pass" placeholder="Password" class="w-full p-4 bg-gray-900 border border-gray-700 rounded-2xl focus:ring-2 focus:ring-red-500 outline-none transition">
            <button id="loginBtn" class="w-full bg-red-600 text-white p-4 rounded-2xl font-black text-lg hover:bg-red-700 transition shadow-lg shadow-red-600/20">Login Now</button>
        </div>
        <a href="index.html" class="block text-center mt-6 text-gray-500 hover:text-gray-300 text-sm transition">← Back to Site</a>
    </div>

    <div id="adminDashboard" class="hidden max-w-6xl mx-auto">
        <div class="flex justify-between items-center mb-8 bg-gray-800 p-8 rounded-[2rem] border border-gray-700 shadow-xl">
            <div class="flex items-center space-x-4">
                <div class="p-3 bg-red-600 rounded-xl">
                    <i class="fas fa-database text-white text-xl"></i>
                </div>
                <div>
                    <h1 class="text-2xl font-black text-white">Donor Management</h1>
                    <p id="stats" class="text-red-500 text-xs font-bold uppercase tracking-widest mt-1"></p>
                </div>
            </div>
            <button onclick="logout()" class="bg-gray-700 text-gray-300 px-6 py-3 rounded-xl font-bold hover:bg-red-600 hover:text-white transition">Logout</button>
        </div>

        <div class="bg-gray-800 rounded-[2rem] border border-gray-700 shadow-2xl overflow-hidden">
            <div class="overflow-x-auto">
                <table class="w-full text-left">
                    <thead>
                        <tr class="bg-gray-900/50 text-gray-500 text-xs uppercase font-black tracking-tighter">
                            <th class="p-8">Donor Name</th>
                            <th class="p-8 text-center">Group</th>
                            <th class="p-8">Location</th>
                            <th class="p-8">Phone</th>
                            <th class="p-8 text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody id="adminList" class="divide-y divide-gray-700/50">
                        <!-- Rows -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <!-- Firebase SDK -->
    <script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-app-compat.js"></script>
    <script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-firestore-compat.js"></script>

    <script src="js/data-store.js"></script>
    <script src="js/admin.js"></script>
</body>
</html>