Remove test pages, update index page
This commit is contained in:
parent
c8b8a2816e
commit
28c5fdc461
@ -43,12 +43,18 @@ public class Server
|
||||
module => module.WithController<RankController>())
|
||||
.WithStaticFolder(Configs.STATIC_BASE_ROUTE, PathHelper.HtmlRootPath, true, m => m
|
||||
.WithContentCaching(Configs.USE_FILE_CACHE))
|
||||
|
||||
// Add static files after other modules to avoid conflicts
|
||||
.WithStaticFolder("/", PathHelper.HtmlRootPath, true, m => m
|
||||
.WithContentCaching(Configs.USE_FILE_CACHE))
|
||||
.WithModule(new ActionModule("/", HttpVerbs.Any,
|
||||
ctx => ctx.SendDataAsync(new { Message = "Error" })));
|
||||
server.AddCustomMimeType(".dll", "application/octet-stream");
|
||||
server.AddCustomMimeType(".blat", "application/octet-stream");
|
||||
server.AddCustomMimeType(".dat", "application/octet-stream");
|
||||
server.AddCustomMimeType(".json", "application/json");
|
||||
server.AddCustomMimeType(".wasm", "application/wasm");
|
||||
server.AddCustomMimeType(".woff", "application/font-woff");
|
||||
server.AddCustomMimeType(".woff2", "application/font-woff2");
|
||||
server.HandleHttpException(async (context, exception) =>
|
||||
{
|
||||
context.Response.StatusCode = exception.StatusCode;
|
||||
@ -57,9 +63,11 @@ public class Server
|
||||
{
|
||||
case 404:
|
||||
await context.SendStringAsync("404 NOT FOUND!", "text/html", new UTF8Encoding(false));
|
||||
|
||||
break;
|
||||
default:
|
||||
await HttpExceptionHandler.Default(context, exception);
|
||||
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
@ -30,6 +30,10 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
</Content>
|
||||
<Content Update="wwwroot\news.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Counter</MudText>
|
||||
<MudText Class="mb-4">Current count: @currentCount</MudText>
|
||||
<MudButton Color="Color.Primary" Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
|
||||
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
|
||||
}
|
@ -2,11 +2,5 @@
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Hello, world!</MudText>
|
||||
<MudText Class="mb-8">Welcome to your new app, powered by MudBlazor!</MudText>
|
||||
<MudAlert Severity="Severity.Normal">
|
||||
You can find documentation and examples on our website here:
|
||||
<MudLink Href="https://mudblazor.com" Typo="Typo.body2" Color="Color.Inherit">
|
||||
<b>www.mudblazor.com</b>
|
||||
</MudLink>
|
||||
</MudAlert>
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Admin page for GC local server</MudText>
|
||||
<MudText Class="mb-8">Powered by MudBlazor</MudText>
|
@ -9,11 +9,11 @@
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())"/>
|
||||
<MudSpacer/>
|
||||
<MudIconButton Icon="@Icons.Custom.Brands.MudBlazor" Color="Color.Inherit" Link="https://mudblazor.com/" Target="_blank"/>
|
||||
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Link="https://github.com/MudBlazor/MudBlazor/" Target="_blank"/>
|
||||
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Link="https://github.com/asesidaa/GC-local-server-rewrite/" Target="_blank"/>
|
||||
</MudAppBar>
|
||||
<MudDrawer @bind-Open="_drawerOpen" Elevation="1">
|
||||
<MudDrawerHeader>
|
||||
<MudText Typo="Typo.h6">MudAdmin</MudText>
|
||||
<MudText Typo="Typo.h6">GC local server Admin</MudText>
|
||||
</MudDrawerHeader>
|
||||
<NavMenu/>
|
||||
</MudDrawer>
|
||||
|
@ -1,5 +1,4 @@
|
||||
<MudNavMenu>
|
||||
<MudNavLink Href="" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
||||
<MudNavLink Href="counter" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Add">Counter</MudNavLink>
|
||||
<MudNavLink Href="users" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.List">Users</MudNavLink>
|
||||
</MudNavMenu>
|
BIN
MudAdmin/wwwroot/news.png
Normal file
BIN
MudAdmin/wwwroot/news.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 818 B |
@ -1,27 +0,0 @@
|
||||
[
|
||||
{
|
||||
"date": "2018-05-06",
|
||||
"temperatureC": 1,
|
||||
"summary": "Freezing"
|
||||
},
|
||||
{
|
||||
"date": "2018-05-07",
|
||||
"temperatureC": 14,
|
||||
"summary": "Bracing"
|
||||
},
|
||||
{
|
||||
"date": "2018-05-08",
|
||||
"temperatureC": -13,
|
||||
"summary": "Freezing"
|
||||
},
|
||||
{
|
||||
"date": "2018-05-09",
|
||||
"temperatureC": -16,
|
||||
"summary": "Balmy"
|
||||
},
|
||||
{
|
||||
"date": "2018-05-10",
|
||||
"temperatureC": -2,
|
||||
"summary": "Chilly"
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user