Yuyuqt commited on
Commit
d3d3b46
·
1 Parent(s): 6f32ae8

add: home page and top nav bar for unauthorized view

Browse files
Backend/dotnet-tools.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 1,
3
+ "isRoot": true,
4
+ "tools": {
5
+ "dotnet-ef": {
6
+ "version": "10.0.7",
7
+ "commands": [
8
+ "dotnet-ef"
9
+ ],
10
+ "rollForward": false
11
+ }
12
+ }
13
+ }
BlazorWebAssembly/Layout/MainLayout.razor CHANGED
@@ -4,93 +4,111 @@
4
  @inject ThemeService ThemeService
5
  @inject AuthenticationStateProvider AuthStateProvider
6
 
7
- <div class="flex h-screen overflow-hidden bg-body text-main animate-fade font-sans">
8
- <!-- Sidebar (Hidden on mobile) -->
9
- <aside class="hidden lg:flex lg:w-64 lg:flex-col lg:fixed lg:inset-y-0 z-50 border-r border-border bg-card">
10
- <div class="flex flex-col flex-grow pt-8 pb-4 overflow-y-auto">
11
- <!-- Brand -->
12
- <div class="flex items-center flex-shrink-0 px-6 gap-3 mb-10">
13
- <div class="bg-primary rounded-xl p-2 text-white shadow-lg shadow-primary/20">
14
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16 6 4 14"/><path d="M12 6v14"/><path d="M8 8v12"/><path d="M4 4v16"/><path d="M4 12V4l4 4"/><path d="m12 6 4 4"/></svg>
15
- </div>
16
- <span class="text-xl font-black tracking-tighter uppercase">LibraryLuxe</span>
17
- </div>
18
-
19
- <!-- Navigation -->
20
- <div class="flex-grow px-3">
21
- <NavMenu />
22
- </div>
23
-
24
- <!-- Theme & User Mini Profile -->
25
- <div class="px-6 py-6 border-t border-border">
26
- <div class="mb-6">
27
- <p class="text-[10px] font-black text-muted uppercase tracking-[0.2em] mb-4 text-center">Switch Theme</p>
28
- <ThemeSwitcher />
29
- </div>
30
-
31
- <AuthorizeView>
32
- <Authorized>
33
  <div class="flex items-center gap-3 p-3 bg-body rounded-2xl border border-border">
34
  <div class="h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white font-bold shadow-sm">
35
- @context.User.Identity?.Name?[..1].ToUpper()
36
  </div>
37
  <div class="flex flex-col min-w-0">
38
  <span class="text-xs font-bold truncate">@context.User.Identity?.Name</span>
39
  <span class="text-[10px] text-muted font-medium uppercase tracking-wider">Member</span>
40
  </div>
41
  </div>
42
- </Authorized>
43
- <NotAuthorized>
44
- <div class="flex items-center gap-3 p-3 bg-body rounded-2xl border border-border">
45
- <div class="h-10 w-10 rounded-xl bg-muted/20 flex items-center justify-center text-muted font-bold">
46
- G
47
- </div>
48
- <div class="flex flex-col">
49
- <span class="text-xs font-bold text-muted">Guest User</span>
50
- <a href="login" class="text-[10px] text-primary font-black uppercase tracking-wider hover:underline">Sign In</a>
51
- </div>
52
- </div>
53
- </NotAuthorized>
54
- </AuthorizeView>
55
- </div>
56
- </div>
57
- </aside>
58
-
59
- <!-- Main Content Wrapper -->
60
- <div class="lg:pl-64 flex flex-col flex-1 w-0">
61
- <!-- Topbar -->
62
- <header class="h-20 bg-card/80 backdrop-blur-md border-b border-border sticky top-0 z-40 flex items-center justify-between px-8">
63
- <div class="flex-grow max-w-lg">
64
- <div class="relative">
65
- <svg class="absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
66
- <input type="text" placeholder="Quick search..." class="w-full bg-body border border-border rounded-xl pl-12 pr-4 py-2.5 text-sm focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all shadow-sm" />
67
  </div>
68
- </div>
69
 
70
- <div class="flex items-center gap-6">
71
- <AuthorizeView>
72
- <Authorized>
 
 
 
 
 
 
73
  <button class="relative text-muted hover:text-primary transition-colors">
