| <Router AppAssembly="@typeof(Program).Assembly"> | |||||
| <Found Context="routeData"> | |||||
| <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | |||||
| </Found> | |||||
| <NotFound> | |||||
| <LayoutView Layout="@typeof(MainLayout)"> | |||||
| <p>Sorry, there's nothing at this address.</p> | |||||
| </LayoutView> | |||||
| </NotFound> | |||||
| </Router> |
| <Project Sdk="Microsoft.NET.Sdk.Web"> | |||||
| <PropertyGroup Label="Globals"> | |||||
| <SccProjectName>SAK</SccProjectName> | |||||
| <SccProvider>SAK</SccProvider> | |||||
| <SccAuxPath>SAK</SccAuxPath> | |||||
| <SccLocalPath>SAK</SccLocalPath> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup> | |||||
| <TargetFramework>netstandard2.1</TargetFramework> | |||||
| <RazorLangVersion>3.0</RazorLangVersion> | |||||
| <ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | |||||
| <Content Remove="compilerconfig.json" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <_ContentIncludedByDefault Remove="wwwroot\css\united\_bootswatch.css" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <None Include="compilerconfig.json" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <PackageReference Include="BuildWebCompiler" Version="1.12.394" /> | |||||
| <PackageReference Include="MatBlazor" Version="2.8.0" /> | |||||
| <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.1" /> | |||||
| <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.1" PrivateAssets="all" /> | |||||
| <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.1" PrivateAssets="all" /> | |||||
| <PackageReference Include="System.Net.Http.Json" Version="3.2.0" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <Folder Include="wwwroot\images\" /> | |||||
| </ItemGroup> | |||||
| </Project> |
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | |||||
| <DebuggerFlavor>ProjectDebugger</DebuggerFlavor> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup> | |||||
| <ActiveDebugProfile>CaritasPWA</ActiveDebugProfile> | |||||
| </PropertyGroup> | |||||
| </Project> |
| "" | |||||
| { | |||||
| "FILE_VERSION" = "9237" | |||||
| "ENLISTMENT_CHOICE" = "NEVER" | |||||
| "PROJECT_FILE_RELATIVE_PATH" = "" | |||||
| "NUMBER_OF_EXCLUDED_FILES" = "0" | |||||
| "ORIGINAL_PROJECT_FILE_PATH" = "" | |||||
| "NUMBER_OF_NESTED_PROJECTS" = "0" | |||||
| "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" | |||||
| } |
| | |||||
| Microsoft Visual Studio Solution File, Format Version 12.00 | |||||
| # Visual Studio Version 16 | |||||
| VisualStudioVersion = 16.0.31129.286 | |||||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaritasPWA", "CaritasPWA.csproj", "{A4CFFE67-908C-4822-A420-78B2834EBC1E}" | |||||
| EndProject | |||||
| Global | |||||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||||
| Debug|Any CPU = Debug|Any CPU | |||||
| Release|Any CPU = Release|Any CPU | |||||
| EndGlobalSection | |||||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||||
| {A4CFFE67-908C-4822-A420-78B2834EBC1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {A4CFFE67-908C-4822-A420-78B2834EBC1E}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
| {A4CFFE67-908C-4822-A420-78B2834EBC1E}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
| {A4CFFE67-908C-4822-A420-78B2834EBC1E}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
| EndGlobalSection | |||||
| GlobalSection(SolutionProperties) = preSolution | |||||
| HideSolutionNode = FALSE | |||||
| EndGlobalSection | |||||
| GlobalSection(ExtensibilityGlobals) = postSolution | |||||
| SolutionGuid = {C8607828-7A15-45AD-B236-AE7916C2CC1B} | |||||
| EndGlobalSection | |||||
| EndGlobal |
| @page "/counter" | |||||
| <h1>Counter</h1> | |||||
| <p>Current count: @currentCount</p> | |||||
| @*<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>*@ | |||||
| <MatButton Raised="true" @onclick="IncrementCount">Click me!</MatButton> | |||||
| @code { | |||||
| private int currentCount = 0; | |||||
| private void IncrementCount() | |||||
| { | |||||
| currentCount++; | |||||
| } | |||||
| } |
| @page "/fetchdata" | |||||
| @inject HttpClient Http | |||||
| <h1>Weather forecast</h1> | |||||
| <p>This component demonstrates fetching data from the server.</p> | |||||
| @if (forecasts == null) | |||||
| { | |||||
| <p><em>Loading...</em></p> | |||||
| } | |||||
| else | |||||
| { | |||||
| <table class="table"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th>Date</th> | |||||
| <th>Temp. (C)</th> | |||||
| <th>Temp. (F)</th> | |||||
| <th>Summary</th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| @foreach (var forecast in forecasts) | |||||
| { | |||||
| <tr> | |||||
| <td>@forecast.Date.ToShortDateString()</td> | |||||
| <td>@forecast.TemperatureC</td> | |||||
| <td>@forecast.TemperatureF</td> | |||||
| <td>@forecast.Summary</td> | |||||
| </tr> | |||||
| } | |||||
| </tbody> | |||||
| </table> | |||||
| } | |||||
| @code { | |||||
| private WeatherForecast[] forecasts; | |||||
| protected override async Task OnInitializedAsync() | |||||
| { | |||||
| forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json"); | |||||
| } | |||||
| public class WeatherForecast | |||||
| { | |||||
| public DateTime Date { get; set; } | |||||
| public int TemperatureC { get; set; } | |||||
| public string Summary { get; set; } | |||||
| public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); | |||||
| } | |||||
| } |
| @page "/" | |||||
| <h1>Hello, world!</h1> | |||||
| Welcome to your new app. | |||||
| <SurveyPrompt Title="How is Blazor working for you?" /> |
| using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | |||||
| using Microsoft.Extensions.Configuration; | |||||
| using Microsoft.Extensions.DependencyInjection; | |||||
| using Microsoft.Extensions.Logging; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Net.Http; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| using MatBlazor; | |||||
| namespace CaritasPWA { | |||||
| public class Program { | |||||
| public static async Task Main(string[] args) { | |||||
| var builder = WebAssemblyHostBuilder.CreateDefault(args); | |||||
| builder.RootComponents.Add<App>("app"); | |||||
| builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | |||||
| builder.Services.AddMatBlazor(); | |||||
| await builder.Build().RunAsync(); | |||||
| } | |||||
| } | |||||
| } |
| { | |||||
| "iisSettings": { | |||||
| "windowsAuthentication": false, | |||||
| "anonymousAuthentication": true, | |||||
| "iisExpress": { | |||||
| "applicationUrl": "http://localhost:37078", | |||||
| "sslPort": 44355 | |||||
| } | |||||
| }, | |||||
| "profiles": { | |||||
| "IIS Express": { | |||||
| "commandName": "IISExpress", | |||||
| "launchBrowser": true, | |||||
| "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | |||||
| "environmentVariables": { | |||||
| "ASPNETCORE_ENVIRONMENT": "Development" | |||||
| } | |||||
| }, | |||||
| "CaritasPWA": { | |||||
| "commandName": "Project", | |||||
| "launchBrowser": true, | |||||
| "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | |||||
| "applicationUrl": "https://localhost:5001;http://localhost:5000", | |||||
| "environmentVariables": { | |||||
| "ASPNETCORE_ENVIRONMENT": "Development" | |||||
| } | |||||
| } | |||||
| } | |||||
| } |
| @inherits LayoutComponentBase | |||||
| <h3>Welcome</h3> | |||||
| @code { | |||||
| } |
| @inherits LayoutComponentBase | |||||
| <div class="sidebar"> | |||||
| <NavMenu /> | |||||
| </div> | |||||
| <div class="main"> | |||||
| <div class="content px-4"> | |||||
| @Body | |||||
| </div> | |||||
| </div> |
| <MatAppBarContainer> | |||||
| <MatAppBar Fixed="true"> | |||||
| <MatAppBarRow> | |||||
| <MatAppBarSection> | |||||
| <MatIconButton Icon="menu" OnClick="@((e) => ButtonClicked())"></MatIconButton> | |||||
| <MatAppBarTitle>CaritasPWA</MatAppBarTitle> | |||||
| </MatAppBarSection> | |||||
| @*<MatAppBarSection Align="@MatAppBarSectionAlign.Start"> | |||||
| <NavLink class="text-white nav-link" href="" Match="NavLinkMatch.All"> | |||||
| Home | |||||
| </NavLink> | |||||
| <NavLink class="text-white nav-link" href="counter"> | |||||
| Counter | |||||
| </NavLink> | |||||
| <NavLink class="text-white nav-link" href="fetchdata"> | |||||
| Fetch Data | |||||
| </NavLink> | |||||
| </MatAppBarSection>*@ | |||||
| <MatAppBarSection Align="@MatAppBarSectionAlign.End"> | |||||
| <NavLink class="text-white" href="http://blazor.net" Align="@MatAppBarSectionAlign.End" Style="padding-right:1em">About</NavLink> | |||||
| </MatAppBarSection> | |||||
| </MatAppBarRow> | |||||
| </MatAppBar> | |||||
| <MatAppBarContent> | |||||
| <MatDrawerContainer> | |||||
| <MatDrawer @bind-Opened="@Opened" Mode="@MatDrawerMode.Modal"> | |||||
| <MatList> | |||||
| <MatListItem Class="@((Index == 1)?"bg-primary-color text-white" : "")" | |||||
| href="" | |||||
| Match="NavLinkMatch.All" | |||||
| @onclick="@((e) => ButtonClicked(1))"> | |||||
| <MatIcon Icon="@MatIconNames.Apps"></MatIcon> | |||||
| <MatListItemText Style="padding-left:0.5em">Caritas Dienste</MatListItemText> | |||||
| </MatListItem> | |||||
| <MatListItem Class="@((Index == 2)?"bg-primary-color text-white" : "")" | |||||
| Href="counter" | |||||
| @onclick="@((e) => ButtonClicked(2))"> | |||||
| <MatIcon Icon="@MatIconNames.Person_outline"></MatIcon> | |||||
| <MatListItemText Style="padding-left:0.5em">Konto</MatListItemText> | |||||
| </MatListItem> | |||||
| <MatListItem Class="@((Index == 3)?"bg-primary-color text-white" : "")" | |||||
| Href="fetchdata" | |||||
| @onclick="@((e) => ButtonClicked(3))"> | |||||
| <MatIcon Icon="@MatIconNames.Error_outline" Style="transform: rotate(180deg)"></MatIcon> | |||||
| <MatListItemText Style="padding-left:0.5em">Info</MatListItemText> | |||||
| </MatListItem> | |||||
| <MatListItem Class="@((Index == 4)?"bg-primary-color text-white" : "")" | |||||
| Href="counter" | |||||
| @onclick="@((e) => ButtonClicked(4))"> | |||||
| <MatIcon Icon="@MatIconNames.Exit_to_app"></MatIcon> | |||||
| <MatListItemText Style="padding-left:0.5em">Logout</MatListItemText> | |||||
| </MatListItem> | |||||
| </MatList> | |||||
| </MatDrawer> | |||||
| </MatDrawerContainer> | |||||
| </MatAppBarContent> | |||||
| </MatAppBarContainer> | |||||
| @code | |||||
| { | |||||
| bool Opened = false; | |||||
| int Index = 0; | |||||
| void ButtonClicked() { | |||||
| Opened = !Opened; | |||||
| } | |||||
| void ButtonClicked(int _Index) { | |||||
| Index = _Index; | |||||
| ButtonClicked(); | |||||
| } | |||||
| } |
| <div class="alert alert-secondary mt-4" role="alert"> | |||||
| <span class="oi oi-pencil mr-2" aria-hidden="true"></span> | |||||
| <strong>@Title</strong> | |||||
| <span class="text-nowrap"> | |||||
| Please take our | |||||
| <a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2127996">brief survey</a> | |||||
| </span> | |||||
| and tell us what you think. | |||||
| </div> | |||||
| @code { | |||||
| // Demonstrates how a parent component can supply parameters | |||||
| [Parameter] | |||||
| public string Title { get; set; } | |||||
| } |
| @using System.Net.Http | |||||
| @using System.Net.Http.Json | |||||
| @using Microsoft.AspNetCore.Components.Forms | |||||
| @using Microsoft.AspNetCore.Components.Routing | |||||
| @using Microsoft.AspNetCore.Components.Web | |||||
| @using Microsoft.AspNetCore.Components.WebAssembly.Http | |||||
| @using Microsoft.JSInterop | |||||
| @using CaritasPWA | |||||
| @using CaritasPWA.Shared | |||||
| @using MatBlazor |
| <StaticWebAssets Version="1.0"> | |||||
| <ContentRoot BasePath="/" Path="D:\Work\Caritas\CaritasPWA\bin\Debug\netstandard2.1\wwwroot\" /> | |||||
| <ContentRoot BasePath="_content/MatBlazor" Path="C:\Users\FSmilari\.nuget\packages\matblazor\2.8.0\build\..\staticwebassets\" /> | |||||
| </StaticWebAssets> |