Skip to content

Commit 435ba84

Browse files
authored
Merge pull request #1 from macel94/codex/create-blazor-wasm-project-with-fluentui-templates
Remove static web icons
2 parents e41fdf1 + 3885d8d commit 435ba84

File tree

21 files changed

+601
-1
lines changed

21 files changed

+601
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Blazor Fluent UI WASM",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0",
4+
"postCreateCommand": "dotnet restore BlazorFluentWasmApp/BlazorFluentWasmApp.csproj",
5+
"features": {
6+
"ghcr.io/devcontainers/features/node:1": {
7+
"version": "lts"
8+
}
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"ms-dotnettools.csharp",
14+
"ms-azuretools.vscode-docker"
15+
]
16+
}
17+
}
18+
}

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "nuget"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "sunday"
8+
groups:
9+
nuget-dependencies:
10+
patterns:
11+
- "*"
12+
- package-ecosystem: "devcontainers"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
day: "sunday"
17+
groups:
18+
devcontainer:
19+
patterns:
20+
- "*"
21+
- package-ecosystem: "dotnet-sdk"
22+
directory: "/"
23+
schedule:
24+
interval: "weekly"
25+
day: "sunday"
26+
groups:
27+
dotnet-sdk:
28+
patterns:
29+
- "*"

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
push:
7+
branches: ["main"]
8+
9+
jobs:
10+
build:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
global-json-file: global.json
22+
23+
- name: Restore dependencies
24+
run: dotnet restore BlazorFluentWasmApp.sln
25+
26+
- name: Build
27+
run: dotnet build BlazorFluentWasmApp.sln --configuration Release --no-restore
28+
29+
- name: Test
30+
run: |
31+
if find . -name '*Tests.csproj' -print -quit | grep -q .; then
32+
dotnet test BlazorFluentWasmApp.sln --configuration Release --no-build
33+
else
34+
echo "No test projects found; skipping tests."
35+
fi

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
bin/
2+
obj/
3+
**/bin/
4+
**/obj/
5+
*.user
6+
*.suo
7+
*.userprefs
8+
.DS_Store
9+
*.swp

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Agent Instructions
2+
3+
These instructions apply to the entire repository.
4+
5+
## Code Style
6+
- Prefer the latest .NET SDK specified in `global.json` for builds and tooling.
7+
- Follow C# best practices: use `var` for local type inference when the type is evident, favor expression-bodied members when concise, and keep components in PascalCase.
8+
- Keep Razor components well-organized: group parameters at the top, markup in the middle, and code blocks (if any) at the bottom.
9+
10+
## Testing
11+
- Run `dotnet build` for the `BlazorFluentWasmApp` project after making changes.
12+
- Add additional automated tests as they are introduced in the solution.
13+
14+
## Documentation
15+
- Update the README when setup steps or developer workflows change.
16+
- Document new scripts or manual steps in repository docs.
17+
18+
## Pull Requests
19+
- Summarize notable changes and list the commands executed for validation in the PR description.

BlazorFluentWasmApp.sln

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.9.34112.105
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorFluentWasmApp", "BlazorFluentWasmApp/BlazorFluentWasmApp.csproj", "{B6E2E762-2F6A-4F88-A026-4C6B5EF4A689}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{B6E2E762-2F6A-4F88-A026-4C6B5EF4A689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{B6E2E762-2F6A-4F88-A026-4C6B5EF4A689}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{B6E2E762-2F6A-4F88-A026-4C6B5EF4A689}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{B6E2E762-2F6A-4F88-A026-4C6B5EF4A689}.Release|Any CPU.Build.0 = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(SolutionProperties) = preSolution
19+
HideSolutionNode = FALSE
20+
EndGlobalSection
21+
EndGlobal

BlazorFluentWasmApp/App.razor

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Router AppAssembly="@typeof(App).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
</Found>
5+
<NotFound>
6+
<PageTitle>Not found</PageTitle>
7+
<LayoutView Layout="@typeof(MainLayout)">
8+
<p role="alert">Sorry, there's nothing at this address.</p>
9+
</LayoutView>
10+
</NotFound>
11+
</Router>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.6"/>
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.6" PrivateAssets="all"/>
12+
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1" />
13+
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.12.1" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@inherits LayoutComponentBase
2+
3+
<FluentLayout>
4+
<FluentHeader>
5+
BlazorFluentWasmApp
6+
</FluentHeader>
7+
<FluentStack Class="main" Orientation="Orientation.Horizontal" Width="100%">
8+
<NavMenu />
9+
<FluentBodyContent Class="body-content">
10+
<ErrorBoundary>
11+
<ChildContent>
12+
<div class="content">
13+
@Body
14+
</div>
15+
</ChildContent>
16+
<ErrorContent Context="ex">
17+
<div class="blazor-error-boundary">@ex.Message</div>
18+
</ErrorContent>
19+
</ErrorBoundary>
20+
</FluentBodyContent>
21+
</FluentStack>
22+
<FluentFooter>
23+
<a href="https://www.fluentui-blazor.net" target="_blank">Documentation and demos</a>
24+
<FluentSpacer />
25+
<a href="https://learn.microsoft.com/en-us/aspnet/core/blazor" target="_blank">About Blazor</a>
26+
</FluentFooter>
27+
</FluentLayout>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="navmenu">
2+
<input type="checkbox" title="Menu expand/collapse toggle" id="navmenu-toggle" class="navmenu-icon" />
3+
<label for="navmenu-toggle" class="navmenu-icon"><FluentIcon Value="@(new Icons.Regular.Size20.Navigation())" Color="Color.Fill" /></label>
4+
<nav class="sitenav" aria-labelledby="main-menu">
5+
<FluentNavMenu Id="main-menu" Width="250" Collapsible="true" Title="Navigation menu" @bind-Expanded="expanded" CustomToggle="true">
6+
<FluentNavLink Href="/" Match="NavLinkMatch.All" Icon="@(new Icons.Regular.Size20.Home())" IconColor="Color.Accent">Home</FluentNavLink>
7+
<FluentNavLink Href="counter" Icon="@(new Icons.Regular.Size20.NumberSymbolSquare())" IconColor="Color.Accent">Counter</FluentNavLink>
8+
<FluentNavLink Href="weather" Icon="@(new Icons.Regular.Size20.WeatherPartlyCloudyDay())" IconColor="Color.Accent">Weather</FluentNavLink>
9+
</FluentNavMenu>
10+
</nav>
11+
</div>
12+
13+
@code {
14+
private bool expanded = true;
15+
}

0 commit comments

Comments
 (0)