upraveni administrrace
This commit is contained in:
@@ -1,145 +1,307 @@
|
|||||||
|
@page "/admin"
|
||||||
@page "/admin"
|
|
||||||
@rendermode InteractiveServer
|
@rendermode InteractiveServer
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
@using Microsoft.AspNetCore.Authorization
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Web_Jarmark.Data
|
@using Web_Jarmark.Data
|
||||||
@using Web_Jarmark.Data.Models
|
@using Web_Jarmark.Data.Models
|
||||||
@attribute [Authorize]
|
|
||||||
@inject ApplicationDbContext Db
|
@inject ApplicationDbContext Db
|
||||||
|
|
||||||
<PageTitle>Administrace | Jarmark</PageTitle>
|
@attribute [Authorize]
|
||||||
|
|
||||||
<div class="admin-dashboard">
|
<PageTitle>Přehled administrace</PageTitle>
|
||||||
|
|
||||||
<div class="admin-welcome">
|
<div class="wj-dashboard">
|
||||||
<div>
|
|
||||||
<span class="admin-eyebrow">ADMINISTRACE JARMARKU</span>
|
<aside class="wj-sidebar">
|
||||||
<h1>Vítej v administraci 👋</h1>
|
<a href="/admin" class="wj-brand">
|
||||||
<p>Všechno důležité pro správu tvého obchodu na jednom místě.</p>
|
<span class="wj-brand-icon">W</span>
|
||||||
|
<span>Web-Jarmark</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<nav class="wj-nav">
|
||||||
|
<a href="/admin" class="wj-nav-link active">
|
||||||
|
<span>⌂</span> Přehled
|
||||||
|
</a>
|
||||||
|
<a href="/admin/kategorie" class="wj-nav-link">
|
||||||
|
<span>▤</span> Kategorie
|
||||||
|
</a>
|
||||||
|
<a href="/admin/zbozi" class="wj-nav-link">
|
||||||
|
<span>◇</span> Zboží
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="wj-sidebar-bottom">
|
||||||
|
<div class="wj-sidebar-mark">W</div>
|
||||||
|
<div>
|
||||||
|
<strong>Web-Jarmark</strong>
|
||||||
|
<small>E-shop s domácími produkty</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</aside>
|
||||||
|
|
||||||
<div class="admin-section-heading">
|
<main class="wj-main">
|
||||||
<div>
|
|
||||||
<h2>Rychlý přehled</h2>
|
|
||||||
<p>Aktuální stav tvého obchodu</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (loading)
|
<header class="wj-topbar">
|
||||||
{
|
<div class="wj-topbar-label">ADMINISTRACE</div>
|
||||||
<div class="admin-loading">Načítám údaje...</div>
|
<div class="wj-topbar-right">
|
||||||
}
|
<span class="wj-status-dot"></span>
|
||||||
else
|
<span>Administrátor</span>
|
||||||
{
|
</div>
|
||||||
<div class="admin-stats">
|
</header>
|
||||||
|
|
||||||
<div class="admin-stat-card">
|
<section class="wj-content">
|
||||||
<div class="admin-stat-icon purple">▦</div>
|
|
||||||
|
<div class="wj-page-heading">
|
||||||
<div>
|
<div>
|
||||||
<span>Celkem kategorií</span>
|
<div class="wj-eyebrow">VÁŠ OBCHOD NA JEDNOM MÍSTĚ</div>
|
||||||
<strong>@categoryCount</strong>
|
<h1>Přehled administrace</h1>
|
||||||
<small>Všechny kategorie</small>
|
<p>Rychlý přehled o aktuálním stavu vašeho obchodu.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wj-date">
|
||||||
|
<span>◷</span>
|
||||||
|
@DateTime.Now.ToString("d. M. yyyy")
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="admin-stat-card">
|
@if (loading)
|
||||||
<div class="admin-stat-icon blue">□</div>
|
{
|
||||||
<div>
|
<div class="wj-panel p-4">Načítám data obchodu…</div>
|
||||||
<span>Celkem produktů</span>
|
}
|
||||||
<strong>@productCount</strong>
|
else
|
||||||
<small>@visibleCount viditelných produktů</small>
|
{
|
||||||
|
<div class="wj-stats-grid">
|
||||||
|
|
||||||
|
<div class="wj-stat-card">
|
||||||
|
<div class="wj-stat-top">
|
||||||
|
<span class="wj-stat-icon">↗</span>
|
||||||
|
<span class="wj-stat-caption">KATALOG</span>
|
||||||
|
</div>
|
||||||
|
<div class="wj-stat-label">Celkem produktů</div>
|
||||||
|
<div class="wj-stat-value">@productCount</div>
|
||||||
|
<div class="wj-stat-foot">Všechny produkty v obchodě</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wj-stat-card">
|
||||||
|
<div class="wj-stat-top">
|
||||||
|
<span class="wj-stat-icon">▤</span>
|
||||||
|
<span class="wj-stat-caption">SORTIMENT</span>
|
||||||
|
</div>
|
||||||
|
<div class="wj-stat-label">Počet kategorií</div>
|
||||||
|
<div class="wj-stat-value">@categoryCount</div>
|
||||||
|
<div class="wj-stat-foot">Kategorie vašeho zboží</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wj-stat-card">
|
||||||
|
<div class="wj-stat-top">
|
||||||
|
<span class="wj-stat-icon">◉</span>
|
||||||
|
<span class="wj-stat-caption">E-SHOP</span>
|
||||||
|
</div>
|
||||||
|
<div class="wj-stat-label">Viditelné produkty</div>
|
||||||
|
<div class="wj-stat-value">@visibleCount</div>
|
||||||
|
<div class="wj-stat-foot">Produkty dostupné v katalogu</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wj-stat-card">
|
||||||
|
<div class="wj-stat-top">
|
||||||
|
<span class="wj-stat-icon">!</span>
|
||||||
|
<span class="wj-stat-caption">SKLAD</span>
|
||||||
|
</div>
|
||||||
|
<div class="wj-stat-label">Dochází skladem</div>
|
||||||
|
<div class="wj-stat-value">@lowStockCount</div>
|
||||||
|
<div class="wj-stat-foot">Produkty s 5 nebo méně kusy</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="admin-stat-card">
|
<div class="wj-middle-grid">
|
||||||
<div class="admin-stat-icon orange">!</div>
|
|
||||||
<div>
|
<section class="wj-panel">
|
||||||
<span>Nízké zásoby</span>
|
<div class="wj-panel-heading">
|
||||||
<strong>@lowStockCount</strong>
|
<div>
|
||||||
<small>Produkty s 5 a méně kusy</small>
|
<h2>Produkty podle kategorií</h2>
|
||||||
|
<p>Rozložení vašeho sortimentu</p>
|
||||||
|
</div>
|
||||||
|
<a href="/admin/kategorie" class="wj-text-link">Kategorie ↗</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (categoryStats.Count == 0)
|
||||||
|
{
|
||||||
|
<div class="wj-empty">Zatím nemáte žádné kategorie.</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="wj-category-list">
|
||||||
|
@foreach (var category in categoryStats)
|
||||||
|
{
|
||||||
|
<div class="wj-category-item">
|
||||||
|
<div class="wj-category-info">
|
||||||
|
<span>@category.Name</span>
|
||||||
|
<strong>@category.ProductCount</strong>
|
||||||
|
</div>
|
||||||
|
<div class="wj-progress">
|
||||||
|
<div class="wj-progress-fill"
|
||||||
|
style="@($"width: {GetWidth(category.ProductCount)}%")">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="wj-panel">
|
||||||
|
<div class="wj-panel-heading">
|
||||||
|
<div>
|
||||||
|
<h2>Rychlé akce</h2>
|
||||||
|
<p>Nejčastější úkony v administraci</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wj-actions">
|
||||||
|
<a href="/admin/zbozi/edit" class="wj-action">
|
||||||
|
<span class="wj-action-icon">+</span>
|
||||||
|
<span>
|
||||||
|
<strong>Přidat nové zboží</strong>
|
||||||
|
<small>Vytvořit nový produkt</small>
|
||||||
|
</span>
|
||||||
|
<span class="wj-action-arrow">→</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/admin/kategorie/edit" class="wj-action">
|
||||||
|
<span class="wj-action-icon">▤</span>
|
||||||
|
<span>
|
||||||
|
<strong>Nová kategorie</strong>
|
||||||
|
<small>Rozšířit nabídku kategorií</small>
|
||||||
|
</span>
|
||||||
|
<span class="wj-action-arrow">→</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/admin/zbozi" class="wj-action">
|
||||||
|
<span class="wj-action-icon">◇</span>
|
||||||
|
<span>
|
||||||
|
<strong>Spravovat zboží</strong>
|
||||||
|
<small>Upravit nebo skrýt produkty</small>
|
||||||
|
</span>
|
||||||
|
<span class="wj-action-arrow">→</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
<div class="admin-section-heading admin-links-heading">
|
<section class="wj-panel wj-products-panel">
|
||||||
<div>
|
<div class="wj-panel-heading">
|
||||||
<h2>Správa obchodu</h2>
|
<div>
|
||||||
<p>Vyber, co chceš právě upravit</p>
|
<h2>Přehled produktů</h2>
|
||||||
</div>
|
<p>Ukázka produktů z vašeho katalogu</p>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="/admin/zbozi" class="wj-text-link">Zobrazit vše →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="admin-navigation-cards">
|
@if (productPreview.Count == 0)
|
||||||
|
{
|
||||||
<a href="/admin/kategorie" class="admin-navigation-card">
|
<div class="wj-empty">Zatím nemáte žádné produkty.</div>
|
||||||
<div class="admin-navigation-icon purple">▤</div>
|
}
|
||||||
<div class="admin-navigation-content">
|
else
|
||||||
<h3>Kategorie</h3>
|
{
|
||||||
<p>Vytvářej kategorie, upravuj jejich názvy a spravuj jejich aktivitu.</p>
|
<div class="wj-table-wrap">
|
||||||
<span class="admin-card-link">Otevřít kategorie <span>→</span></span>
|
<table class="wj-table">
|
||||||
</div>
|
<thead>
|
||||||
</a>
|
<tr>
|
||||||
|
<th>Produkt</th>
|
||||||
<a href="/admin/zbozi" class="admin-navigation-card">
|
<th>Kategorie</th>
|
||||||
<div class="admin-navigation-icon green">□</div>
|
<th>Cena</th>
|
||||||
<div class="admin-navigation-content">
|
<th>Skladem</th>
|
||||||
<h3>Zboží a produkty</h3>
|
<th>Stav</th>
|
||||||
<p>Spravuj produkty, ceny, skladové zásoby a viditelnost v obchodě.</p>
|
</tr>
|
||||||
<span class="admin-card-link">Otevřít zboží <span>→</span></span>
|
</thead>
|
||||||
</div>
|
<tbody>
|
||||||
</a>
|
@foreach (var product in productPreview)
|
||||||
|
{
|
||||||
<a href="/admin/kategorie/edit" class="admin-navigation-card">
|
<tr>
|
||||||
<div class="admin-navigation-icon orange">+</div>
|
<td class="wj-product-name">@product.Name</td>
|
||||||
<div class="admin-navigation-content">
|
<td>@product.CategoryName</td>
|
||||||
<h3>Nová kategorie</h3>
|
<td class="wj-price">@product.Price.ToString("N2") Kč</td>
|
||||||
<p>Vytvoř novou kategorii a zařaď do ní své produkty.</p>
|
<td>@product.StockQuantity ks</td>
|
||||||
<span class="admin-card-link">Vytvořit kategorii <span>→</span></span>
|
<td>
|
||||||
</div>
|
@if (product.IsVisible)
|
||||||
</a>
|
{
|
||||||
|
<span class="wj-pill">Viditelné</span>
|
||||||
<a href="/admin/zbozi/edit" class="admin-navigation-card">
|
}
|
||||||
<div class="admin-navigation-icon blue">+</div>
|
else
|
||||||
<div class="admin-navigation-content">
|
{
|
||||||
<h3>Nové zboží</h3>
|
<span class="wj-pill wj-pill-muted">Skryté</span>
|
||||||
<p>Přidej produkt, nastav cenu, popis a skladovou zásobu.</p>
|
}
|
||||||
<span class="admin-card-link">Přidat produkt <span>→</span></span>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</a>
|
}
|
||||||
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
|
</div>
|
||||||
<div class="admin-tip">
|
}
|
||||||
<span class="admin-tip-icon">💡</span>
|
</section>
|
||||||
<div>
|
}
|
||||||
<strong>Tip pro rychlejší správu</strong>
|
|
||||||
<p>Chceš upravit produkty v konkrétní kategorii? Otevři Kategorie a pokračuj odtud. V dalším kroku přidáme přímé filtrování produktů podle kategorie.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private int categoryCount;
|
private bool loading = true;
|
||||||
|
|
||||||
private int productCount;
|
private int productCount;
|
||||||
|
private int categoryCount;
|
||||||
private int visibleCount;
|
private int visibleCount;
|
||||||
private int lowStockCount;
|
private int lowStockCount;
|
||||||
private bool loading = true;
|
|
||||||
|
private List<CategoryStat> categoryStats = new();
|
||||||
|
private List<ProductPreview> productPreview = new();
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
categoryCount = await Db.Set<Category>().CountAsync();
|
|
||||||
|
|
||||||
productCount = await Db.Set<Product>().CountAsync();
|
productCount = await Db.Set<Product>().CountAsync();
|
||||||
|
categoryCount = await Db.Set<Category>().CountAsync();
|
||||||
|
visibleCount = await Db.Set<Product>().CountAsync(p => p.IsVisible);
|
||||||
|
lowStockCount = await Db.Set<Product>().CountAsync(p => p.StockQuantity <= 5);
|
||||||
|
|
||||||
visibleCount = await Db.Set<Product>()
|
var categories = await Db.Set<Category>()
|
||||||
.CountAsync(p => p.IsVisible);
|
.AsNoTracking()
|
||||||
|
.Include(c => c.Products)
|
||||||
|
.OrderBy(c => c.Name)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
lowStockCount = await Db.Set<Product>()
|
categoryStats = categories
|
||||||
.CountAsync(p => p.StockQuantity <= 5);
|
.Select(c => new CategoryStat(c.Name, c.Products.Count))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
productPreview = await Db.Set<Product>()
|
||||||
|
.AsNoTracking()
|
||||||
|
.OrderBy(p => p.Name)
|
||||||
|
.Take(5)
|
||||||
|
.Select(p => new ProductPreview(
|
||||||
|
p.Name,
|
||||||
|
p.Category.Name,
|
||||||
|
p.Price,
|
||||||
|
p.StockQuantity,
|
||||||
|
p.IsVisible))
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int GetWidth(int count)
|
||||||
|
{
|
||||||
|
var max = categoryStats.Count == 0 ? 1 : categoryStats.Max(c => c.ProductCount);
|
||||||
|
return count == 0 ? 0 : Math.Max(5, (int)Math.Round(count * 100.0 / Math.Max(1, max)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private record CategoryStat(string Name, int ProductCount);
|
||||||
|
|
||||||
|
private record ProductPreview(
|
||||||
|
string Name,
|
||||||
|
string CategoryName,
|
||||||
|
decimal Price,
|
||||||
|
int StockQuantity,
|
||||||
|
bool IsVisible);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -358,3 +358,635 @@ h1:focus {
|
|||||||
background: #aab3bd;
|
background: #aab3bd;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
WEB-JARMARK – MODERNÍ ADMINISTRACE
|
||||||
|
Èernobílý, zaoblený a jemný vzhled
|
||||||
|
========================================== */
|
||||||
|
|
||||||
|
.wj-dashboard {
|
||||||
|
--wj-bg: #f5f5f6;
|
||||||
|
--wj-white: #ffffff;
|
||||||
|
--wj-text: #171717;
|
||||||
|
--wj-muted: #85858d;
|
||||||
|
--wj-border: #ededee;
|
||||||
|
--wj-black: #171717;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 245px minmax(0, 1fr);
|
||||||
|
min-height: 100vh;
|
||||||
|
background: var(--wj-bg);
|
||||||
|
color: var(--wj-text);
|
||||||
|
font-family: Inter, "Segoe UI", Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Boèní menu */
|
||||||
|
|
||||||
|
.wj-sidebar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 27px 18px;
|
||||||
|
background: #fff;
|
||||||
|
border-right: 1px solid var(--wj-border);
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-brand {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 5px 9px 38px;
|
||||||
|
color: var(--wj-text);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 750;
|
||||||
|
letter-spacing: -0.6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-brand:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-brand-icon,
|
||||||
|
.wj-sidebar-mark {
|
||||||
|
width: 37px;
|
||||||
|
height: 37px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
background: #171717;
|
||||||
|
color: white;
|
||||||
|
border-radius: 13px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 13px;
|
||||||
|
padding: 13px 15px;
|
||||||
|
border-radius: 13px;
|
||||||
|
color: #55555b;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 550;
|
||||||
|
transition: background .22s ease, color .22s ease, transform .22s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav-link span {
|
||||||
|
width: 22px;
|
||||||
|
font-size: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav-link:hover {
|
||||||
|
background: #f2f2f3;
|
||||||
|
color: #111;
|
||||||
|
transform: translateX(3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav-link.active {
|
||||||
|
background: #191919;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 5px 15px rgba(0, 0, 0, .12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-bottom {
|
||||||
|
margin-top: auto;
|
||||||
|
padding: 15px 10px;
|
||||||
|
border: 1px solid var(--wj-border);
|
||||||
|
border-radius: 17px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-bottom strong,
|
||||||
|
.wj-sidebar-bottom small {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-bottom strong {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-bottom small {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
font-size: 10px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-mark {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
border-radius: 11px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hlavní èást */
|
||||||
|
|
||||||
|
.wj-main {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-topbar {
|
||||||
|
height: 70px;
|
||||||
|
padding: 0 36px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background: rgba(255, 255, 255, .88);
|
||||||
|
border-bottom: 1px solid var(--wj-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-topbar-label {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 1.3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-topbar-right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 9px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-status-dot {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
background: #222;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 4px #eeeeef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-content {
|
||||||
|
max-width: 1600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 36px;
|
||||||
|
animation: wj-enter .5s ease both;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes wj-enter {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(9px);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-page-heading {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
margin-bottom: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-eyebrow {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
font-size: 10px;
|
||||||
|
letter-spacing: 1.4px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-page-heading h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: clamp(25px, 3vw, 32px);
|
||||||
|
font-weight: 750;
|
||||||
|
letter-spacing: -1.1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-page-heading p {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
margin: 8px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-date {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--wj-border);
|
||||||
|
border-radius: 13px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
color: #555;
|
||||||
|
white-space: nowrap;
|
||||||
|
box-shadow: 0 3px 12px rgba(0, 0, 0, .025);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-date span {
|
||||||
|
margin-right: 8px;
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Statistiky */
|
||||||
|
|
||||||
|
.wj-stats-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-card {
|
||||||
|
background: var(--wj-white);
|
||||||
|
border: 1px solid var(--wj-border);
|
||||||
|
border-radius: 21px;
|
||||||
|
padding: 22px;
|
||||||
|
min-height: 177px;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, .025);
|
||||||
|
transition: transform .25s ease, box-shadow .25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-card:hover {
|
||||||
|
transform: translateY(-4px);
|
||||||
|
box-shadow: 0 12px 28px rgba(0, 0, 0, .07);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-icon {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 39px;
|
||||||
|
height: 39px;
|
||||||
|
border: 1px solid #e7e7e9;
|
||||||
|
border-radius: 50%;
|
||||||
|
font-size: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-caption {
|
||||||
|
color: #aaaab0;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-label {
|
||||||
|
color: #777780;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-value {
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 750;
|
||||||
|
letter-spacing: -1.2px;
|
||||||
|
margin: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-foot {
|
||||||
|
color: #a0a0a6;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panely */
|
||||||
|
|
||||||
|
.wj-middle-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1.15fr .85fr;
|
||||||
|
gap: 17px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel {
|
||||||
|
min-width: 0;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--wj-border);
|
||||||
|
border-radius: 21px;
|
||||||
|
padding: 23px;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, .025);
|
||||||
|
transition: box-shadow .25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel:hover {
|
||||||
|
box-shadow: 0 8px 23px rgba(0, 0, 0, .045);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel-heading {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel-heading h2 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 750;
|
||||||
|
letter-spacing: -.3px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel-heading p {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
font-size: 11px;
|
||||||
|
margin: 6px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-text-link {
|
||||||
|
color: #555;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 650;
|
||||||
|
text-decoration: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: color .2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-text-link:hover {
|
||||||
|
color: #000;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Kategorie */
|
||||||
|
|
||||||
|
.wj-category-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-category-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-category-info span {
|
||||||
|
color: #55555d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-category-info strong {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-progress {
|
||||||
|
height: 8px;
|
||||||
|
background: #eeeeef;
|
||||||
|
border-radius: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
background: #222;
|
||||||
|
border-radius: 20px;
|
||||||
|
transition: width .7s cubic-bezier(.2, .8, .2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Rychlé akce */
|
||||||
|
|
||||||
|
.wj-actions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #eeeeef;
|
||||||
|
border-radius: 14px;
|
||||||
|
color: var(--wj-text);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: background .2s ease, border-color .2s ease, transform .2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action:hover {
|
||||||
|
background: #f7f7f8;
|
||||||
|
border-color: #d9d9dc;
|
||||||
|
color: #000;
|
||||||
|
transform: translateX(3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action-icon {
|
||||||
|
width: 37px;
|
||||||
|
height: 37px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #f0f0f1;
|
||||||
|
font-size: 18px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action strong,
|
||||||
|
.wj-action small {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action strong {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action small {
|
||||||
|
color: var(--wj-muted);
|
||||||
|
font-size: 10px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-action-arrow {
|
||||||
|
margin-left: auto;
|
||||||
|
color: #999;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tabulka */
|
||||||
|
|
||||||
|
.wj-products-panel {
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table-wrap {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table th {
|
||||||
|
padding: 12px 14px;
|
||||||
|
color: #9999a0;
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 650;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid var(--wj-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table td {
|
||||||
|
padding: 15px 14px;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #62626a;
|
||||||
|
border-bottom: 1px solid #f0f0f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table tbody tr {
|
||||||
|
transition: background .2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table tbody tr:hover {
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table tbody tr:last-child td {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-table .wj-product-name {
|
||||||
|
color: #222;
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-price {
|
||||||
|
color: #222 !important;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-pill {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 6px 11px;
|
||||||
|
background: #eeeeef;
|
||||||
|
color: #292929;
|
||||||
|
border-radius: 30px;
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-pill-muted {
|
||||||
|
background: #f6f6f6;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-empty {
|
||||||
|
padding: 25px 10px;
|
||||||
|
color: var(--wj-muted);
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responzivní zobrazení */
|
||||||
|
|
||||||
|
@media (max-width: 1150px) {
|
||||||
|
.wj-dashboard {
|
||||||
|
grid-template-columns: 205px minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-content {
|
||||||
|
padding: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stats-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 850px) {
|
||||||
|
.wj-dashboard {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar {
|
||||||
|
position: relative;
|
||||||
|
height: auto;
|
||||||
|
padding: 14px;
|
||||||
|
border-right: 0;
|
||||||
|
border-bottom: 1px solid var(--wj-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-brand {
|
||||||
|
padding: 0 5px 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav {
|
||||||
|
flex-direction: row;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-nav-link {
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 10px 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-sidebar-bottom {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-topbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-middle-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 560px) {
|
||||||
|
.wj-content {
|
||||||
|
padding: 18px 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-page-heading {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stats-grid {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-card {
|
||||||
|
min-height: 155px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-stat-value {
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel {
|
||||||
|
padding: 17px;
|
||||||
|
border-radius: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wj-panel-heading {
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.wj-dashboard *,
|
||||||
|
.wj-dashboard *::before,
|
||||||
|
.wj-dashboard *::after {
|
||||||
|
animation-duration: .01ms !important;
|
||||||
|
transition-duration: .01ms !important;
|
||||||
|
scroll-behavior: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user