74
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path></svg>
75
  <span class="absolute top-0 right-0 w-2 h-2 bg-primary rounded-full border-2 border-card"></span>
76
  </button>
77
  <a href="/logout" class="text-xs font-black uppercase tracking-widest text-muted hover:text-red-500 transition-colors">Logout</a>
78
- </Authorized>
79
- <NotAuthorized>
80
- <a href="/login" class="bg-primary text-white px-6 py-2 rounded-xl text-xs font-black uppercase tracking-widest hover:bg-primary-hover shadow-lg shadow-primary/20 transition-all">Sign In</a>
81
- </NotAuthorized>
82
- </AuthorizeView>
 
 
83
  </div>
84
- </header>
85
-
86
- <!-- Main Content Section -->
87
- <main class="flex-1 overflow-y-auto p-8 scrollbar-hide">
88
- <div class="max-w-6xl mx-auto">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  @Body
90
- </div>
91
- </main>
92
- </div>
93
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  @code {
96
  protected override async Task OnInitializedAsync()
 
4
  @inject ThemeService ThemeService
5
  @inject AuthenticationStateProvider AuthStateProvider
6
 
7
+ <AuthorizeView>
8
+ <Authorized>
9
+ <div class="flex h-screen overflow-hidden bg-body text-main animate-fade font-sans">
10
+ <!-- Sidebar (Dashboard View) -->
11
+ <aside class="hidden lg:flex lg:w-64 lg:flex-col lg:fixed lg:inset-y-0 z-50 border-r border-border bg-card">
12
+ <div class="flex flex-col flex-grow pt-8 pb-4 overflow-y-auto">
13
+ <div class="flex items-center flex-shrink-0 px-6 gap-3 mb-10">
14
+ <div class="bg-primary rounded-xl p-2 text-white shadow-lg shadow-primary/20">
15
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16 6 4 14"/><path d="M12 6v14"/><path d="M8 8v12"/><path d="M4 4v16"/><path d="M4 12V4l4 4"/><path d="m12 6 4 4"/></svg>
16
+ </div>
17
+ <span class="text-xl font-black tracking-tighter uppercase">LibraryLuxe</span>
18
+ </div>
19
+ <div class="flex-grow px-3">
20
+ <NavMenu />
21
+ </div>
22
+ <div class="px-6 py-6 border-t border-border">
23
+ <div class="mb-6">
24
+ <p class="text-[10px] font-black text-muted uppercase tracking-[0.2em] mb-4 text-center">Switch Theme</p>
25
+ <ThemeSwitcher />
26
+ </div>
 
 
 
 
 
 
27
  <div class="flex items-center gap-3 p-3 bg-body rounded-2xl border border-border">
28
  <div class="h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white font-bold shadow-sm">
29
+ @(context.User.Identity?.Name?.Length > 0 ? context.User.Identity.Name[..1].ToUpper() : "?")
30
  </div>
31
  <div class="flex flex-col min-w-0">
32
  <span class="text-xs font-bold truncate">@context.User.Identity?.Name</span>
33
  <span class="text-[10px] text-muted font-medium uppercase tracking-wider">Member</span>
34
  </div>
35
  </div>
36
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  </div>
38
+ </aside>
39
 
40
+ <div class="lg:pl-64 flex flex-col flex-1 w-0">
41
+ <header class="h-20 bg-card/80 backdrop-blur-md border-b border-border sticky top-0 z-40 flex items-center justify-between px-8">
42
+ <div class="flex-grow max-w-lg">
43
+ <div class="relative">
44
+ <svg class="absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
45
+ <input type="text" placeholder="Quick search..." class="w-full bg-body border border-border rounded-xl pl-12 pr-4 py-2.5 text-sm focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all shadow-sm" />
46
+ </div>
47
+ </div>
48
+ <div class="flex items-center gap-6">
49
  <button class="relative text-muted hover:text-primary transition-colors">
50
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path></svg>
51
  <span class="absolute top-0 right-0 w-2 h-2 bg-primary rounded-full border-2 border-card"></span>
52
  </button>
53
  <a href="/logout" class="text-xs font-black uppercase tracking-widest text-muted hover:text-red-500 transition-colors">Logout</a>
54
+ </div>
55
+ </header>
56
+ <main class="flex-1 overflow-y-auto p-8 scrollbar-hide">
57
+ <div class="max-w-6xl mx-auto">
58
+ @Body
59
+ </div>
60
+ </main>
61
  </div>
62
+ </div>
63
+ </Authorized>
64
+ <NotAuthorized>
65
+ <div class="min-h-screen bg-body text-main animate-fade font-sans flex flex-col">
66
+ <!-- Top Navbar (Guest View) -->
67
+ <nav class="h-20 bg-card/80 backdrop-blur-md border-b border-border sticky top-0 z-50 px-8 flex items-center justify-between shadow-sm">
68
+ <div class="flex items-center gap-10">
69
+ <a href="/" class="flex items-center gap-3 group">
70
+ <div class="bg-primary rounded-xl p-2 text-white shadow-lg shadow-primary/20 group-hover:scale-110 transition-transform">
71
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16 6 4 14"/><path d="M12 6v14"/><path d="M8 8v12"/><path d="M4 4v16"/><path d="M4 12V4l4 4"/><path d="m12 6 4 4"/></svg>
72
+ </div>
73
+ <span class="text-xl font-black tracking-tighter uppercase">LibraryLuxe</span>
74
+ </a>
75
+ <div class="hidden md:flex items-center gap-8">
76
+ <NavLink href="/" Match="NavLinkMatch.All" class="text-xs font-black uppercase tracking-widest text-muted hover:text-primary transition-colors">Home</NavLink>
77
+ <NavLink href="/books" class="text-xs font-black uppercase tracking-widest text-muted hover:text-primary transition-colors">Books</NavLink>
78
+ <NavLink href="/about" class="text-xs font-black uppercase tracking-widest text-muted hover:text-primary transition-colors">About Us</NavLink>
79
+ <NavLink href="/contact" class="text-xs font-black uppercase tracking-widest text-muted hover:text-primary transition-colors">Contact</NavLink>
80
+ </div>
81
+ </div>
82
+ <div class="flex items-center gap-6">
83
+ <ThemeSwitcher />
84
+ <div class="h-6 w-px bg-border hidden sm:block"></div>
85
+ <div class="flex items-center gap-4">
86
+ <a href="/login" class="text-xs font-black uppercase tracking-widest text-muted hover:text-primary transition-colors">Sign In</a>
87
+ <a href="/register" class="bg-primary text-white px-6 py-2.5 rounded-xl text-xs font-black uppercase tracking-widest hover:bg-primary-hover shadow-lg shadow-primary/20 transition-all transform hover:scale-105">Get Started</a>
88
+ </div>
89
+ </div>
90
+ </nav>
91
+ <main class="flex-grow">
92
  @Body
93
+ </main>
94
+ <footer class="py-12 border-t border-border bg-card">
95
+ <div class="max-w-6xl mx-auto px-8 flex flex-col md:flex-row justify-between items-center gap-8">
96
+ <div class="flex items-center gap-3 opacity-50 grayscale">
97
+ <div class="bg-main rounded-lg p-1.5 text-bg-body">
98
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16 6 4 14"/><path d="M12 6v14"/><path d="M8 8v12"/><path d="M4 4v16"/><path d="M4 12V4l4 4"/><path d="m12 6 4 4"/></svg>
99
+ </div>
100
+ <span class="text-sm font-black tracking-tighter uppercase">LibraryLuxe</span>
101
+ </div>
102
+ <p class="text-[10px] font-bold text-muted uppercase tracking-[0.2em]">&copy; 2026 LibraryLuxe Ecosystem. All rights reserved.</p>
103
+ <div class="flex gap-6">
104
+ <a href="#" class="text-[10px] font-black uppercase tracking-widest text-muted hover:text-primary">Privacy</a>
105
+ <a href="#" class="text-[10px] font-black uppercase tracking-widest text-muted hover:text-primary">Terms</a>
106
+ </div>
107
+ </div>
108
+ </footer>
109
+ </div>
110
+ </NotAuthorized>
111
+ </AuthorizeView>
112
 
113
  @code {
114
  protected override async Task OnInitializedAsync()
BlazorWebAssembly/Layout/NavMenu.razor CHANGED
@@ -4,36 +4,36 @@
4
  Dashboard
5
  </NavLink>
6
 
7
- <NavLink class="nav-link-v" href="books">
8
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18 18.246 18.477 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg>
9
  Books Catalog
10
  </NavLink>
11
 
12
  <AuthorizeView Roles="Member">
13
- <NavLink class="nav-link-v" href="borrowings">
14
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg>
15
  My Loans
16
  </NavLink>
17
- <NavLink class="nav-link-v" href="rewards">
18
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"></path></svg>
19
  Rewards
20
  </NavLink>
21
- <NavLink class="nav-link-v" href="membership">
22
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"></path></svg>
23
  Plans
24
  </NavLink>
25
- <NavLink class="nav-link-v" href="wishlist">
26
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg>
27
  Wishlist
28
  </NavLink>
29
  </AuthorizeView>
30
 
31
  <AuthorizeView Roles="Librarian">
32
- <NavLink class="nav-link-v" href="user-insights">
33
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path></svg>
34
  Insights
35
  </NavLink>
36
- <NavLink class="nav-link-v" href="members">
37
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
38
  Members
39
  </NavLink>
 
4
  Dashboard
5
  </NavLink>
6
 
7
+ <NavLink class="nav-link-v" href="/books">
8
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18 18.246 18.477 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg>
9
  Books Catalog
10
  </NavLink>
11
 
12
  <AuthorizeView Roles="Member">
13
+ <NavLink class="nav-link-v" href="/borrowings">
14
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg>
15
  My Loans
16
  </NavLink>
17
+ <NavLink class="nav-link-v" href="/rewards">
18
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"></path></svg>
19
  Rewards
20
  </NavLink>
21
+ <NavLink class="nav-link-v" href="/membership">
22
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"></path></svg>
23
  Plans
24
  </NavLink>
25
+ <NavLink class="nav-link-v" href="/wishlist">
26
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg>
27
  Wishlist
28
  </NavLink>
29
  </AuthorizeView>
30
 
31
  <AuthorizeView Roles="Librarian">
32
+ <NavLink class="nav-link-v" href="/user-insights">
33
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path></svg>
34
  Insights
35
  </NavLink>
36
+ <NavLink class="nav-link-v" href="/members">
37
  <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
38
  Members
39
  </NavLink>
BlazorWebAssembly/Layout/ThemeSwitcher.razor CHANGED
@@ -15,7 +15,7 @@
15
  <button @onclick='() => SetTheme("emerald")'
16
  class='w-9 h-9 rounded-xl flex items-center justify-center transition-all @(CurrentTheme == "emerald" ? "bg-card text-primary shadow-sm shadow-primary/10" : "text-muted hover:text-primary")'
17
  title="Emerald Mode">
18
- <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg>
19
  </button>
20
  </div>
21
 
 
15
  <button @onclick='() => SetTheme("emerald")'
16
  class='w-9 h-9 rounded-xl flex items-center justify-center transition-all @(CurrentTheme == "emerald" ? "bg-card text-primary shadow-sm shadow-primary/10" : "text-muted hover:text-primary")'
17
  title="Emerald Mode">
18
+ <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 2c-3.144 0-10.231 2.37-13.435 5.759a11.13 11.13 0 0 0-2.457 4.22c-1.343 3.51-.557 6.455 1.574 8.586m14.318-18.565C21 5.144 18.63 12.23 15.241 15.435a11.13 11.13 0 0 1-4.22 2.457c-3.51 1.343-6.455.557-8.586-1.574m18.565-14.318L2 22"></path></svg>
19
  </button>
20
  </div>
21
 
BlazorWebAssembly/Pages/About.razor ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/about"
2
+
3
+ <div class="max-w-4xl mx-auto py-24 px-8 animate-fade">
4
+ <div class="text-center mb-16">
5
+ <h1 class="text-6xl font-black tracking-tighter text-main mb-6 uppercase">Our Story</h1>
6
+ <p class="text-xl text-muted leading-relaxed">Redefining the relationship between readers and literature through technology and community.</p>
7
+ </div>
8
+
9
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-16 items-center">
10
+ <div class="space-y-8">
11
+ <h2 class="text-3xl font-black text-main tracking-tight">A Library without Borders.</h2>
12
+ <p class="text-muted leading-relaxed">Founded in 2024, LibraryLuxe was born from a simple idea: that books should be accessible, organized, and rewarding. We've built a system that doesn't just manage inventory, but fosters a culture of reading.</p>
13
+ <div class="flex gap-4">
14
+ <div class="w-px h-12 bg-primary"></div>
15
+ <p class="italic text-main font-medium">"Reading is the ultimate superpower. We just provide the cape."</p>
16
+ </div>
17
+ </div>
18
+ <div class="bg-card aspect-square rounded-[3rem] border border-border shadow-2xl flex items-center justify-center p-12">
19
+ <div class="w-full h-full rounded-2xl bg-primary/5 border border-primary/20 flex items-center justify-center">
20
+ <svg class="w-24 h-24 text-primary opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18 18.246 18.477 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
BlazorWebAssembly/Pages/Borrowings.razor CHANGED
@@ -13,9 +13,9 @@
13
  Keep track of your reading journey and manage your active borrowings.
14
  </p>
15
  </div>
16
- <button @onclick='() => Navigation.NavigateTo("books")' class="hidden md:block bg-body text-main border border-border px-8 py-3 rounded-xl font-bold hover:bg-card transition-all">
17
  Browse More
18
- </button>
19
  </div>
20
 
21
  @if (_isLoading)
@@ -32,9 +32,9 @@
32
  <div class="text-center py-24 bg-card rounded-[2.5rem] border border-dashed border-border shadow-sm">
33
  <h3 class="text-2xl font-bold text-main mb-3">No active loans</h3>
34
  <p class="text-muted mb-8">You haven't borrowed any books yet. Explore our collection to get started.</p>
35
- <button @onclick='() => Navigation.NavigateTo("books")' class="bg-primary text-white px-10 py-4 rounded-xl font-black hover:bg-primary-hover transition-all shadow-lg shadow-primary/20">
36
  Go to Catalog
37
- </button>
38
  </div>
39
  }
40
  else
 
13
  Keep track of your reading journey and manage your active borrowings.
14
  </p>
15
  </div>
16
+ <a href="/books" class="hidden md:block bg-body text-main border border-border px-8 py-3 rounded-xl font-bold hover:bg-card transition-all text-center">
17
  Browse More
18
+ </a>
19
  </div>
20
 
21
  @if (_isLoading)
 
32
  <div class="text-center py-24 bg-card rounded-[2.5rem] border border-dashed border-border shadow-sm">
33
  <h3 class="text-2xl font-bold text-main mb-3">No active loans</h3>
34
  <p class="text-muted mb-8">You haven't borrowed any books yet. Explore our collection to get started.</p>
35
+ <a href="/books" class="bg-primary text-white px-10 py-4 rounded-xl font-black hover:bg-primary-hover transition-all shadow-lg shadow-primary/20 inline-block text-center">
36
  Go to Catalog
37
+ </a>
38
  </div>
39
  }
