Files
ai-gift-planner-mockup/budget.html
Norbert Maciaszek 0357cf2eb7 add first mockup
2025-12-26 23:13:35 +01:00

252 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Analiza Budżetu - Gift Planner</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="styles.css">
<script src="https://unpkg.com/lucide@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<aside class="w-64 bg-white border-r border-gray-200 hidden lg:flex flex-col">
<div class="p-6 flex items-center gap-3">
<div class="w-10 h-10 gradient-bg rounded-xl flex items-center justify-center text-white">
<i data-lucide="gift"></i>
</div>
<h1 class="text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-indigo-600 to-purple-600">Gift Planner</h1>
</div>
<nav class="flex-1 px-4 py-4 space-y-2">
<a href="dashboard.html" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<i data-lucide="layout-dashboard"></i> Dashboard
</a>
<a href="occasions.html" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<i data-lucide="calendar"></i> Okazje
</a>
<a href="persons.html" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<i data-lucide="users"></i> Osoby
</a>
<a href="budget.html" class="flex items-center gap-3 px-4 py-3 bg-indigo-50 text-indigo-700 rounded-xl font-medium">
<i data-lucide="wallet"></i> Budżet
</a>
</nav>
</aside>
<!-- Main Content -->
<main class="flex-1 overflow-y-auto bg-gray-50 p-4 lg:p-8 pb-24 md:pb-8">
<header class="mb-10">
<h2 class="text-3xl font-black text-gray-900 leading-tight">Analiza Wydatków</h2>
<p class="text-gray-500 font-medium">Sprawdź ile wydajesz na prezenty i jak optymalizować swój budżet.</p>
</header>
<!-- Top Stats -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-10">
<div class="bg-white p-6 rounded-[2rem] border border-gray-50 shadow-sm">
<p class="text-[10px] font-black text-gray-400 uppercase tracking-widest mb-1">Całkowity Budżet 2025</p>
<h3 class="text-2xl font-black text-gray-900 leading-none">12 400 PLN</h3>
<div class="mt-4 flex items-center gap-2">
<span class="text-[10px] bg-green-50 text-green-600 px-2 py-0.5 rounded-full font-bold">+5% vs 2024</span>
</div>
</div>
<div class="bg-indigo-600 p-6 rounded-[2rem] text-white shadow-xl shadow-indigo-100">
<p class="text-[10px] font-black text-indigo-200 uppercase tracking-widest mb-1">Wykorzystano do dziś</p>
<h3 class="text-2xl font-black leading-none">8 250 PLN</h3>
<div class="w-full bg-indigo-500/30 h-1.5 rounded-full mt-4">
<div class="h-full bg-white" style="width: 66%"></div>
</div>
</div>
<div class="bg-white p-6 rounded-[2rem] border border-gray-50 shadow-sm">
<p class="text-[10px] font-black text-gray-400 uppercase tracking-widest mb-1">Średnia na prezent</p>
<h3 class="text-2xl font-black text-gray-900 leading-none">320 PLN</h3>
</div>
<div class="bg-white p-6 rounded-[2rem] border border-gray-50 shadow-sm">
<p class="text-[10px] font-black text-gray-400 uppercase tracking-widest mb-1">Zaoszczędzone z AI</p>
<h3 class="text-2xl font-black text-indigo-600 leading-none">1 150 PLN</h3>
<div class="mt-4 flex items-center gap-1 text-[10px] text-gray-400 font-medium">
<i data-lucide="sparkles" class="w-3 h-3 text-indigo-500"></i> Dzięki alertom cenowym
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-10">
<!-- Main Chart -->
<div class="lg:col-span-2 bg-white rounded-[2.5rem] p-8 border border-gray-50 shadow-sm">
<div class="flex items-center justify-between mb-8">
<div>
<h4 class="text-xl font-black text-gray-900">Wydatki miesięczne</h4>
<p class="text-xs text-gray-400 font-bold uppercase tracking-widest mt-1">Porównanie z ubiegłym rokiem</p>
</div>
<div class="flex gap-2">
<span class="flex items-center gap-2 text-[10px] font-black text-gray-400"><span class="w-2 h-2 rounded-full bg-indigo-600"></span> 2025</span>
<span class="flex items-center gap-2 text-[10px] font-black text-gray-400"><span class="w-2 h-2 rounded-full bg-gray-200"></span> 2024</span>
</div>
</div>
<div class="h-64">
<canvas id="budgetChart"></canvas>
</div>
</div>
<!-- Breakdown by Occasion -->
<div class="bg-white rounded-[2.5rem] p-8 border border-gray-50 shadow-sm">
<h4 class="text-xl font-black text-gray-900 mb-6">Podział wg okazji</h4>
<div class="space-y-6">
<div class="flex items-center gap-4">
<div class="w-10 h-10 bg-indigo-50 rounded-xl flex items-center justify-center text-indigo-600 shrink-0"><i data-lucide="gift"></i></div>
<div class="flex-1">
<div class="flex justify-between mb-1">
<span class="text-xs font-bold text-gray-700">Święta</span>
<span class="text-xs font-black text-gray-900">5 000 PLN</span>
</div>
<div class="w-full bg-gray-100 h-1 rounded-full"><div class="h-full bg-indigo-600" style="width: 60%"></div></div>
</div>
</div>
<div class="flex items-center gap-4">
<div class="w-10 h-10 bg-purple-50 rounded-xl flex items-center justify-center text-purple-600 shrink-0"><i data-lucide="cake"></i></div>
<div class="flex-1">
<div class="flex justify-between mb-1">
<span class="text-xs font-bold text-gray-700">Urodziny</span>
<span class="text-xs font-black text-gray-900">3 200 PLN</span>
</div>
<div class="w-full bg-gray-100 h-1 rounded-full"><div class="h-full bg-purple-600" style="width: 40%"></div></div>
</div>
</div>
<div class="flex items-center gap-4">
<div class="w-10 h-10 bg-pink-50 rounded-xl flex items-center justify-center text-pink-600 shrink-0"><i data-lucide="heart"></i></div>
<div class="flex-1">
<div class="flex justify-between mb-1">
<span class="text-xs font-bold text-gray-700">Rocznice</span>
<span class="text-xs font-black text-gray-900">1 800 PLN</span>
</div>
<div class="w-full bg-gray-100 h-1 rounded-full"><div class="h-full bg-pink-600" style="width: 25%"></div></div>
</div>
</div>
<div class="flex items-center gap-4">
<div class="w-10 h-10 bg-gray-50 rounded-xl flex items-center justify-center text-gray-400 shrink-0"><i data-lucide="more-horizontal"></i></div>
<div class="flex-1">
<div class="flex justify-between mb-1">
<span class="text-xs font-bold text-gray-700">Inne</span>
<span class="text-xs font-black text-gray-900">2 400 PLN</span>
</div>
<div class="w-full bg-gray-100 h-1 rounded-full"><div class="h-full bg-gray-400" style="width: 35%"></div></div>
</div>
</div>
</div>
</div>
</div>
<!-- Detailed History -->
<div class="bg-white rounded-[2.5rem] p-8 border border-gray-50 shadow-sm overflow-hidden">
<div class="flex items-center justify-between mb-8">
<h4 class="text-xl font-black text-gray-900">Historia Ostatnich Zakupów</h4>
<button class="text-xs font-bold text-indigo-600 hover:underline">Eksportuj do PDF</button>
</div>
<div class="overflow-x-auto">
<table class="w-full text-left">
<thead>
<tr class="text-[10px] font-black text-gray-300 uppercase tracking-widest border-b border-gray-50">
<th class="pb-4">Data</th>
<th class="pb-4">Dla kogo</th>
<th class="pb-4">Przedmiot</th>
<th class="pb-4">Okazja</th>
<th class="pb-4 text-right">Kwota</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-50">
<tr>
<td class="py-4 text-xs font-bold text-gray-500">12.12.2025</td>
<td class="py-4 font-bold text-gray-900">Mama</td>
<td class="py-4 text-xs text-gray-500">Ekspres do kawy Sage</td>
<td class="py-4"><span class="bg-indigo-50 text-indigo-600 text-[10px] font-bold px-2 py-0.5 rounded-full uppercase">Święta</span></td>
<td class="py-4 text-right font-black text-gray-900">2 499 PLN</td>
</tr>
<tr>
<td class="py-4 text-xs font-bold text-gray-500">10.12.2025</td>
<td class="py-4 font-bold text-gray-900">Tata</td>
<td class="py-4 text-xs text-gray-500">Zestaw narzędzi</td>
<td class="py-4"><span class="bg-indigo-50 text-indigo-600 text-[10px] font-bold px-2 py-0.5 rounded-full uppercase">Święta</span></td>
<td class="py-4 text-right font-black text-gray-900">850 PLN</td>
</tr>
<tr>
<td class="py-4 text-xs font-bold text-gray-500">05.12.2025</td>
<td class="py-4 font-bold text-gray-900">Maja</td>
<td class="py-4 text-xs text-gray-500">Słuchawki bezprzewodowe</td>
<td class="py-4"><span class="bg-purple-50 text-purple-600 text-[10px] font-bold px-2 py-0.5 rounded-full uppercase">Urodziny</span></td>
<td class="py-4 text-right font-black text-gray-900">1 200 PLN</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
</div>
<!-- Mobile Nav -->
<nav class="lg:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-2 flex justify-around items-center z-50">
<a href="dashboard.html" class="flex flex-col items-center p-2 text-gray-400">
<i data-lucide="layout-dashboard" class="w-6 h-6"></i>
<span class="text-[10px] font-bold mt-1">Home</span>
</a>
<a href="occasions.html" class="flex flex-col items-center p-2 text-gray-400">
<i data-lucide="calendar" class="w-6 h-6"></i>
<span class="text-[10px] font-bold mt-1">Okazje</span>
</a>
<a href="persons.html" class="flex flex-col items-center p-2 text-gray-400">
<i data-lucide="users" class="w-6 h-6"></i>
<span class="text-[10px] font-bold mt-1">Osoby</span>
</a>
<a href="budget.html" class="flex flex-col items-center p-2 text-indigo-600">
<i data-lucide="wallet" class="w-6 h-6"></i>
<span class="text-[10px] font-bold mt-1">Budżet</span>
</a>
</nav>
<script>
lucide.createIcons();
// Chart
const ctx = document.getElementById('budgetChart').getContext('2d');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [
{
label: '2025',
data: [1200, 1900, 1500, 800, 2200, 1100, 900, 400, 1600, 2500, 4800, 8200],
backgroundColor: '#6366f1',
borderRadius: 8,
barThickness: 12
},
{
label: '2024',
data: [1000, 1700, 1300, 700, 1800, 1000, 800, 300, 1400, 2200, 4000, 7500],
backgroundColor: '#e2e8f0',
borderRadius: 8,
barThickness: 12
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: { legend: { display: false } },
scales: {
x: {
grid: { display: false },
ticks: { font: { size: 10, weight: 'bold' }, color: '#94a3b8' }
},
y: {
grid: { color: '#f8fafc' },
ticks: { font: { size: 10, weight: 'bold' }, color: '#94a3b8' }
}
}
}
});
</script>
</body>
</html>