Skip to content

Commit 4582d0f

Browse files
updating blazor app
1 parent 0b56f56 commit 4582d0f

File tree

73 files changed

+59869
-11889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+59869
-11889
lines changed
1.43 MB
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Router AppAssembly="@typeof(App).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
5+
</Found>
6+
<NotFound>
7+
<PageTitle>Not found</PageTitle>
8+
<LayoutView Layout="@typeof(MainLayout)">
9+
<p role="alert">Sorry, there's nothing at this address.</p>
10+
</LayoutView>
11+
</NotFound>
12+
</Router>

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/App.razor

Lines changed: 0 additions & 43 deletions
This file was deleted.

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Layout/NavMenu.razor

Lines changed: 0 additions & 33 deletions
This file was deleted.

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Pages/Error.razor

Lines changed: 0 additions & 36 deletions
This file was deleted.

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Routes.razor

Lines changed: 0 additions & 6 deletions
This file was deleted.

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Layout/MainLayout.razor renamed to Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Layout/MainLayout.razor

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
@inherits LayoutComponentBase
2-
32
<div class="page">
43
<div class="sidebar">
54
<NavMenu />
65
</div>
76

87
<main>
98
<div class="top-row px-4">
10-
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
9+
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
1110
</div>
1211

1312
<article class="content px-4">
1413
@Body
1514
</article>
1615
</main>
1716
</div>
18-
19-
<div id="blazor-error-ui">
20-
An unhandled error has occurred.
21-
<a href="" class="reload">Reload</a>
22-
<a class="dismiss">🗙</a>
23-
</div>

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Layout/MainLayout.razor.css renamed to Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Layout/MainLayout.razor.css

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,23 @@ main {
2727
text-decoration: none;
2828
}
2929

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-
}
30+
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
31+
text-decoration: underline;
32+
}
3833

39-
@media (max-width: 640.98px) {
40-
.sidebar {
41-
background-image: linear-gradient(90deg, rgb(0, 0, 0) 0%, #FE671A 150%);
34+
.top-row ::deep a:first-child {
35+
overflow: hidden;
36+
text-overflow: ellipsis;
4237
}
4338

39+
@media (max-width: 640.98px) {
4440
.top-row {
45-
background-image: linear-gradient(90deg, rgb(0, 0, 0) 0%, #FE671A 150%);
4641
justify-content: space-between;
4742
}
4843

49-
.top-row ::deep a, .top-row ::deep .btn-link {
50-
margin-left: 0;
51-
}
44+
.top-row ::deep a, .top-row ::deep .btn-link {
45+
margin-left: 0;
46+
}
5247
}
5348

5449
@media (min-width: 641px) {
@@ -57,7 +52,7 @@ main {
5752
}
5853

5954
.sidebar {
60-
width: 250px;
55+
width: 270px;
6156
height: 100vh;
6257
position: sticky;
6358
top: 0;
@@ -69,33 +64,14 @@ main {
6964
z-index: 1;
7065
}
7166

72-
.top-row.auth ::deep a:first-child {
73-
flex: 1;
74-
text-align: right;
75-
width: 0;
76-
}
67+
.top-row.auth ::deep a:first-child {
68+
flex: 1;
69+
text-align: right;
70+
width: 0;
71+
}
7772

7873
.top-row, article {
7974
padding-left: 2rem !important;
8075
padding-right: 1.5rem !important;
8176
}
8277
}
83-
84-
#blazor-error-ui {
85-
background: lightyellow;
86-
bottom: 0;
87-
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
88-
display: none;
89-
left: 0;
90-
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
91-
position: fixed;
92-
width: 100%;
93-
z-index: 1000;
94-
}
95-
96-
#blazor-error-ui .dismiss {
97-
cursor: pointer;
98-
position: absolute;
99-
right: 0.75rem;
100-
top: 0.5rem;
101-
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<div class="top-row ps-3 navbar navbar-dark">
2+
<div class="container-fluid">
3+
<div>
4+
<img src="images/logox.png" alt="Logo" width="40" height="40" />
5+
<a class="navbar-brand" href="">Xceed Zip Samples</a>
6+
</div>
7+
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
8+
<span class="navbar-toggler-icon"></span>
9+
</button>
10+
</div>
11+
</div>
12+
13+
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
14+
<nav class="nav flex-column">
15+
<div class="nav-item px-3">
16+
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
17+
Compress files
18+
</NavLink>
19+
</div>
20+
<div class="nav-item px-3">
21+
<NavLink class="nav-link" href="listzip">
22+
List element
23+
</NavLink>
24+
</div>
25+
@* THIS REMOVED BECAUSE DO NOT WORK ON WEB ASSEMBLY *@
26+
@* <div class="nav-item px-3">
27+
<NavLink class="nav-link" href="folderzip">
28+
Compress folder
29+
</NavLink>
30+
</div> *@
31+
</nav>
32+
</div>
33+
34+
@code {
35+
private bool collapseNavMenu = true;
36+
37+
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
38+
39+
private void ToggleNavMenu()
40+
{
41+
collapseNavMenu = !collapseNavMenu;
42+
}
43+
}

Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Components/Layout/NavMenu.razor.css renamed to Src/SamplesByPlatforms/Xceed.Blazor.Zip.Sample/Layout/NavMenu.razor.css

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
.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);
2+
background-color: rgba(255, 255, 255, 0.1);
163
}
174

185
.top-row {
19-
height: 3.5rem;
6+
min-height: 3.5rem;
207
background-color: rgba(0,0,0,0.4);
218
}
229

@@ -59,45 +46,36 @@
5946
padding-bottom: 1rem;
6047
}
6148

62-
.nav-item ::deep .nav-link {
49+
.nav-item ::deep a {
6350
color: #d7d7d7;
64-
background: none;
65-
border: none;
6651
border-radius: 4px;
6752
height: 3rem;
6853
display: flex;
6954
align-items: center;
7055
line-height: 3rem;
71-
width: 100%;
7256
}
7357

7458
.nav-item ::deep a.active {
7559
background-color: rgba(255,255,255,0.37);
7660
color: white;
7761
}
7862

79-
.nav-item ::deep .nav-link:hover {
63+
.nav-item ::deep a:hover {
8064
background-color: rgba(255,255,255,0.1);
8165
color: white;
8266
}
8367

84-
.nav-scrollable {
85-
display: none;
86-
}
87-
88-
.navbar-toggler:checked ~ .nav-scrollable {
89-
display: block;
90-
}
91-
9268
@media (min-width: 641px) {
9369
.navbar-toggler {
9470
display: none;
9571
}
9672

97-
.nav-scrollable {
73+
.collapse {
9874
/* Never collapse the sidebar for wide screens */
9975
display: block;
76+
}
10077

78+
.nav-scrollable {
10179
/* Allow sidebar to scroll for tall menus */
10280
height: calc(100vh - 3.5rem);
10381
overflow-y: auto;

0 commit comments

Comments
 (0)