40
  else
BlazorWebAssembly/Pages/Contact.razor ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/contact"
2
+
3
+ <div class="max-w-6xl mx-auto py-24 px-8 animate-fade">
4
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-24">
5
+ <div>
6
+ <h1 class="text-6xl font-black tracking-tighter text-main mb-8 uppercase">Get in <br /><span class="text-primary italic">Touch.</span></h1>
7
+ <p class="text-xl text-muted leading-relaxed mb-12">Have questions about our membership plans or need help with your account? Our librarians are here to help.</p>
8
+
9
+ <div class="space-y-8">
10
+ <div class="flex items-center gap-6">
11
+ <div class="w-14 h-14 bg-primary/10 rounded-2xl flex items-center justify-center text-primary">
12
+ <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg>
13
+ </div>
14
+ <div>
15
+ <p class="text-[10px] font-black text-muted uppercase tracking-widest mb-1">Email Us</p>
16
+ <p class="text-lg font-bold text-main">hello@libraryluxe.com</p>
17
+ </div>
18
+ </div>
19
+ <div class="flex items-center gap-6">
20
+ <div class="w-14 h-14 bg-primary/10 rounded-2xl flex items-center justify-center text-primary">
21
+ <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
22
+ </div>
23
+ <div>
24
+ <p class="text-[10px] font-black text-muted uppercase tracking-widest mb-1">Visit Us</p>
25
+ <p class="text-lg font-bold text-main">123 Literature Lane, Booktown</p>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="bg-card p-10 rounded-[3rem] border border-border shadow-2xl">
32
+ <form class="space-y-6">
33
+ <div>
34
+ <label class="block text-[10px] font-black text-muted uppercase tracking-[0.2em] mb-3">Your Name</label>
35
+ <input type="text" class="w-full bg-body border border-border rounded-xl px-4 py-4 focus:ring-2 focus:ring-primary outline-none transition-all" placeholder="John Doe" />
36
+ </div>
37
+ <div>
38
+ <label class="block text-[10px] font-black text-muted uppercase tracking-[0.2em] mb-3">Email Address</label>
39
+ <input type="email" class="w-full bg-body border border-border rounded-xl px-4 py-4 focus:ring-2 focus:ring-primary outline-none transition-all" placeholder="name@example.com" />
40
+ </div>
41
+ <div>
42
+ <label class="block text-[10px] font-black text-muted uppercase tracking-[0.2em] mb-3">Message</label>
43
+ <textarea rows="4" class="w-full bg-body border border-border rounded-xl px-4 py-4 focus:ring-2 focus:ring-primary outline-none transition-all" placeholder="How can we help?"></textarea>
44
+ </div>
45
+ <button type="button" class="w-full py-5 bg-primary text-white rounded-xl font-black uppercase tracking-widest hover:bg-primary-hover shadow-lg shadow-primary/20 transition-all">Send Message</button>
46
+ </form>
47
+ </div>
48
+ </div>
49
+ </div>
BlazorWebAssembly/Pages/Home.razor CHANGED
@@ -44,7 +44,7 @@
44
  <p class="text-[10px] font-black text-muted uppercase tracking-widest mb-4">Membership</p>
