Yuyuqt commited on
Commit
cf599e0
·
1 Parent(s): ad67295

add: blazorfrontend

Browse files
BlazorFrontend/BlazorFrontend.csproj ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ <Project Sdk="Microsoft.NET.Sdk.Web">
2
+
3
+ <PropertyGroup>
4
+ <TargetFramework>net8.0</TargetFramework>
5
+ <Nullable>enable</Nullable>
6
+ <ImplicitUsings>enable</ImplicitUsings>
7
+ </PropertyGroup>
8
+
9
+ </Project>
BlazorFrontend/Components/App.razor ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="h-full bg-slate-50">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <base href="/" />
8
+
9
+ <!-- Google Fonts: Inter -->
10
+ <link rel="preconnect" href="https://fonts.googleapis.com">
11
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
13
+
14
+ <!-- Tailwind CSS Play CDN -->
15
+ <script src="https://cdn.tailwindcss.com"></script>
16
+ <script>
17
+ tailwind.config = {
18
+ theme: {
19
+ extend: {
20
+ fontFamily: {
21
+ sans: ['Inter', 'sans-serif'],
22
+ },
23
+ colors: {
24
+ primary: {
25
+ 50: '#f8fafc',
26
+ 100: '#f1f5f9',
27
+ 200: '#e2e8f0',
28
+ 300: '#cbd5e1',
29
+ 400: '#94a3b8',
30
+ 500: '#64748b',
31
+ 600: '#475569',
32
+ 700: '#334155',
33
+ 800: '#1e293b',
34
+ 900: '#0f172a',
35
+ 950: '#020617',
36
+ },
37
+ },
38
+ }
39
+ }
40
+ }
41
+ </script>
42
+
43
+ <style type="text/tailwindcss">
44
+ @@layer base {
45
+ body { @@apply text-slate-900 antialiased h-full; }
46
+ }
47
+ @@layer components {
48
+ .nav-link { @@apply flex items-center gap-3 px-3 py-2 text-sm font-medium rounded-md transition-colors text-slate-600 hover:text-slate-900 hover:bg-slate-100; }
49
+ .nav-link.active { @@apply bg-slate-900 text-white hover:bg-slate-900 hover:text-white; }
50
+
51
+ .card { @@apply bg-white border border-slate-200 rounded-xl shadow-sm overflow-hidden; }
52
+ .btn-primary { @@apply inline-flex items-center justify-center rounded-md bg-slate-900 px-4 py-2 text-sm font-medium text-white shadow transition-colors hover:bg-slate-900/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:pointer-events-none disabled:opacity-50; }
53
+ .btn-secondary { @@apply inline-flex items-center justify-center rounded-md border border-slate-200 bg-white px-4 py-2 text-sm font-medium shadow-sm transition-colors hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:pointer-events-none disabled:opacity-50; }
54
+ }
55
+ </style>
56
+
57
+ <link rel="icon" type="image/png" href="favicon.png" />
58
+ <HeadOutlet />
59
+ </head>
60
+
61
+ <body class="h-full">
62
+ <Routes />
63
+ <script src="_framework/blazor.web.js"></script>
64
+
65
+ <!-- Toast Notification Container -->
66
+ <div id="toast-container" class="fixed bottom-5 right-5 z-[100] flex flex-col gap-3 pointer-events-none"></div>
67
+
68
+ <script>
69
+ function showToast(message, type = 'success') {
70
+ const container = document.getElementById('toast-container');
71
+ const toast = document.createElement('div');
72
+
73
+ const bgColor = type === 'success' ? 'bg-slate-900' : 'bg-red-600';
74
+ const icon = type === 'success'
75
+ ? '<svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'
76
+ : '<svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>';
77
+
78
+ toast.className = `${bgColor} text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 transition-all duration-300 transform translate-y-10 opacity-0 pointer-events-auto min-w-[250px]`;
79
+ toast.innerHTML = `
80
+ <div class="shrink-0">${icon}</div>
81
+ <div class="text-sm font-medium tracking-tight">${message}</div>
82
+ `;
83
+
84
+ container.appendChild(toast);
85
+
86
+ // Animate in
87
+ setTimeout(() => {
88
+ toast.classList.remove('translate-y-10', 'opacity-0');
89
+ }, 10);
90
+
91
+ // Remove after 3 seconds
92
+ setTimeout(() => {
93
+ toast.classList.add('translate-y-[-10px]', 'opacity-0');
94
+ setTimeout(() => toast.remove(), 300);
95
+ }, 3000);
96
+ }
97
+ </script>
98
+ </body>
99
+
100
+ </html>
BlazorFrontend/Components/Layout/MainLayout.razor ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @inherits LayoutComponentBase
2
+
3
+ <div class="flex h-full overflow-hidden">
4
+ <!-- Sidebar -->
5
+ <aside class="hidden md:flex md:w-64 md:flex-col md:fixed md:inset-y-0 z-50">
6
+ <div class="flex flex-col flex-grow border-r border-slate-200 bg-white pt-5 pb-4 overflow-y-auto">
7
+ <div class="flex items-center flex-shrink-0 px-4 gap-2">
8
+ <div class="bg-slate-900 rounded-lg p-1.5 text-white">
9
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" 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>
10
+ </div>
11
+ <span class="text-lg font-bold tracking-tight">Library OS</span>
12
+ </div>
13
+ <div class="mt-8 flex-grow flex flex-col">
14
+ <nav class="flex-1 px-2 space-y-1">
15
+ <NavLink href="" Match="NavLinkMatch.All" class="nav-link" ActiveClass="active">
16
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="15" rx="1"/></svg>
17
+ Dashboard
18
+ </NavLink>
19
+ <NavLink href="Books" class="nav-link" ActiveClass="active">
20
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/></svg>
21
+ Books Catalog
22
+ </NavLink>
23
+ <NavLink href="Borrowings" class="nav-link" ActiveClass="active">
24
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="m21 21-6-6m6 6v-4.8m0 4.8h-4.8"/><path d="M3 16.2V21m0 0h4.8M3 21l6-6"/><path d="M21 7.8V3m0 0h-4.8M21 3l-6 6"/><path d="M3 7.8V3m0 0h4.8M3 3l6 6"/></svg>
25
+ Active Loans
26
+ </NavLink>
27
+ <NavLink href="Membership" class="nav-link" ActiveClass="active">
28
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
29
+ My Membership
30
+ </NavLink>
31
+ <NavLink href="Rewards" class="nav-link" ActiveClass="active">
32
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/></svg>
33
+ Rewards
34
+ </NavLink>
35
+ <NavLink href="Members" class="nav-link" ActiveClass="active">
36
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
37
+ Members
38
+ </NavLink>
39
+ <NavLink href="Borrowings/Manage" class="nav-link" ActiveClass="active">
40
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="M11 15h2a2 2 0 1 0 0-4h-2a2 2 0 1 1 0-4h2"/><path d="M12 5v14"/><path d="M18 19V5l-4 4"/><circle cx="12" cy="12" r="10"/></svg>
41
+ Manage Borrowings
42
+ </NavLink>
43
+ <NavLink href="Rewards/Manage" class="nav-link" ActiveClass="active">
44
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-shrink-0 mr-3"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
45
+ Manage Rewards
46
+ </NavLink>
47
+ </nav>
48
+ </div>
49
+ <div class="px-4 py-4 border-t border-slate-100">
50
+ <div class="flex items-center gap-3">
51
+ <div class="h-8 w-8 rounded-full bg-slate-900 flex items-center justify-center text-white font-bold text-xs uppercase">
52
+ GU
53
+ </div>
54
+ <div class="flex flex-col">
55
+ <span class="text-sm font-medium">Guest User</span>
56
+ <span class="text-xs text-slate-500">Sign in to borrow</span>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </aside>
62
+
63
+ <!-- Main Content Wrapper -->
64
+ <div class="md:pl-64 flex flex-col flex-1 w-0">
65
+ <!-- Topbar -->
66
+ <header class="flex-shrink-0 flex h-16 bg-white border-b border-slate-200">
67
+ <div class="flex-1 px-4 flex justify-between">
68
+ <div class="flex-1 flex items-center">
69
+ <div class="w-full max-w-sm">
70
+ <label for="search" class="sr-only">Search</label>
71
+ <div class="relative">
72
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
73
+ <svg class="h-4 w-4 text-slate-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
74
+ <path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" />
75
+ </svg>
76
+ </div>
77
+ <input id="search" name="search" class="block w-full pl-10 pr-3 py-2 border border-slate-200 rounded-md leading-5 bg-slate-50 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-900 focus:border-slate-900 sm:text-sm transition-all" placeholder="Search books, authors, ISBN..." type="search">
78
+ </div>
79
+ </div>
80
+ </div>
81
+ <div class="ml-4 flex items-center md:ml-6 gap-4">
82
+ <button type="button" class="bg-white p-1 rounded-full text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-900">
83
+ <span class="sr-only">View notifications</span>
84
+ <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
85
+ <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" />
86
+ </svg>
87
+ </button>
88
+ <a href="/login" class="btn-primary py-1.5">Sign In</a>
89
+ </div>
90
+ </div>
91
+ </header>
92
+
93
+ <!-- Main Content -->
94
+ <main class="flex-1 relative overflow-y-auto focus:outline-none">
95
+ <div class="py-8 px-4 sm:px-6 md:px-8 max-w-7xl mx-auto">
96
+ @Body
97
+ </div>
98
+ </main>
99
+ </div>
100
+ </div>
101
+
102
+ <div id="blazor-error-ui" class="hidden">
103
+ An unhandled error has occurred.
104
+ <a href="" class="reload text-blue-500 hover:underline">Reload</a>
105
+ <a class="dismiss cursor-pointer">🗙</a>
106
+ </div>
BlazorFrontend/Components/Pages/Books.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Books"
2
+
3
+ <PageTitle>Books Catalog</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Books Catalog</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Browse and search our collection of books.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Books list will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/Borrowings.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Borrowings"
2
+
3
+ <PageTitle>Active Loans</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Active Loans</h1>
7
+ <p class="text-sm text-slate-500 mt-1">View your current borrowed books and due dates.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Borrowings list will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/BorrowingsManage.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Borrowings/Manage"
2
+
3
+ <PageTitle>Manage Borrowings</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Manage Borrowings</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Librarian view to manage all borrowings.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Borrowings management will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/Error.razor ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Error"
2
+ @using System.Diagnostics
3
+
4
+ <PageTitle>Error</PageTitle>
5
+
6
+ <h1 class="text-danger">Error.</h1>
7
+ <h2 class="text-danger">An error occurred while processing your request.</h2>
8
+
9
+ @if (ShowRequestId)
10
+ {
11
+ <p>
12
+ <strong>Request ID:</strong> <code>@RequestId</code>
13
+ </p>
14
+ }
15
+
16
+ <h3>Development Mode</h3>
17
+ <p>
18
+ Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
19
+ </p>
20
+ <p>
21
+ <strong>The Development environment shouldn't be enabled for deployed applications.</strong>
22
+ It can result in displaying sensitive information from exceptions to end users.
23
+ For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
24
+ and restarting the app.
25
+ </p>
26
+
27
+ @code{
28
+ [CascadingParameter]
29
+ private HttpContext? HttpContext { get; set; }
30
+
31
+ private string? RequestId { get; set; }
32
+ private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
33
+
34
+ protected override void OnInitialized() =>
35
+ RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
36
+ }
BlazorFrontend/Components/Pages/Home.razor ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/"
2
+
3
+ <PageTitle>Dashboard</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Dashboard</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Welcome back to the Library Management System.</p>
8
+ </div>
9
+
10
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
11
+ <div class="card p-6">
12
+ <h3 class="text-lg font-medium text-slate-900">Total Books</h3>
13
+ <p class="text-3xl font-bold text-slate-700 mt-2">--</p>
14
+ </div>
15
+ <div class="card p-6">
16
+ <h3 class="text-lg font-medium text-slate-900">Active Loans</h3>
17
+ <p class="text-3xl font-bold text-slate-700 mt-2">--</p>
18
+ </div>
19
+ <div class="card p-6">
20
+ <h3 class="text-lg font-medium text-slate-900">Members</h3>
21
+ <p class="text-3xl font-bold text-slate-700 mt-2">--</p>
22
+ </div>
23
+ </div>
BlazorFrontend/Components/Pages/Members.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Members"
2
+
3
+ <PageTitle>Members Directory</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Members</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Manage library members.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Members list will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/Membership.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Membership"
2
+
3
+ <PageTitle>My Membership</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">My Membership</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Manage your library membership details.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Membership details will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/Rewards.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Rewards"
2
+
3
+ <PageTitle>Rewards</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Rewards</h1>
7
+ <p class="text-sm text-slate-500 mt-1">View your earned rewards and points.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Rewards details will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Pages/RewardsManage.razor ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @page "/Rewards/Manage"
2
+
3
+ <PageTitle>Manage Rewards</PageTitle>
4
+
5
+ <div class="mb-6">
6
+ <h1 class="text-2xl font-bold text-slate-900">Manage Rewards</h1>
7
+ <p class="text-sm text-slate-500 mt-1">Librarian view to manage all rewards.</p>
8
+ </div>
9
+
10
+ <div class="card p-6">
11
+ <p class="text-slate-600">Rewards management will be displayed here.</p>
12
+ </div>
BlazorFrontend/Components/Routes.razor ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <Router AppAssembly="typeof(Program).Assembly">
2
+ <Found Context="routeData">
3
+ <RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
4
+ <FocusOnNavigate RouteData="routeData" Selector="h1" />
5
+ </Found>
6
+ </Router>
BlazorFrontend/Components/_Imports.razor ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ @using System.Net.Http
2
+ @using System.Net.Http.Json
3
+ @using Microsoft.AspNetCore.Components.Forms
4
+ @using Microsoft.AspNetCore.Components.Routing
5
+ @using Microsoft.AspNetCore.Components.Web
6
+ @using static Microsoft.AspNetCore.Components.Web.RenderMode
7
+ @using Microsoft.AspNetCore.Components.Web.Virtualization
8
+ @using Microsoft.JSInterop
9
+ @using BlazorFrontend
10
+ @using BlazorFrontend.Components
BlazorFrontend/Program.cs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using BlazorFrontend.Components;
2
+
3
+ var builder = WebApplication.CreateBuilder(args);
4
+
5
+ // Add services to the container.
6
+ builder.Services.AddRazorComponents()
7
+ .AddInteractiveServerComponents();
8
+
9
+ var app = builder.Build();
10
+
11
+ // Configure the HTTP request pipeline.
12
+ if (!app.Environment.IsDevelopment())
13
+ {
14
+ app.UseExceptionHandler("/Error", createScopeForErrors: true);
15
+ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
16
+ app.UseHsts();
17
+ }
18
+
19
+ app.UseHttpsRedirection();
20
+
21
+ app.UseStaticFiles();
22
+ app.UseAntiforgery();
23
+
24
+ app.MapRazorComponents<App>()
25
+ .AddInteractiveServerRenderMode();
26
+
27
+ app.Run();
BlazorFrontend/Properties/launchSettings.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "http://json.schemastore.org/launchsettings.json",
3
+ "iisSettings": {
4
+ "windowsAuthentication": false,
5
+ "anonymousAuthentication": true,
6
+ "iisExpress": {
7
+ "applicationUrl": "http://localhost:16185",
8
+ "sslPort": 44394
9
+ }
10
+ },
11
+ "profiles": {
12
+ "http": {
13
+ "commandName": "Project",
14
+ "dotnetRunMessages": true,
15
+ "launchBrowser": true,
16
+ "applicationUrl": "http://localhost:5135",
17
+ "environmentVariables": {
18
+ "ASPNETCORE_ENVIRONMENT": "Development"
19
+ }
20
+ },
21
+ "https": {
22
+ "commandName": "Project",
23
+ "dotnetRunMessages": true,
24
+ "launchBrowser": true,
25
+ "applicationUrl": "https://localhost:7144;http://localhost:5135",
26
+ "environmentVariables": {
27
+ "ASPNETCORE_ENVIRONMENT": "Development"
28
+ }
29
+ },
30
+ "IIS Express": {
31
+ "commandName": "IISExpress",
32
+ "launchBrowser": true,
33
+ "environmentVariables": {
34
+ "ASPNETCORE_ENVIRONMENT": "Development"
35
+ }
36
+ }
37
+ }
38
+ }
BlazorFrontend/appsettings.Development.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Logging": {
3
+ "LogLevel": {
4
+ "Default": "Information",
5
+ "Microsoft.AspNetCore": "Warning"
6
+ }
7
+ }
8
+ }
BlazorFrontend/appsettings.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Logging": {
3
+ "LogLevel": {
4
+ "Default": "Information",
5
+ "Microsoft.AspNetCore": "Warning"
6
+ }
7
+ },
8
+ "AllowedHosts": "*"
9
+ }
BlazorFrontend/wwwroot/app.css ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html, body {
2
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ }
4
+
5
+ a, .btn-link {
6
+ color: #006bb7;
7
+ }
8
+
9
+ .btn-primary {
10
+ color: #fff;
11
+ background-color: #1b6ec2;
12
+ border-color: #1861ac;
13
+ }
14
+
15
+ .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
16
+ box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
17
+ }
18
+
19
+ .content {
20
+ padding-top: 1.1rem;
21
+ }
22
+
23
+ h1:focus {
24
+ outline: none;
25
+ }
26
+
27
+ .valid.modified:not([type=checkbox]) {
28
+ outline: 1px solid #26b050;
29
+ }
30
+
31
+ .invalid {
32
+ outline: 1px solid #e50000;
33
+ }
34
+
35
+ .validation-message {
36
+ color: #e50000;
37
+ }
38
+
39
+ .blazor-error-boundary {
40
+ background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
41
+ padding: 1rem 1rem 1rem 3.7rem;
42
+ color: white;
43
+ }
44
+
45
+ .blazor-error-boundary::after {
46
+ content: "An error has occurred."
47
+ }
48
+
49
+ .darker-border-checkbox.form-check-input {
50
+ border-color: #929292;
51
+ }
BlazorFrontend/wwwroot/bootstrap/bootstrap.min.css ADDED
The diff for this file is too large to render. See raw diff
 
