Skip to content

Commit 084c3fb

Browse files
authored
feat: update to bit 8.1.0 #45 (#46)
1 parent 4fd6f3f commit 084c3fb

33 files changed

+218
-310
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cpus": 4
55
},
66
"waitFor": "onCreateCommand",
7-
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/9144f37e-b370-41ee-a86f-2d2a69251652/bc1d544112ec134184a5aec7f7a1eaf9/dotnet-sdk-8.0.100-rc.2.23502.2-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust",
7+
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/5226a5fa-8c0b-474f-b79a-8984ad7c5beb/3113ccbf789c9fd29972835f0f334b7a/dotnet-sdk-8.0.100-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust",
88
"customizations": {
99
"codespaces": {
1010
"openFiles": [

.gitattributes

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

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,4 @@ ModelManifest.xml
216216
# Rider
217217
.idea
218218

219-
dotnet-tools.json
220-
profile.arm.json
221-
222-
# Bit.BlazorUIPlayground
219+
profile.arm.json

.vscode/launch.json

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

.vscode/tasks.json

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

App.razor

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

Bit.BlazorUIPlayground.Web.csproj

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

Bit.BlazorUIPlayground.csproj

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- Generated by bit-empty template v-8.1.0 -->
2+
3+
<Project Sdk="Microsoft.NET.Sdk.Web">
4+
5+
<PropertyGroup>
6+
<TargetFramework>net8.0</TargetFramework>
7+
<Nullable>enable</Nullable>
8+
<ImplicitUsings>enable</ImplicitUsings>
9+
</PropertyGroup>
10+
11+
12+
<ItemGroup>
13+
<PackageReference Include="Bit.BlazorUI" Version="8.1.0" />
14+
15+
<PackageReference Include="Bit.CodeAnalyzers" Version="8.1.0">
16+
<PrivateAssets>all</PrivateAssets>
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
</PackageReference>
19+
20+
<PackageReference Include="Bit.SourceGenerators" Version="8.1.0">
21+
<PrivateAssets>all</PrivateAssets>
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
23+
</PackageReference>
24+
25+
<Using Include="Bit.BlazorUI" />
26+
</ItemGroup>
27+
</Project>

Components/App.razor

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<base href="/" />
6+
<meta charset="utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<link rel="stylesheet" href="Bit.BlazorUIPlayground.styles.css" />
9+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
10+
<link href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" />
11+
<style>
12+
html, body {
13+
margin: 0;
14+
height: 100%;
15+
}
16+
</style>
17+
<HeadOutlet />
18+
</head>
19+
20+
<body class="@BitCss.Class.Color.Background.Primary @BitCss.Class.Color.Foreground.Primary">
21+
<Routes />
22+
<script src="_framework/blazor.web.js"></script>
23+
<script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></script>
24+
</body>
25+
26+
</html>

Components/Layout/Footer.razor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<footer>
2+
<BitLabel>Copyright © 2023 bit Blazor Empty</BitLabel>
3+
</footer>

Shared/Footer.razor.css renamed to Components/Layout/Footer.razor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
padding: 1rem;
33
display: flex;
44
justify-content: center;
5-
}
5+
}

Shared/Header.razor renamed to Components/Layout/Header.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@inject NavigationManager _navigationManager
1+
@rendermode InteractiveServer
2+
@inject NavigationManager _navigationManager
23
@inject BitThemeManager _bitThemeManager
34

45
<header class="@BitCss.Class.Shadow.S1">

Shared/Header.razor.css renamed to Components/Layout/Header.razor.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
flex-flow: row nowrap;
2828
}
2929

30-
.logo {
30+
::deep .logo {
3131
width: 2rem;
3232
height: 2rem;
3333
cursor: pointer;
3434
margin-right: 1rem;
3535
background-size: contain;
3636
background-position: center;
3737
background-repeat: no-repeat;
38-
background-image: url('/images/bit-blue-icon.svg');
38+
background-image: url('/bit-logo.svg');
3939
}
4040

4141
::deep .link {
@@ -48,4 +48,4 @@
4848
gap: 1rem;
4949
display: flex;
5050
align-items: center;
51-
}
51+
}

Components/Layout/MainLayout.razor

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@inherits LayoutComponentBase
2+
<Header />
3+
4+
<main>
5+
<article>
6+
@Body
7+
</article>
8+
9+
<Footer />
10+
</main>
11+
12+
<div id="blazor-error-ui" data-nosnippet>
13+
An unhandled error has occurred.
14+
<a href="." class="reload">Reload</a>
15+
<span class="dismiss">🗙</span>
16+
</div>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
::deep *, * {
2+
box-sizing: border-box;
3+
}
4+
5+
main {
6+
height: 100%;
7+
display: flex;
8+
padding-top: 56px;
9+
flex-direction: column;
10+
}
11+
12+
article {
13+
flex-grow: 1;
14+
}
15+
16+
#blazor-error-ui {
17+
background: lightyellow;
18+
bottom: 0;
19+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
20+
display: none;
21+
left: 0;
22+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
23+
position: fixed;
24+
width: 100%;
25+
z-index: 1000;
26+
}
27+
28+
#blazor-error-ui .dismiss {
29+
cursor: pointer;
30+
position: absolute;
31+
right: 0.75rem;
32+
top: 0.5rem;
33+
}

Pages/About.razor renamed to Components/Pages/About.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
high quality development services and products.
1818
</BitTypography>
1919
</section>
20-
</div>
20+
</div>

Pages/About.razor.css renamed to Components/Pages/About.razor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
text-align: center;
2424
padding-bottom: 5rem;
2525
justify-content: center;
26-
}
26+
}

Components/Pages/Error.razor

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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] private HttpContext? HttpContext { get; set; }
29+
30+
private string? RequestId { get; set; }
31+
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
32+
33+
protected override void OnInitialized() => RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
34+
}

Pages/Home.razor renamed to Components/Pages/Home.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@page "/"
2+
@rendermode InteractiveServer
23

34
<PageTitle>Home</PageTitle>
45

@@ -10,7 +11,7 @@
1011
</BitTypography>
1112

1213
<BitTypography Variant="BitTypographyVariant.Subtitle1" Gutter>
13-
Welcome to your bit BlazorUI Playground
14+
Welcome to your bit Blazor Empty app
1415
</BitTypography>
1516
</div>
1617
</div>

0 commit comments

Comments
 (0)