Refactor to multi-category catalog with polished light mode

- Restructure from single filament table to multi-category product catalog
  (filamenti, stampaci, ploce, mlaznice, delovi, oprema)
- Add shared layout components (SiteHeader, SiteFooter, CategoryNav, Breadcrumb)
- Add reusable UI primitives (Badge, Button, Card, Modal, PriceDisplay, EmptyState)
- Add catalog components (CatalogPage, ProductTable, ProductGrid, FilamentCard, ProductCard)
- Add admin dashboard with sidebar navigation and category management
- Add product API endpoints and database migrations
- Add SEO pages (politika-privatnosti, uslovi-koriscenja, robots.txt, sitemap.xml)
- Fix light mode: gradient text contrast, category nav accessibility,
  surface tokens, card shadows, CTA section theming
This commit is contained in:
DaX
2026-02-21 21:56:17 +01:00
parent a854fd5524
commit 1d3d11afec
62 changed files with 8618 additions and 358 deletions

View File

@@ -33,7 +33,7 @@ export default function AdminLogin() {
trackEvent('Admin', 'Login', 'Success');
// Redirect to admin dashboard using window.location for static export
window.location.href = '/dashboard';
window.location.href = '/upadaj/dashboard';
} catch (err: any) {
setError('Neispravno korisničko ime ili lozinka');
console.error('Login error:', err);
@@ -44,28 +44,31 @@ export default function AdminLogin() {
};
return (
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8">
<div className="min-h-screen flex items-center justify-center bg-[#060a14] py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-md w-full space-y-8">
<div className="flex flex-col items-center">
<img
src="/logo.png"
alt="Filamenteka"
<img
src="/logo.png"
alt="Filamenteka"
className="h-40 w-auto mb-6 drop-shadow-lg"
/>
<h2 className="text-center text-3xl font-extrabold text-gray-900 dark:text-white">
<h2
className="text-center text-3xl font-black text-white tracking-tight"
style={{ fontFamily: 'var(--font-display)' }}
>
Admin Prijava
</h2>
<p className="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
<p className="mt-2 text-center text-sm text-white/40">
Prijavite se za upravljanje filamentima
</p>
</div>
<form className="mt-8 space-y-6" onSubmit={handleLogin}>
{error && (
<div className="rounded-md bg-red-50 dark:bg-red-900/20 p-4">
<p className="text-sm text-red-800 dark:text-red-400">{error}</p>
<div className="rounded-xl bg-red-500/10 border border-red-500/20 p-4">
<p className="text-sm text-red-400">{error}</p>
</div>
)}
<div className="rounded-md shadow-sm -space-y-px">
<div className="space-y-3">
<div>
<label htmlFor="username" className="sr-only">
Korisničko ime
@@ -76,7 +79,7 @@ export default function AdminLogin() {
type="text"
autoComplete="username"
required
className="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm dark:bg-gray-800"
className="appearance-none relative block w-full px-4 py-3 border border-white/[0.08] placeholder-white/30 text-white rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500/40 sm:text-sm bg-white/[0.04]"
placeholder="Korisničko ime"
value={username}
onChange={(e) => setUsername(e.target.value)}
@@ -92,7 +95,7 @@ export default function AdminLogin() {
type="password"
autoComplete="current-password"
required
className="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm dark:bg-gray-800"
className="appearance-none relative block w-full px-4 py-3 border border-white/[0.08] placeholder-white/30 text-white rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500/40 sm:text-sm bg-white/[0.04]"
placeholder="Lozinka"
value={password}
onChange={(e) => setPassword(e.target.value)}
@@ -104,7 +107,8 @@ export default function AdminLogin() {
<button
type="submit"
disabled={loading}
className="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
className="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-semibold rounded-xl text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
style={{ boxShadow: '0 4px 14px rgba(59, 130, 246, 0.3)' }}
>
{loading ? 'Prijavljivanje...' : 'Prijavite se'}
</button>
@@ -113,4 +117,4 @@ export default function AdminLogin() {
</div>
</div>
);
}
}