Skip to content

Commit eb3ce30

Browse files
Merge pull request #416 from TransactionProcessing/copilot/replace-ui-with-blazor
Create separate Blazor Server project with Tailwind CSS and stubbed services
2 parents fb6ac06 + 66bed7b commit eb3ce30

80 files changed

Lines changed: 62416 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
wwwroot/css/app.css
3+
package-lock.json
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en" class="h-full">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<base href="/" />
8+
<ResourcePreloader />
9+
<link rel="stylesheet" href="css/app.css" />
10+
<link rel="stylesheet" href="@Assets["EstateManagementUI.BlazorServer.styles.css"]" />
11+
<ImportMap />
12+
<link rel="icon" type="image/png" href="favicon.png" />
13+
<HeadOutlet />
14+
</head>
15+
16+
<body class="h-full">
17+
<Routes />
18+
<ReconnectModal />
19+
<script src="@Assets["_framework/blazor.web.js"]"></script>
20+
</body>
21+
22+
</html>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
@inherits LayoutComponentBase
2+
3+
<div class="flex h-screen bg-gray-100">
4+
<!-- Sidebar -->
5+
<aside class="w-64 bg-gray-900 text-white flex-shrink-0 hidden md:block">
6+
<div class="p-4">
7+
<div class="flex items-center space-x-2 mb-6">
8+
<span class="text-2xl font-bold">Estate Management</span>
9+
</div>
10+
<NavMenu />
11+
</div>
12+
</aside>
13+
14+
<!-- Main Content -->
15+
<div class="flex-1 flex flex-col overflow-hidden">
16+
<!-- Top Navigation Bar -->
17+
<header class="bg-white shadow-sm border-b border-gray-200">
18+
<div class="px-4 py-3 flex items-center justify-between">
19+
<div class="flex items-center space-x-4">
20+
<button class="md:hidden text-gray-600 hover:text-gray-900">
21+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
22+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
23+
</svg>
24+
</button>
25+
<h1 class="text-xl font-semibold text-gray-800">@PageTitle</h1>
26+
</div>
27+
28+
<div class="flex items-center space-x-4">
29+
<!-- Notifications -->
30+
<button class="text-gray-600 hover:text-gray-900">
31+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
32+
<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>
33+
</svg>
34+
</button>
35+
36+
<!-- User Profile Dropdown -->
37+
<AuthorizeView>
38+
<Authorized>
39+
<div class="flex items-center space-x-2">
40+
<span class="text-sm text-gray-700">@context.User.Identity?.Name</span>
41+
<button class="flex items-center space-x-1 text-gray-600 hover:text-gray-900">
42+
<svg class="w-8 h-8 rounded-full bg-gray-300" fill="currentColor" viewBox="0 0 24 24">
43+
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path>
44+
</svg>
45+
</button>
46+
</div>
47+
</Authorized>
48+
<NotAuthorized>
49+
<a href="/login" class="btn btn-primary btn-sm">Login</a>
50+
</NotAuthorized>
51+
</AuthorizeView>
52+
</div>
53+
</div>
54+
</header>
55+
56+
<!-- Page Content -->
57+
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-100">
58+
<div class="container mx-auto px-4 py-6">
59+
@Body
60+
</div>
61+
</main>
62+
</div>
63+
</div>
64+
65+
<!-- Toast Notifications Area -->
66+
<div id="toast-container" class="fixed bottom-4 right-4 z-50">
67+
<!-- Toast messages will appear here -->
68+
</div>
69+
70+
<div id="blazor-error-ui" class="fixed bottom-0 right-0 left-0 bg-red-600 text-white p-4 shadow-lg" data-nosnippet>
71+
<div class="container mx-auto flex items-center justify-between">
72+
<div class="flex items-center space-x-2">
73+
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20">
74+
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
75+
</svg>
76+
<span>An unhandled error has occurred.</span>
77+
</div>
78+
<div class="flex items-center space-x-4">
79+
<a href="." class="underline hover:no-underline">Reload</a>
80+
<button class="dismiss text-white hover:text-gray-200">✕</button>
81+
</div>
82+
</div>
83+
</div>
84+
85+
@code {
86+
[CascadingParameter]
87+
public string? PageTitle { get; set; }
88+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
.page {
2+
position: relative;
3+
display: flex;
4+
flex-direction: column;
5+
}
6+
7+
main {
8+
flex: 1;
9+
}
10+
11+
.sidebar {
12+
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
13+
}
14+
15+
.top-row {
16+
background-color: #f7f7f7;
17+
border-bottom: 1px solid #d6d5d5;
18+
justify-content: flex-end;
19+
height: 3.5rem;
20+
display: flex;
21+
align-items: center;
22+
}
23+
24+
.top-row ::deep a, .top-row ::deep .btn-link {
25+
white-space: nowrap;
26+
margin-left: 1.5rem;
27+
text-decoration: none;
28+
}
29+
30+
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
31+
text-decoration: underline;
32+
}
33+
34+
.top-row ::deep a:first-child {
35+
overflow: hidden;
36+
text-overflow: ellipsis;
37+
}
38+
39+
@media (max-width: 640.98px) {
40+
.top-row {
41+
justify-content: space-between;
42+
}
43+
44+
.top-row ::deep a, .top-row ::deep .btn-link {
45+
margin-left: 0;
46+
}
47+
}
48+
49+
@media (min-width: 641px) {
50+
.page {
51+
flex-direction: row;
52+
}
53+
54+
.sidebar {
55+
width: 250px;
56+
height: 100vh;
57+
position: sticky;
58+
top: 0;
59+
}
60+
61+
.top-row {
62+
position: sticky;
63+
top: 0;
64+
z-index: 1;
65+
}
66+
67+
.top-row.auth ::deep a:first-child {
68+
flex: 1;
69+
text-align: right;
70+
width: 0;
71+
}
72+
73+
.top-row, article {
74+
padding-left: 2rem !important;
75+
padding-right: 1.5rem !important;
76+
}
77+
}
78+
79+
#blazor-error-ui {
80+
color-scheme: light only;
81+
background: lightyellow;
82+
bottom: 0;
83+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
84+
box-sizing: border-box;
85+
display: none;
86+
left: 0;
87+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
88+
position: fixed;
89+
width: 100%;
90+
z-index: 1000;
91+
}
92+
93+
#blazor-error-ui .dismiss {
94+
cursor: pointer;
95+
position: absolute;
96+
right: 0.75rem;
97+
top: 0.5rem;
98+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<nav class="flex flex-col space-y-1">
2+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="" Match="NavLinkMatch.All">
3+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
5+
</svg>
6+
<span>Dashboard</span>
7+
</NavLink>
8+
9+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="estate">
10+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
11+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
12+
</svg>
13+
<span>Estate Management</span>
14+
</NavLink>
15+
16+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="merchants">
17+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
18+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"></path>
19+
</svg>
20+
<span>Merchant Management</span>
21+
</NavLink>
22+
23+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="contracts">
24+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
25+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
26+
</svg>
27+
<span>Contract Management</span>
28+
</NavLink>
29+
30+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="operators">
31+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
32+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"></path>
33+
</svg>
34+
<span>Operator Management</span>
35+
</NavLink>
36+
37+
<NavLink class="flex items-center space-x-3 px-4 py-2 rounded-md hover:bg-gray-800 transition-colors" href="file-processing">
38+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
39+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
40+
</svg>
41+
<span>File Processing</span>
42+
</NavLink>
43+
</nav>
44+
45+
@code {
46+
private bool collapseNavMenu = true;
47+
48+
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
49+
50+
private void ToggleNavMenu()
51+
{
52+
collapseNavMenu = !collapseNavMenu;
53+
}
54+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.navbar-toggler {
2+
appearance: none;
3+
cursor: pointer;
4+
width: 3.5rem;
5+
height: 2.5rem;
6+
color: white;
7+
position: absolute;
8+
top: 0.5rem;
9+
right: 1rem;
10+
border: 1px solid rgba(255, 255, 255, 0.1);
11+
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
12+
}
13+
14+
.navbar-toggler:checked {
15+
background-color: rgba(255, 255, 255, 0.5);
16+
}
17+
18+
.top-row {
19+
min-height: 3.5rem;
20+
background-color: rgba(0,0,0,0.4);
21+
}
22+
23+
.navbar-brand {
24+
font-size: 1.1rem;
25+
}
26+
27+
.bi {
28+
display: inline-block;
29+
position: relative;
30+
width: 1.25rem;
31+
height: 1.25rem;
32+
margin-right: 0.75rem;
33+
top: -1px;
34+
background-size: cover;
35+
}
36+
37+
.bi-house-door-fill-nav-menu {
38+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
39+
}
40+
41+
.bi-plus-square-fill-nav-menu {
42+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
43+
}
44+
45+
.bi-list-nested-nav-menu {
46+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
47+
}
48+
49+
.nav-item {
50+
font-size: 0.9rem;
51+
padding-bottom: 0.5rem;
52+
}
53+
54+
.nav-item:first-of-type {
55+
padding-top: 1rem;
56+
}
57+
58+
.nav-item:last-of-type {
59+
padding-bottom: 1rem;
60+
}
61+
62+
.nav-item ::deep .nav-link {
63+
color: #d7d7d7;
64+
background: none;
65+
border: none;
66+
border-radius: 4px;
67+
height: 3rem;
68+
display: flex;
69+
align-items: center;
70+
line-height: 3rem;
71+
width: 100%;
72+
}
73+
74+
.nav-item ::deep a.active {
75+
background-color: rgba(255,255,255,0.37);
76+
color: white;
77+
}
78+
79+
.nav-item ::deep .nav-link:hover {
80+
background-color: rgba(255,255,255,0.1);
81+
color: white;
82+
}
83+
84+
.nav-scrollable {
85+
display: none;
86+
}
87+
88+
.navbar-toggler:checked ~ .nav-scrollable {
89+
display: block;
90+
}
91+
92+
@media (min-width: 641px) {
93+
.navbar-toggler {
94+
display: none;
95+
}
96+
97+
.nav-scrollable {
98+
/* Never collapse the sidebar for wide screens */
99+
display: block;
100+
101+
/* Allow sidebar to scroll for tall menus */
102+
height: calc(100vh - 3.5rem);
103+
overflow-y: auto;
104+
}
105+
}

0 commit comments

Comments
 (0)