From 31d8e0100c8da4bbd0a449eb99844bb9267f9be0 Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Mon, 19 Jan 2026 09:57:41 +0700 Subject: [PATCH] style: Update application theme with Inter font, new MudBlazor color palettes, refined loading indicator, and enhanced app bar navigation. --- .../Layout/MainLayout.razor | 66 +++++++++---- .../WebClientBase.Client/Layout/NavMenu.razor | 10 +- .../WebClientBase.Client/wwwroot/css/app.css | 95 ++++++++++++------- .../WebClientBase.Client/wwwroot/index.html | 75 ++++++++++----- 4 files changed, 165 insertions(+), 81 deletions(-) diff --git a/apps/web-client-base-net/src/WebClientBase.Client/Layout/MainLayout.razor b/apps/web-client-base-net/src/WebClientBase.Client/Layout/MainLayout.razor index c7ce3bcb..9fbe9def 100644 --- a/apps/web-client-base-net/src/WebClientBase.Client/Layout/MainLayout.razor +++ b/apps/web-client-base-net/src/WebClientBase.Client/Layout/MainLayout.razor @@ -6,12 +6,20 @@ - - - GoodGo + + + GoodGo - Features + Enterprise + Pricing + + Sign in + Download + + @@ -28,32 +36,52 @@ @code { private bool _drawerOpen = true; - private bool _isDarkMode = true; + private bool _isDarkMode = false; private MudTheme _theme = new() { PaletteLight = new PaletteLight() { - Primary = "#7c3aed", - Secondary = "#06b6d4", - Tertiary = "#f59e0b", - AppbarBackground = "#7c3aed", + Primary = "#18181b", // Zinc-900 (almost black) + AppbarBackground = "#f7f7f4", + AppbarText = "#18181b", + Background = "#f7f7f4", + Surface = "#ffffff", + DrawerBackground = "#f7f7f4", + DrawerText = "#52525b", // Zinc-600 + TextPrimary = "#18181b", + TextSecondary = "#52525b", + ActionDefault = "#52525b", + Divider = "#e4e4e7", // Zinc-200 + LinesDefault = "#e4e4e7" }, PaletteDark = new PaletteDark() { - Primary = "#7c3aed", - Secondary = "#06b6d4", - Tertiary = "#f59e0b", - AppbarBackground = "#1e1e2e", - Background = "#1e1e2e", - Surface = "#313244", - DrawerBackground = "#181825", - DrawerText = "#cdd6f4", - TextPrimary = "#cdd6f4", - TextSecondary = "#a6adc8", + Primary = "#fafafa", // Zinc-50 + AppbarBackground = "#09090b", // Zinc-950 + AppbarText = "#fafafa", + Background = "#09090b", + Surface = "#18181b", // Zinc-900 + DrawerBackground = "#09090b", + DrawerText = "#a1a1aa", // Zinc-400 + TextPrimary = "#fafafa", + TextSecondary = "#a1a1aa", + ActionDefault = "#a1a1aa", + Divider = "#27272a", // Zinc-800 + LinesDefault = "#27272a" }, + LayoutProperties = new LayoutProperties() + { + DefaultBorderRadius = "6px", + AppbarHeight = "64px" + } }; + protected override void OnInitialized() + { + _theme.Typography.Default.FontFamily = new[] { "Inter", "Helvetica", "Arial", "sans-serif" }; + } + private void ToggleDrawer() { _drawerOpen = !_drawerOpen; diff --git a/apps/web-client-base-net/src/WebClientBase.Client/Layout/NavMenu.razor b/apps/web-client-base-net/src/WebClientBase.Client/Layout/NavMenu.razor index 0d401b79..e0887b8d 100644 --- a/apps/web-client-base-net/src/WebClientBase.Client/Layout/NavMenu.razor +++ b/apps/web-client-base-net/src/WebClientBase.Client/Layout/NavMenu.razor @@ -1,17 +1,17 @@  - + Home - + Products - + Auth - + Counter - + Weather diff --git a/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/css/app.css b/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/css/app.css index df578f35..6957c01f 100644 --- a/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/css/app.css +++ b/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/css/app.css @@ -9,32 +9,33 @@ ═══════════════════════════════════════════════════════════════════════════════ */ :root { /* Light Mode Colors */ - --bg-primary: #ffffff; - --bg-secondary: #f5f5f7; - --bg-tertiary: #e5e5ea; + --bg-primary: #f7f7f4; + --bg-secondary: #ffffff; + --bg-tertiary: #f0f0f0; --bg-elevated: #ffffff; - --text-primary: #1d1d1f; - --text-secondary: #6e6e73; - --text-tertiary: #8e8e93; + --text-primary: #18181b; + --text-secondary: #52525b; + --text-tertiary: #a1a1aa; - --accent-primary: #3b82f6; - --accent-primary-hover: #2563eb; - --accent-success: #22c55e; + --accent-primary: #18181b; + --accent-primary-hover: #000000; + --accent-success: #10b981; --accent-warning: #f59e0b; --accent-error: #ef4444; - --border-default: rgba(0, 0, 0, 0.1); - --border-strong: rgba(0, 0, 0, 0.2); + --border-default: #e4e4e7; + --border-strong: #d4d4d8; /* Glass Effects */ - --glass-bg: rgba(255, 255, 255, 0.7); - --glass-border: rgba(255, 255, 255, 0.3); - --glass-blur: 20px; - --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); + --glass-bg: rgba(255, 255, 255, 0.8); + --glass-border: rgba(0, 0, 0, 0.05); + --glass-blur: 12px; + --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Brand */ - --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); + --brand-gradient: #18181b; + /* Solid black for light mode */ /* Typography */ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; @@ -59,36 +60,64 @@ /* Border Radius */ --radius-sm: 0.25rem; - --radius-md: 0.5rem; - --radius-lg: 0.75rem; - --radius-xl: 1rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; --radius-full: 9999px; /* Transitions */ - --transition-fast: 150ms ease; - --transition-normal: 250ms ease; + --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1); + --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1); /* Sidebar */ - --sidebar-width: 280px; + --sidebar-width: 260px; } /* Dark Mode */ [data-theme="dark"] { - --bg-primary: #000000; - --bg-secondary: #1c1c1e; - --bg-tertiary: #2c2c2e; - --bg-elevated: #1c1c1e; + --bg-primary: #09090b; + --bg-secondary: #18181b; + --bg-tertiary: #27272a; + --bg-elevated: #18181b; - --text-primary: #f5f5f7; - --text-secondary: #a1a1a6; - --text-tertiary: #6e6e73; + --text-primary: #fafafa; + --text-secondary: #a1a1aa; + --text-tertiary: #71717a; - --border-default: rgba(255, 255, 255, 0.1); - --border-strong: rgba(255, 255, 255, 0.2); + --accent-primary: #fafafa; + --accent-primary-hover: #ffffff; - --glass-bg: rgba(28, 28, 30, 0.8); + --border-default: #27272a; + --border-strong: #3f3f46; + + --glass-bg: rgba(24, 24, 27, 0.8); --glass-border: rgba(255, 255, 255, 0.1); - --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); + --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); + + --brand-gradient: #fafafa; + /* Solid white for dark mode */ +} + +/* MudBlazor Overrides for Monochrome Nav */ +.mud-nav-link { + border-radius: var(--radius-md) !important; + transition: all var(--transition-fast) !important; + color: var(--text-secondary) !important; +} + +.mud-nav-link:hover { + background-color: var(--bg-tertiary) !important; + color: var(--text-primary) !important; +} + +.mud-nav-link.active { + background-color: var(--accent-primary) !important; + color: var(--bg-primary) !important; + /* Invert text color on active */ +} + +.mud-nav-link.active .mud-icon-root { + color: var(--bg-primary) !important; } /* ═══════════════════════════════════════════════════════════════════════════════ diff --git a/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/index.html b/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/index.html index 5b372c49..8c6b3b28 100644 --- a/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/index.html +++ b/apps/web-client-base-net/src/WebClientBase.Client/wwwroot/index.html @@ -6,19 +6,23 @@ GoodGo Web Client Base - - - - - + + + + + + + - - + + - + @@ -28,38 +32,61 @@
- - -
- - - + + +
+ + + -

Loading GoodGo... / Đang tải...

+

Loading GoodGo...

- +
-