mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Add ReactSpa template
This commit is contained in:
9
templates/ReactSpa/Views/Home/Index.cshtml
Normal file
9
templates/ReactSpa/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,9 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<div id="react-app">Loading...</div>
|
||||
|
||||
@section scripts {
|
||||
<script src="~/dist/main.js" asp-append-version="true"></script>
|
||||
}
|
||||
6
templates/ReactSpa/Views/Shared/Error.cshtml
Executable file
6
templates/ReactSpa/Views/Shared/Error.cshtml
Executable file
@@ -0,0 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
18
templates/ReactSpa/Views/Shared/_Layout.cshtml
Normal file
18
templates/ReactSpa/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
||||
|
||||
<environment names="Staging,Production">
|
||||
<link rel="stylesheet" href="~/dist/site.css" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
|
||||
<script src="~/dist/vendor.js" asp-append-version="true"></script>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
2
templates/ReactSpa/Views/_ViewImports.cshtml
Executable file
2
templates/ReactSpa/Views/_ViewImports.cshtml
Executable file
@@ -0,0 +1,2 @@
|
||||
@using WebApplicationBasic
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
3
templates/ReactSpa/Views/_ViewStart.cshtml
Executable file
3
templates/ReactSpa/Views/_ViewStart.cshtml
Executable file
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
Reference in New Issue
Block a user