+
+
@code {
+ private bool collapsed;
private string SectionTitle = "Přehled";
+ private void Toggle() => collapsed = !collapsed;
+
protected override void OnInitialized()
{
UpdateTitle();
@@ -45,7 +75,6 @@
var p when p.StartsWith("/admin/zbozi") => "Zboží",
var p when p.StartsWith("/admin/objednavky") => "Objednávky",
var p when p.StartsWith("/admin/administratori") => "Administrátoři",
- var p when p.StartsWith("/admin/zakaznici") => "Administrátoři",
var p when p.StartsWith("/admin/sklad") => "Sklad",
var p when p.StartsWith("/admin/statistiky") => "Statistiky",
var p when p.StartsWith("/admin/nastaveni") => "Nastavení",
@@ -57,4 +86,4 @@
{
Nav.LocationChanged -= OnLocationChanged;
}
-}
+}
\ No newline at end of file
diff --git a/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminLayout.razor.css b/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminLayout.razor.css
index f0f6749..75bce25 100644
--- a/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminLayout.razor.css
+++ b/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminLayout.razor.css
@@ -1,200 +1,141 @@
-/* Nový admin shell – třídy admin-*, ať se nesráží se starým app.css */
+/* Apple-like admin – plovoucí, hodně zaoblené */
.admin-shell {
- --bg: #f3f3f3;
- --surface: #ffffff;
- --ink: #111111;
- --muted: #6b6b6b;
- --line: #e4e4e4;
- --hover: #f0f0f0;
- --active: #111111;
- --sidebar: 250px;
- --sidebar-collapsed: 78px;
- --radius: 12px;
- display: flex;
+ --bg: #f5f5f7;
+ --ink: #1d1d1f;
+ --muted: #6e6e73;
+ --line: rgba(0, 0, 0, 0.06);
+ --sidebar-w: 280px;
+ --sidebar-w-collapsed: 92px;
min-height: 100vh;
+ display: flex;
+ gap: 14px;
+ padding: 14px;
+ box-sizing: border-box;
background: var(--bg);
color: var(--ink);
- font-family: Inter, "Segoe UI", system-ui, sans-serif;
- font-size: 14px;
+ font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
+ -webkit-font-smoothing: antialiased;
}
-/* SIDEBAR */
+/* ===== SIDEBAR CARD ===== */
.admin-sidebar {
- width: var(--sidebar);
+ width: var(--sidebar-w);
flex-shrink: 0;
position: sticky;
- top: 0;
- height: 100vh;
+ top: 14px;
+ height: calc(100vh - 28px);
display: flex;
flex-direction: column;
- background: var(--surface);
- border-right: 1px solid var(--line);
- transition: width 0.25s ease;
+ background: rgba(255, 255, 255, 0.86);
+ border: 1px solid rgba(0, 0, 0, 0.04);
+ border-radius: 28px;
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
+ backdrop-filter: blur(18px);
overflow: hidden;
+ transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-shell.is-collapsed .admin-sidebar {
- width: var(--sidebar-collapsed);
+ width: var(--sidebar-w-collapsed);
}
.admin-sidebar-head {
display: flex;
align-items: center;
justify-content: space-between;
- gap: 8px;
- padding: 18px 14px 10px;
+ gap: 10px;
+ padding: 18px 16px 12px;
}
.admin-logo {
display: flex;
align-items: center;
- gap: 10px;
+ gap: 12px;
text-decoration: none;
color: var(--ink);
min-width: 0;
}
.admin-logo-mark {
- width: 36px;
- height: 36px;
+ width: 40px;
+ height: 40px;
+ border-radius: 14px;
+ background: #1d1d1f;
+ color: #fff;
display: grid;
place-items: center;
- background: #111;
- color: #fff;
- border-radius: 10px;
font-weight: 800;
+ font-size: 15px;
flex-shrink: 0;
+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.admin-logo-mark.small {
- width: 30px;
- height: 30px;
+ width: 32px;
+ height: 32px;
+ border-radius: 11px;
font-size: 12px;
- border-radius: 8px;
}
.admin-logo-text {
- font-weight: 750;
- font-size: 15px;
+ font-weight: 700;
+ font-size: 16px;
+ letter-spacing: -0.03em;
white-space: nowrap;
}
-.admin-shell.is-collapsed .admin-logo-text,
-.admin-shell.is-collapsed .admin-foot-text {
- display: none;
-}
-
.admin-toggle {
- width: 34px;
- height: 34px;
- border: 1px solid var(--line);
- border-radius: 10px;
- background: #fff;
+ width: 38px;
+ height: 38px;
+ border: 0;
+ border-radius: 13px;
+ background: #f0f0f2;
+ color: var(--ink);
cursor: pointer;
flex-shrink: 0;
+ transition: background 0.2s ease, transform 0.15s ease;
}
.admin-toggle:hover {
- background: var(--hover);
+ background: #e6e6ea;
+ transform: scale(1.03);
}
-.admin-sidebar-foot {
- margin-top: auto;
- padding: 12px;
- border-top: 1px solid var(--line);
- display: flex;
- align-items: center;
- gap: 10px;
-}
-
-.admin-foot-text strong {
- display: block;
- font-size: 12px;
-}
-
-.admin-foot-text small {
- display: block;
- color: var(--muted);
- font-size: 11px;
- margin-top: 2px;
-}
-
-/* MAIN */
-.admin-main {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
-}
-
-.admin-topbar {
- height: 64px;
- padding: 0 28px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: rgba(255, 255, 255, 0.92);
- border-bottom: 1px solid var(--line);
- position: sticky;
- top: 0;
- z-index: 10;
-}
-
-.admin-topbar-title {
- font-size: 17px;
- font-weight: 700;
-}
-
-.admin-topbar-user {
- display: flex;
- align-items: center;
- gap: 8px;
- font-weight: 600;
- font-size: 13px;
-}
-
-.admin-dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: #111;
- box-shadow: 0 0 0 3px #ececec;
-}
-
-.admin-content {
- padding: 28px 32px 40px;
-}
-
-/* MENU uvnitř sidebaru (přes ::deep, protože je v child komponentě) */
+/* NAV */
::deep .admin-nav {
display: flex;
flex-direction: column;
- gap: 4px;
- padding: 8px 10px 16px;
+ gap: 6px;
+ padding: 8px 12px 12px;
+ flex: 1;
+ overflow-y: auto;
}
::deep .admin-nav-link {
display: flex;
align-items: center;
gap: 12px;
- padding: 11px 12px;
- border-radius: 10px;
- color: #444;
+ padding: 13px 14px;
+ border-radius: 16px;
text-decoration: none;
+ color: var(--muted);
font-weight: 600;
- transition: background 0.15s ease, color 0.15s ease;
+ font-size: 14px;
+ letter-spacing: -0.01em;
+ transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
white-space: nowrap;
}
::deep .admin-nav-link:hover {
- background: var(--hover);
- color: #111;
+ background: rgba(0, 0, 0, 0.04);
+ color: var(--ink);
}
::deep .admin-nav-link.active {
- background: #111;
+ background: #1d1d1f;
color: #fff;
+ box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
::deep .admin-nav-ico {
@@ -202,10 +143,104 @@
text-align: center;
flex-shrink: 0;
font-size: 15px;
- opacity: 0.9;
}
-.admin-shell.is-collapsed ::deep .admin-nav-label {
+::deep .admin-nav-label {
+ overflow: hidden;
+}
+
+/* FOOT */
+.admin-sidebar-foot {
+ padding: 10px 12px 14px;
+}
+
+.admin-foot-card {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 12px;
+ border-radius: 18px;
+ background: #f5f5f7;
+}
+
+.admin-foot-text {
+ min-width: 0;
+ overflow: hidden;
+}
+
+ .admin-foot-text strong {
+ display: block;
+ font-size: 13px;
+ font-weight: 700;
+ letter-spacing: -0.02em;
+ }
+
+ .admin-foot-text small {
+ display: block;
+ font-size: 11px;
+ color: var(--muted);
+ }
+
+/* ===== MAIN CARD ===== */
+.admin-main {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ background: rgba(255, 255, 255, 0.72);
+ border: 1px solid rgba(0, 0, 0, 0.04);
+ border-radius: 28px;
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
+ backdrop-filter: blur(18px);
+ overflow: hidden;
+}
+
+.admin-topbar {
+ height: 68px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
+ padding: 0 28px;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+ background: rgba(255, 255, 255, 0.55);
+}
+
+.admin-topbar-title {
+ font-size: 20px;
+ font-weight: 700;
+ letter-spacing: -0.03em;
+}
+
+.admin-topbar-user {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 8px 12px;
+ border-radius: 999px;
+ background: #f5f5f7;
+ font-size: 13px;
+ font-weight: 600;
+ color: var(--muted);
+}
+
+.admin-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #1d1d1f;
+}
+
+.admin-content {
+ padding: 22px 28px 36px;
+ flex: 1;
+ overflow: auto;
+}
+
+/* Collapsed */
+.admin-shell.is-collapsed .admin-logo-text,
+.admin-shell.is-collapsed ::deep .admin-nav-label,
+.admin-shell.is-collapsed .admin-foot-text {
display: none;
}
@@ -214,3 +249,31 @@
padding-left: 0;
padding-right: 0;
}
+
+.admin-shell.is-collapsed .admin-sidebar-head {
+ justify-content: center;
+ flex-direction: column;
+}
+
+.admin-shell.is-collapsed .admin-foot-card {
+ justify-content: center;
+}
+
+.admin-shell.is-collapsed .admin-logo {
+ justify-content: center;
+}
+/* SVG ikony v menu */
+::deep .admin-nav-ico {
+ width: 22px;
+ height: 22px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+}
+
+ ::deep .admin-nav-ico svg {
+ width: 20px;
+ height: 20px;
+ display: block;
+ }
\ No newline at end of file
diff --git a/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminNavMenu.razor b/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminNavMenu.razor
index f8b0fff..3609f66 100644
--- a/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminNavMenu.razor
+++ b/Web-Jarmark/Web-Jarmark/Components/Layout/Admin/AdminNavMenu.razor
@@ -3,42 +3,82 @@
diff --git a/Web-Jarmark/Web-Jarmark/jarmark.db-shm b/Web-Jarmark/Web-Jarmark/jarmark.db-shm
index c850907..9792474 100644
Binary files a/Web-Jarmark/Web-Jarmark/jarmark.db-shm and b/Web-Jarmark/Web-Jarmark/jarmark.db-shm differ
diff --git a/Web-Jarmark/Web-Jarmark/jarmark.db-wal b/Web-Jarmark/Web-Jarmark/jarmark.db-wal
index 1aaba0d..0b3fb7f 100644
Binary files a/Web-Jarmark/Web-Jarmark/jarmark.db-wal and b/Web-Jarmark/Web-Jarmark/jarmark.db-wal differ