BlazorFrontend/wwwroot/bootstrap/bootstrap.min.css.map ADDED
The diff for this file is too large to render. See raw diff
 
BlazorFrontend/wwwroot/favicon.png ADDED
LibraryManagement.slnx CHANGED
@@ -1,5 +1,6 @@
1
  <Solution>
2
  <Project Path="Backend/Backend.csproj" Id="82e311b1-ce76-4235-9d5f-0d06a942d038" />
 
3
  <Project Path="DbConnect/DbConnect.csproj" Id="9923b718-c896-438d-ba4b-a2065f91c8ab" />
4
  <Project Path="Frontend/Frontend.csproj" Id="824d7fed-4fd3-41c5-8c5e-acd458ccbcdb" />
5
  </Solution>
 
1
  <Solution>
2
  <Project Path="Backend/Backend.csproj" Id="82e311b1-ce76-4235-9d5f-0d06a942d038" />
3
+ <Project Path="BlazorFrontend/BlazorFrontend.csproj" Id="4e49ee14-3e94-4f8a-8f43-e487ddfe77a3" />
4
  <Project Path="DbConnect/DbConnect.csproj" Id="9923b718-c896-438d-ba4b-a2065f91c8ab" />
5
  <Project Path="Frontend/Frontend.csproj" Id="824d7fed-4fd3-41c5-8c5e-acd458ccbcdb" />
6
  </Solution>