devpulse-radar / dashboard.html
WinLanEm's picture
можешь на свой вкус сделать либо страницу, либо поле на одной из страниц, где будет какой-то текст и кнопка (сама кнопка отвечает за скачивание активностей в pdf есть фильтры по дате start_date end_date и type developer_activity или achievement
874a8e2 verified
Raw History Blame Contribute Delete
16.8 kB
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard | DevPulse Radar</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
<div class="flex h-screen">
<!-- Sidebar -->
<nav class="w-64 bg-gray-800 border-r border-gray-700 hidden md:block">
<div class="p-4 border-b border-gray-700">
<div class="flex items-center space-x-2">
<i data-feather="activity" class="text-primary w-6 h-6"></i>
<span class="text-xl font-bold">DevPulse Radar</span>
</div>
</div>
<div class="p-4">
<ul class="space-y-2">
<li>
<a href="dashboard.html" class="flex items-center space-x-3 px-3 py-2 bg-gray-700 rounded-lg text-primary">
<i data-feather="home" class="w-5 h-5"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a href="approval.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
<i data-feather="check-circle" class="w-5 h-5"></i>
<span>Task Approval</span>
</a>
</li>
<li>
<a href="manual.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
<i data-feather="plus-circle" class="w-5 h-5"></i>
<span>Manual Add</span>
</a>
</li>
<li>
<a href="allactivities.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
<i data-feather="list" class="w-5 h-5"></i>
<span>All Activities</span>
</a>
</li>
<li>
<a href="export.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
<i data-feather="download" class="w-5 h-5"></i>
<span>Export</span>
</a>
</li>
<li>
<a href="settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
<i data-feather="settings" class="w-5 h-5"></i>
<span>Settings</span>
</a>
</li>
</ul>
</div>
</nav>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Top Navigation -->
<header class="sticky top-0 z-10 bg-gray-800 border-b border-gray-700 p-4">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-4">
<button class="md:hidden">
<i data-feather="menu" class="w-5 h-5"></i>
</button>
<div class="relative w-full max-w-md">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 w-5 h-5"></i>
<input type="text" placeholder="Search activities..." class="w-full bg-gray-700 border-none pl-10 pr-4 py-2 rounded-lg focus:ring-2 focus:ring-primary">
</div>
</div>
<div class="flex items-center space-x-4">
<button class="relative">
<i data-feather="bell" class="w-5 h-5"></i>
<span class="absolute top-0 right-0 w-2 h-2 bg-primary rounded-full"></span>
</button>
<div class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center">
<span class="text-sm font-medium">JD</span>
</div>
<span class="hidden md:inline">John Developer</span>
<i data-feather="chevron-down" class="w-4 h-4 hidden md:inline"></i>
</div>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-6">
<div class="mb-8">
<h2 class="text-2xl font-bold mb-2">Welcome back, John</h2>
<p class="text-gray-400">Here's what's been happening in your developer world</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Main Activity Feed -->
<div class="lg:col-span-2 space-y-6">
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold">Recent Activity</h3>
<a href="allactivities.html" class="text-sm text-primary hover:underline">View All</a>
</div>
<div class="space-y-4">
<!-- Activity Item -->
<div class="flex space-x-4">
<div class="flex-shrink-0">
<div class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
<i data-feather="github" class="w-5 h-5"></i>
</div>
</div>
<div>
<p class="font-medium">Pushed 3 commits to <span class="text-primary">project-x</span></p>
<p class="text-sm text-gray-400">2 hours ago</p>
</div>
</div>
<!-- Activity Item -->
<div class="flex space-x-4">
<div class="flex-shrink-0">
<div class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
<i data-feather="git-pull-request" class="w-5 h-5"></i>
</div>
</div>
<div>
<p class="font-medium">Opened PR #42 in <span class="text-primary">api-gateway</span></p>
<p class="text-sm text-gray-400">5 hours ago</p>
</div>
</div>
<!-- Activity Item -->
<div class="flex space-x-4">
<div class="flex-shrink-0">
<div class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
<i data-feather="check-circle" class="w-5 h-5"></i>
</div>
</div>
<div>
<p class="font-medium">Completed task <span class="text-primary">PROJ-123</span> in Jira</p>
<p class="text-sm text-gray-400">Yesterday</p>
</div>
</div>
<!-- Activity Item -->
<div class="flex space-x-4">
<div class="flex-shrink-0">
<div class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
<i data-feather="code" class="w-5 h-5"></i>
</div>
</div>
<div>
<p class="font-medium">Reviewed PR #38 in <span class="text-primary">frontend</span></p>
<p class="text-sm text-gray-400">Yesterday</p>
</div>
</div>
<!-- Activity Item -->
<div class="flex space-x-4">
<div class="flex-shrink-0">
<div class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
<i data-feather="plus" class="w-5 h-5"></i>
</div>
</div>
<div>
<p class="font-medium">Added manual task <span class="text-primary">Document API</span></p>
<p class="text-sm text-gray-400">2 days ago</p>
</div>
</div>
</div>
</div>
<!-- Productivity Chart -->
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<h3 class="text-xl font-bold mb-6">Productivity This Week</h3>
<div class="h-64">
<canvas id="productivityChart"></canvas>
</div>
</div>
</div>
<!-- Sidebar Widgets -->
<div class="space-y-6">
<!-- Activity Breakdown -->
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<h3 class="text-xl font-bold mb-6">Activity Breakdown</h3>
<div class="h-48">
<canvas id="activityChart"></canvas>
</div>
</div>
<!-- Heatmap -->
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold">Commit Heatmap</h3>
<button class="text-sm text-primary hover:underline">View All</button>
</div>
<div class="flex flex-wrap gap-1">
<!-- This would be dynamically generated with different shades based on activity -->
<div class="w-3 h-3 rounded-sm bg-green-900"></div>
<div class="w-3 h-3 rounded-sm bg-green-800"></div>
<div class="w-3 h-3 rounded-sm bg-green-700"></div>
<div class="w-3 h-3 rounded-sm bg-green-600"></div>
<div class="w-3 h-3 rounded-sm bg-green-500"></div>
<div class="w-3 h-3 rounded-sm bg-green-900"></div>
<div class="w-3 h-3 rounded-sm bg-green-500"></div>
<div class="w-3 h-3 rounded-sm bg-green-300"></div>
<div class="w-3 h-3 rounded-sm bg-green-700"></div>
<div class="w-3 h-3 rounded-sm bg-green-800"></div>
<div class="w-3 h-3 rounded-sm bg-green-900"></div>
<div class="w-3 h-3 rounded-sm bg-green-600"></div>
<!-- More squares would continue here -->
</div>
<div class="mt-4 flex justify-between text-xs text-gray-400">
<span>Less</span>
<span>More</span>
</div>
</div>
<!-- Quick Stats -->
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<h3 class="text-xl font-bold mb-6">Quick Stats</h3>
<div class="space-y-4">
<div>
<p class="text-gray-400">This Week</p>
<p class="text-2xl font-bold">24</p>
<p class="text-sm text-gray-400">activities</p>
</div>
<div>
<p class="text-gray-400">This Month</p>
<p class="text-2xl font-bold">112</p>
<p class="text-sm text-gray-400">activities</p>
</div>
<div>
<p class="text-gray-400">Streak</p>
<p class="text-2xl font-bold">14</p>
<p class="text-sm text-gray-400">days</p>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
feather.replace();
// Activity Breakdown Chart
const activityCtx = document.getElementById('activityChart').getContext('2d');
const activityChart = new Chart(activityCtx, {
type: 'doughnut',
data: {
labels: ['Commits', 'Pull Requests', 'Jira Tasks', 'Manual Tasks'],
datasets: [{
data: [45, 25, 20, 10],
backgroundColor: [
'#6366f1',
'#8b5cf6',
'#ec4899',
'#14b8a6'
],
borderWidth: 0
}]
},
options: {
cutout: '70%',
plugins: {
legend: {
position: 'bottom',
labels: {
color: '#f3f4f6',
boxWidth: 10,
padding: 20
}
}
}
}
});
// Productivity Chart
const productivityCtx = document.getElementById('productivityChart').getContext('2d');
const productivityChart = new Chart(productivityCtx, {
type: 'bar',
data: {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
datasets: [{
label: 'Tasks Completed',
data: [8, 12, 6, 9, 11, 4, 2],
backgroundColor: '#6366f1'
}]
},
options: {
scales: {
y: {
beginAtZero: true,
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#9ca3af'
}
},
x: {
grid: {
display: false
},
ticks: {
color: '#9ca3af'
}
}
},
plugins: {
legend: {
display: false
}
}
}
});
</script>
</body>
</html>