45
  <h3 class="text-2xl font-black text-main mb-1 uppercase">Premium Gold</h3>
46
  <p class="text-xs text-muted mb-6">Active Status</p>
47
- <button @onclick='() => Navigation.NavigateTo("membership")' class="text-xs font-black text-primary uppercase tracking-widest hover:underline">Manage Plan</button>
48
  </div>
49
  </div>
50
 
@@ -59,7 +59,6 @@
59
  </section>
60
  </div>
61
  </Authorized>
62
-
63
  <NotAuthorized>
64
  <!-- Guest Landing Page -->
65
  <div class="space-y-24 animate-fade py-12">
@@ -72,12 +71,12 @@
72
  Join over 5,000 readers in a digital-first library experience. Access a global collection of literature, earn rewards for reading, and connect with fellow book lovers.
73
  </p>
74
  <div class="flex items-center justify-center gap-6">
75
- <button @onclick='() => Navigation.NavigateTo("register")' class="bg-primary text-white px-10 py-5 rounded-2xl font-black text-lg hover:bg-primary-hover shadow-xl shadow-primary/20 transition-all transform hover:scale-105">
76
  Start Reading Now
77
- </button>
78
- <button @onclick='() => Navigation.NavigateTo("books")' class="bg-card border border-border text-main px-10 py-5 rounded-2xl font-black text-lg hover:bg-body transition-all">
79
  Explore Catalog
