Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
Expand All @@ -18,6 +19,7 @@
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@page "/counter"

<PageTitle>Counter</PageTitle>

Comment thread
mkArtakMSFT marked this conversation as resolved.
<h1>Counter</h1>

<p role="status">Current count: @currentCount</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@page "/fetchdata"

<PageTitle>Weather forecast</PageTitle>

@using BlazorServerWeb_CSharp.Data
@inject WeatherForecastService ForecastService

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@page "/"

<PageTitle>Index</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,7 @@
@namespace BlazorServerWeb_CSharp.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = null;
Layout = "_Layout";
}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BlazorServerWeb-CSharp</title>
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
<link href="BlazorServerWeb-CSharp.styles.css" rel="stylesheet" />
</head>
<body>
<component type="typeof(App)" render-mode="ServerPrerendered" />

<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

<script src="_framework/blazor.server.js"></script>
</body>
</html>
<component type="typeof(App)" render-mode="ServerPrerendered" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@using Microsoft.AspNetCore.Components.Web
@namespace BlazorServerWeb_CSharp.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BlazorServerWeb-CSharp</title>
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
<link href="BlazorServerWeb-CSharp.styles.css" rel="stylesheet" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
<body>
@RenderBody()

<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

<script src="_framework/blazor.server.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
Expand All @@ -29,6 +30,7 @@
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@page "/counter"

<PageTitle>Counter</PageTitle>

<h1>Counter</h1>

<p role="status">Current count: @currentCount</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#endif*@
@inject HttpClient Http

<PageTitle>Weather forecast</PageTitle>

<h1>Weather forecast</h1>

<p>This component demonstrates fetching data from the server.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@page "/"

<PageTitle>Index</PageTitle>

<h1>Hello, world!</h1>

@*#if (MissingAuthority)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Components.Web;
#if (!NoAuth && Hosted)
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
#endif
Expand All @@ -10,6 +11,7 @@

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

#if (!Hosted || NoAuth)
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
Expand Down
6 changes: 6 additions & 0 deletions src/ProjectTemplates/test/template-baselines.json
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/LoginDisplay.razor",
"Shared/MainLayout.razor",
Expand Down Expand Up @@ -939,6 +940,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/LoginDisplay.razor",
"Shared/MainLayout.razor",
Expand Down Expand Up @@ -978,6 +980,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/LoginDisplay.razor",
"Shared/MainLayout.razor",
Expand Down Expand Up @@ -1017,6 +1020,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/MainLayout.razor",
"Shared/MainLayout.razor.css",
Expand Down Expand Up @@ -1055,6 +1059,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/LoginDisplay.razor",
"Shared/MainLayout.razor",
Expand Down Expand Up @@ -1094,6 +1099,7 @@
"Pages/FetchData.razor",
"Pages/Index.razor",
"Pages/_Host.cshtml",
"Pages/_Layout.cshtml",
"Properties/launchSettings.json",
"Shared/LoginDisplay.razor",
"Shared/MainLayout.razor",
Expand Down