File size: 13,886 Bytes
260e550 32faf00 260e550 32faf00 260e550 32faf00 260e550 | 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Portal - Annaxaria's World</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:wght@300;400;500&display=swap');
body {
font-family: 'Cormorant Garamond', serif;
background-color: #1a1a1a;
color: #e0d6c7;
}
.title-font {
font-family: 'Cinzel Decorative', cursive;
}
.admin-card {
background: linear-gradient(145deg, #282828 0%, #1e1e1e 100%);
border: 1px solid #3a3a3a;
transition: all 0.3s ease;
}
.admin-card:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body class="min-h-screen">
<!-- Admin Navigation -->
<nav class="bg-black bg-opacity-90 border-b border-red-900 backdrop-filter backdrop-blur-lg sticky top-0 z-50">
<div class="container mx-auto px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<i data-feather="lock" class="text-red-800 mr-2"></i>
<a href="#" class="title-font text-2xl font-bold text-red-800">Admin Portal</a>
</div>
<div class="flex items-center space-x-4">
<a href="index.html" class="text-red-200 hover:text-white flex items-center transition">
<i data-feather="home" class="mr-1"></i> Site Home
</a>
<button class="bg-red-800 hover:bg-red-900 text-white px-4 py-2 rounded-sm transition flex items-center">
<i data-feather="log-out" class="mr-1"></i> Logout
</button>
</div>
</div>
</div>
</nav>
<!-- Admin Dashboard -->
<div class="container mx-auto px-6 py-12">
<h1 class="title-font text-4xl text-red-800 mb-8 border-b border-gray-800 pb-4">Admin Operations</h1>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
<!-- Add New Book -->
<div class="admin-card rounded-sm p-6">
<div class="flex items-center mb-4">
<div class="bg-red-900 bg-opacity-30 p-3 rounded-full mr-4">
<i data-feather="plus-circle" class="text-red-800 w-6 h-6"></i>
</div>
<h2 class="title-font text-xl text-white">Add New Book</h2>
</div>
<p class="text-red-200 mb-6">Upload a new dark romance title to the collection</p>
<button onclick="toggleForm('book-form')" class="w-full bg-red-800 hover:bg-red-900 text-white py-2 rounded-sm transition">Add Book</button>
</div>
<!-- Manage Books -->
<div class="admin-card rounded-sm p-6">
<div class="flex items-center mb-4">
<div class="bg-red-900 bg-opacity-30 p-3 rounded-full mr-4">
<i data-feather="book" class="text-red-800 w-6 h-6"></i>
</div>
<h2 class="title-font text-xl text-white">Manage Books</h2>
</div>
<p class="text-red-200 mb-6">Edit or remove existing titles from the collection</p>
<a href="#" class="block w-full bg-gray-800 hover:bg-gray-700 text-white py-2 rounded-sm transition text-center">View Books</a>
</div>
<!-- View Orders -->
<div class="admin-card rounded-sm p-6">
<div class="flex items-center mb-4">
<div class="bg-red-900 bg-opacity-30 p-3 rounded-full mr-4">
<i data-feather="shopping-bag" class="text-red-800 w-6 h-6"></i>
</div>
<h2 class="title-font text-xl text-white">View Orders</h2>
</div>
<p class="text-red-200 mb-6">See all customer purchases and order details</p>
<a href="#" class="block w-full bg-gray-800 hover:bg-gray-700 text-white py-2 rounded-sm transition text-center">View Orders</a>
</div>
</div>
<!-- Add Book Form (Hidden by default) -->
<div id="book-form" class="hidden admin-card rounded-sm p-8 mb-12">
<h2 class="title-font text-2xl text-red-800 mb-6">Add New Book</h2>
<form id="upload-book" class="space-y-6">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label for="title" class="block text-red-200 mb-2">Book Title</label>
<input type="text" id="title" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm" required>
</div>
<div>
<label for="author" class="block text-red-200 mb-2">Author</label>
<input type="text" id="author" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm" required>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div>
<label for="price" class="block text-red-200 mb-2">Price ($)</label>
<input type="number" step="0.01" id="price" placeholder="USD" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm mb-2" required>
<input type="number" step="1" id="price-inr" placeholder="INR" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm mb-2">
<input type="number" step="0.01" id="price-gbp" placeholder="GBP" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm">
</div>
<div>
<label for="rating" class="block text-red-200 mb-2">Rating (1-5)</label>
<select id="rating" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm" required>
<option value="5">β
β
β
β
β
</option>
<option value="4">β
β
β
β
β</option>
<option value="3">β
β
β
ββ</option>
<option value="2">β
β
βββ</option>
<option value="1">β
ββββ</option>
</select>
</div>
<div>
<label for="reviews" class="block text-red-200 mb-2">Review Count</label>
<input type="number" id="reviews" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm" required>
</div>
</div>
<div>
<label for="description" class="block text-red-200 mb-2">Description</label>
<textarea id="description" rows="3" class="w-full px-4 py-2 bg-gray-900 border border-gray-800 text-white focus:outline-none focus:border-red-800 rounded-sm" required></textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label for="cover" class="block text-red-200 mb-2">Book Cover Image</label>
<input type="file" id="cover" accept="image/*" class="w-full text-red-200">
<p class="text-gray-500 text-xs mt-1">Recommended size: 320x240 pixels</p>
</div>
<div>
<label class="block text-red-200 mb-2">Tags</label>
<div class="flex flex-wrap gap-2">
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox text-red-800" name="tags" value="bestseller">
<span class="ml-2 text-red-200">Bestseller</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox text-red-800" name="tags" value="new">
<span class="ml-2 text-red-200">New Release</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox text-red-800" name="tags" value="exclusive">
<span class="ml-2 text-red-200">Exclusive</span>
</label>
</div>
</div>
</div>
<div class="flex justify-end space-x-4 pt-4">
<button type="button" onclick="toggleForm('book-form')" class="border border-red-800 text-red-200 px-6 py-2 rounded-sm hover:bg-red-800 hover:bg-opacity-10 transition">Cancel</button>
<button type="submit" class="bg-red-800 hover:bg-red-900 text-white px-6 py-2 rounded-sm transition">Upload Book</button>
</div>
</form>
</div>
<!-- Recently Added -->
<div class="admin-card rounded-sm p-8">
<h2 class="title-font text-2xl text-red-800 mb-6 border-b border-gray-800 pb-4">Recently Added</h2>
<div class="overflow-x-auto">
<table class="w-full">
<thead>
<tr class="text-left border-b border-gray-800 text-red-200">
<th class="pb-3">Cover</th>
<th class="pb-3">Title</th>
<th class="pb-3">Author</th>
<th class="pb-3">Price</th>
<th class="pb-3">Added</th>
<th class="pb-3">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-800">
<tr>
<td class="py-4"><img src="http://static.photos/vintage/120x90/8" alt="Book Cover" class="w-12 h-16 object-cover"></td>
<td class="py-4 text-white">Midnight Temptations</td>
<td class="py-4 text-red-200">Evelyn Blackwood</td>
<td class="py-4 text-red-800">$10.99 / βΉ799 / Β£8.99</td>
<td class="py-4 text-gray-500">2 days ago</td>
<td class="py-4">
<div class="flex space-x-2">
<button class="p-1 text-blue-400 hover:text-blue-300 transition">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="p-1 text-red-400 hover:text-red-300 transition">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
<tr>
<td class="py-4"><img src="http://static.photos/vintage/120x90/9" alt="Book Cover" class="w-12 h-16 object-cover"></td>
<td class="py-4 text-white">The Countess' Secret</td>
<td class="py-4 text-red-200">Damien Graves</td>
<td class="py-4 text-red-800">$13.99 / βΉ999 / Β£10.99</td>
<td class="py-4 text-gray-500">1 week ago</td>
<td class="py-4">
<div class="flex space-x-2">
<button class="p-1 text-blue-400 hover:text-blue-300 transition">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="p-1 text-red-400 hover:text-red-300 transition">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script>
feather.replace();
function toggleForm(formId) {
const form = document.getElementById(formId);
form.classList.toggle('hidden');
}
document.getElementById('upload-book').addEventListener('submit', function(e) {
e.preventDefault();
// Here you would handle the form submission to your backend
alert('Book added successfully! (This would connect to your backend in production)');
this.reset();
toggleForm('book-form');
});
</script>
</body>
</html> |