80
- </button>
81
  </div>
82
  </section>
83
 
@@ -131,6 +130,7 @@
131
  </NotAuthorized>
132
  </AuthorizeView>
133
 
 
134
  @code {
135
  private LoyaltyAccountDto? _loyaltyAccount;
136
 
 
44
  <p class="text-[10px] font-black text-muted uppercase tracking-widest mb-4">Membership</p>
45
  <h3 class="text-2xl font-black text-main mb-1 uppercase">Premium Gold</h3>
46
  <p class="text-xs text-muted mb-6">Active Status</p>
47
+ <a href="/membership" class="text-xs font-black text-primary uppercase tracking-widest hover:underline">Manage Plan</a>
48
  </div>
49
  </div>
50
 
 
59
  </section>
60
  </div>
61
  </Authorized>
 
62
  <NotAuthorized>
63
  <!-- Guest Landing Page -->
64
  <div class="space-y-24 animate-fade py-12">
 
71
  Join over 5,000 readers in a digital-first library experience. Access a global collection of literature, earn rewards for reading, and connect with fellow book lovers.
72
  </p>
73
  <div class="flex items-center justify-center gap-6">
74
+ <a href="/register" class="bg-primary text-white px-10 py-5 rounded-2xl font-black text-lg hover:bg-primary-hover shadow-xl shadow-primary/20 transition-all transform hover:scale-105 inline-block text-center">
75
  Start Reading Now
76
+ </a>
77
+ <a href="/books" class="bg-card border border-border text-main px-10 py-5 rounded-2xl font-black text-lg hover:bg-body transition-all inline-block text-center">
78
  Explore Catalog
79
+ </a>
80
  </div>
81
  </section>
82
 
 
130
  </NotAuthorized>
131
  </AuthorizeView>
132
 
133
+
134
  @code {
135
  private LoyaltyAccountDto? _loyaltyAccount;
136
 
BlazorWebAssembly/Pages/Login.razor CHANGED
@@ -59,7 +59,7 @@
59
  <!-- Footer -->
60
  <p class="text-center mt-10 text-muted font-medium">
61
  Don't have an account?
62
- <button @onclick='() => Navigation.NavigateTo("register")' class="text-primary font-bold hover:underline">Create Account</button>
63
  </p>
64
  </div>
65
  </div>
 
59
  <!-- Footer -->
60
  <p class="text-center mt-10 text-muted font-medium">
61
  Don't have an account?
62
+ <a href="/register" class="text-primary font-bold hover:underline">Create Account</a>
63
  </p>
64
  </div>
65
  </div>
BlazorWebAssembly/Pages/Logout.razor ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/logout"
2
+ @using BlazorWebAssembly.Services
3
+ @inject AuthService AuthService
4
+ @inject NavigationManager Navigation
5
+
6
+ <div class="min-h-[60vh] flex items-center justify-center p-8">
7
+ <div class="text-center">
8
+ <div class="w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center mx-auto mb-6">
9
+ <div class="w-6 h-6 border-4 border-primary border-t-transparent rounded-full animate-spin"></div>
10
+ </div>
11
+ <h2 class="text-2xl font-black text-main mb-2">Signing Out</h2>
12
+ <p class="text-muted font-medium">Please wait while we secure your session...</p>
13
+ </div>
14
+ </div>
15
+
16
+ @code {
17
+ protected override async Task OnInitializedAsync()
18
+ {
19
+ await AuthService.Logout();
20
+ // Brief delay for UX/Smoothness
21
+ await Task.Delay(800);
22
+ Navigation.NavigateTo("/login");
23
+ }
24
+ }
BlazorWebAssembly/Pages/Register.razor CHANGED
@@ -72,7 +72,7 @@
72
  <!-- Footer -->
73
  <p class="text-center mt-10 text-muted font-medium">
74
  Already have an account?
75
- <button @onclick='() => Navigation.NavigateTo("login")' class="text-primary font-bold hover:underline">Sign In</button>
76
  </p>
77
  </div>
78
  </div>
 
72
  <!-- Footer -->
73
  <p class="text-center mt-10 text-muted font-medium">
74
  Already have an account?
75
+ <a href="/login" class="text-primary font-bold hover:underline">Sign In</a>
76
  </p>
77
  </div>
78
  </div>
BlazorWebAssembly/Pages/Wishlist.razor CHANGED
@@ -27,9 +27,9 @@
27
  <div class="text-center py-24 bg-card rounded-[2.5rem] border border-dashed border-border">
28
  <h3 class="text-2xl font-bold text-main mb-4">Your wishlist is empty</h3>
29
  <p class="text-muted mb-8">Found a book that's currently borrowed? Add it to your wishlist!</p>
30
- <button @onclick='() => Navigation.NavigateTo("books")' class="bg-primary text-white px-10 py-4 rounded-xl font-black hover:bg-primary-hover transition-all shadow-lg shadow-primary/20">
31
- Browse Books
32
- </button>
33
  </div>
34
  }
35
  else
 
27
  <div class="text-center py-24 bg-card rounded-[2.5rem] border border-dashed border-border">
28
  <h3 class="text-2xl font-bold text-main mb-4">Your wishlist is empty</h3>
29
  <p class="text-muted mb-8">Found a book that's currently borrowed? Add it to your wishlist!</p>
30
+ <a href="/books" class="bg-primary text-white px-10 py-4 rounded-xl font-black hover:bg-primary-hover transition-all shadow-lg shadow-primary/20 inline-block text-center">
31
+ Go to Catalog
32
+ </a>
33
  </div>
34
  }
35
  else