dymic's picture
Now make a extra page for admin dashboard to update blogs and pricing from the index.html (Main Page). I want to make it customizable, and advanced with top-notch secured methods.
a01a817 verified
Raw History Blame Contribute Delete
10.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard | Dymic Digital Solutions</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
jakarta: ['"Plus Jakarta Sans"', 'sans-serif'],
},
colors: {
primary: '#020617',
secondary: '#1e293b',
accent: '#3b82f6',
danger: '#ef4444'
}
}
}
}
</script>
<link rel="stylesheet" href="style.css">
</head>
<body class="bg-primary font-jakarta text-gray-200 min-h-screen">
<custom-admin-navbar></custom-admin-navbar>
<div class="container mx-auto px-6 py-20">
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
<!-- Sidebar -->
<custom-admin-sidebar></custom-admin-sidebar>
<!-- Main Content -->
<div class="lg:col-span-3">
<div class="bg-secondary/50 backdrop-blur-lg rounded-xl p-6 border border-gray-700/50 mb-8">
<h2 class="text-3xl font-bold mb-6">Admin Dashboard</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-secondary p-6 rounded-lg border border-gray-700/50">
<div class="flex items-center justify-between">
<h3 class="text-lg font-medium">Services</h3>
<span class="text-accent text-2xl font-bold" id="services-count">0</span>
</div>
</div>
<div class="bg-secondary p-6 rounded-lg border border-gray-700/50">
<div class="flex items-center justify-between">
<h3 class="text-lg font-medium">Blog Posts</h3>
<span class="text-accent text-2xl font-bold" id="blogs-count">0</span>
</div>
</div>
<div class="bg-secondary p-6 rounded-lg border border-gray-700/50">
<div class="flex items-center justify-between">
<h3 class="text-lg font-medium">Active Users</h3>
<span class="text-accent text-2xl font-bold">3</span>
</div>
</div>
</div>
<!-- Recent Activity -->
<h3 class="text-xl font-bold mb-4">Recent Activity</h3>
<div class="bg-secondary p-4 rounded-lg border border-gray-700/50 mb-8">
<div id="activity-log" class="space-y-4">
<!-- Activity logs will be loaded here -->
</div>
</div>
</div>
<!-- Services Management -->
<div class="bg-secondary/50 backdrop-blur-lg rounded-xl p-6 border border-gray-700/50 mb-8">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold">Services Management</h3>
<button id="add-service-btn" class="bg-accent hover:bg-blue-600 text-white px-4 py-2 rounded-lg font-medium flex items-center gap-2">
<i data-feather="plus"></i> Add New
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full">
<thead>
<tr class="border-b border-gray-700">
<th class="px-4 py-3 text-left">Service</th>
<th class="px-4 py-3 text-left">Description</th>
<th class="px-4 py-3 text-left">Price</th>
<th class="px-4 py-3 text-left">Actions</th>
</tr>
</thead>
<tbody id="services-table">
<!-- Services will be loaded here -->
</tbody>
</table>
</div>
</div>
<!-- Blog Management -->
<div class="bg-secondary/50 backdrop-blur-lg rounded-xl p-6 border border-gray-700/50">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold">Blog Management</h3>
<button id="add-blog-btn" class="bg-accent hover:bg-blue-600 text-white px-4 py-2 rounded-lg font-medium flex items-center gap-2">
<i data-feather="plus"></i> Add New
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full">
<thead>
<tr class="border-b border-gray-700">
<th class="px-4 py-3 text-left">Title</th>
<th class="px-4 py-3 text-left">Content Preview</th>
<th class="px-4 py-3 text-left">Date</th>
<th class="px-4 py-3 text-left">Actions</th>
</tr>
</thead>
<tbody id="blogs-table">
<!-- Blog posts will be loaded here -->
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Service Modal -->
<div id="service-modal" class="fixed inset-0 bg-black/75 z-50 flex items-center justify-center hidden">
<div class="bg-secondary rounded-xl p-8 w-full max-w-2xl mx-4 border border-gray-700/50">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold" id="service-modal-title">Add New Service</h3>
<button id="close-service-modal" class="text-gray-400 hover:text-white">
<i data-feather="x"></i>
</button>
</div>
<form id="service-form" class="space-y-4">
<input type="hidden" id="service-id">
<div>
<label class="block text-gray-400 mb-2">Service Name</label>
<input type="text" id="service-name" class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-accent" required>
</div>
<div>
<label class="block text-gray-400 mb-2">Description</label>
<textarea id="service-desc" rows="3" class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-accent" required></textarea>
</div>
<div>
<label class="block text-gray-400 mb-2">Price</label>
<input type="text" id="service-price" class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-accent" required>
</div>
<div class="flex justify-end gap-4 pt-4">
<button type="button" id="cancel-service" class="border border-gray-700 text-gray-400 hover:text-white px-6 py-2 rounded-lg font-medium">Cancel</button>
<button type="submit" class="bg-accent hover:bg-blue-600 text-white px-6 py-2 rounded-lg font-medium">Save</button>
</div>
</form>
</div>
</div>
<!-- Blog Modal -->
<div id="blog-modal" class="fixed inset-0 bg-black/75 z-50 flex items-center justify-center hidden">
<div class="bg-secondary rounded-xl p-8 w-full max-w-3xl mx-4 border border-gray-700/50">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold" id="blog-modal-title">Add New Blog Post</h3>
<button id="close-blog-modal" class="text-gray-400 hover:text-white">
<i data-feather="x"></i>
</button>
</div>
<form id="blog-form" class="space-y-4">
<input type="hidden" id="blog-id">
<div>
<label class="block text-gray-400 mb-2">Title</label>
<input type="text" id="blog-title" class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-accent" required>
</div>
<div>
<label class="block text-gray-400 mb-2">Content</label>
<textarea id="blog-content" rows="8" class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-accent" required></textarea>
</div>
<div class="flex justify-end gap-4 pt-4">
<button type="button" id="cancel-blog" class="border border-gray-700 text-gray-400 hover:text-white px-6 py-2 rounded-lg font-medium">Cancel</button>
<button type="submit" class="bg-accent hover:bg-blue-600 text-white px-6 py-2 rounded-lg font-medium">Publish</button>
</div>
</form>
</div>
</div>
<!-- Scripts -->
<script src="components/admin-navbar.js"></script>
<script src="components/admin-sidebar.js"></script>
<script src="admin-script.js"></script>
<script>
feather.replace();
</script>
</body>
</html>