commit fbf51090c18e00371681bda2b0a62754ae950955 Author: pancakes Date: Thu Sep 11 22:57:21 2025 +1000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/.idea/.idea.PancakesWeb/.idea/encodings.xml b/.idea/.idea.PancakesWeb/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.PancakesWeb/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.PancakesWeb/.idea/indexLayout.xml b/.idea/.idea.PancakesWeb/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.PancakesWeb/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.PancakesWeb/.idea/projectSettingsUpdater.xml b/.idea/.idea.PancakesWeb/.idea/projectSettingsUpdater.xml new file mode 100644 index 0000000..ef20cb0 --- /dev/null +++ b/.idea/.idea.PancakesWeb/.idea/projectSettingsUpdater.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.PancakesWeb/.idea/vcs.xml b/.idea/.idea.PancakesWeb/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.PancakesWeb/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/.idea.PancakesWeb/.idea/workspace.xml b/.idea/.idea.PancakesWeb/.idea/workspace.xml new file mode 100644 index 0000000..aff1880 --- /dev/null +++ b/.idea/.idea.PancakesWeb/.idea/workspace.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/PancakesWeb.sln b/PancakesWeb.sln new file mode 100644 index 0000000..757856b --- /dev/null +++ b/PancakesWeb.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PancakesWeb", "PancakesWeb\PancakesWeb.csproj", "{9F821EF0-E350-444D-B18E-4AB428826E2F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F821EF0-E350-444D-B18E-4AB428826E2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F821EF0-E350-444D-B18E-4AB428826E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F821EF0-E350-444D-B18E-4AB428826E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F821EF0-E350-444D-B18E-4AB428826E2F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/PancakesWeb/Components/App.razor b/PancakesWeb/Components/App.razor new file mode 100644 index 0000000..d95aa83 --- /dev/null +++ b/PancakesWeb/Components/App.razor @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PancakesWeb/Components/Layout/MainLayout.razor b/PancakesWeb/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..624f437 --- /dev/null +++ b/PancakesWeb/Components/Layout/MainLayout.razor @@ -0,0 +1,9 @@ +@inherits LayoutComponentBase + +@Body + +
+ An unhandled error has occurred. + Reload + 🗙 +
\ No newline at end of file diff --git a/PancakesWeb/Components/Layout/MainLayout.razor.css b/PancakesWeb/Components/Layout/MainLayout.razor.css new file mode 100644 index 0000000..60cec92 --- /dev/null +++ b/PancakesWeb/Components/Layout/MainLayout.razor.css @@ -0,0 +1,20 @@ +#blazor-error-ui { + color-scheme: light only; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/PancakesWeb/Components/Pages/Error.razor b/PancakesWeb/Components/Pages/Error.razor new file mode 100644 index 0000000..9d7c6be --- /dev/null +++ b/PancakesWeb/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; + +} \ No newline at end of file diff --git a/PancakesWeb/Components/Pages/Home.razor b/PancakesWeb/Components/Pages/Home.razor new file mode 100644 index 0000000..dfcdf75 --- /dev/null +++ b/PancakesWeb/Components/Pages/Home.razor @@ -0,0 +1,7 @@ +@page "/" + +Home + +

Hello, world!

+ +Welcome to your new app. \ No newline at end of file diff --git a/PancakesWeb/Components/Routes.razor b/PancakesWeb/Components/Routes.razor new file mode 100644 index 0000000..ae94e9e --- /dev/null +++ b/PancakesWeb/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/PancakesWeb/Components/_Imports.razor b/PancakesWeb/Components/_Imports.razor new file mode 100644 index 0000000..5efd7e5 --- /dev/null +++ b/PancakesWeb/Components/_Imports.razor @@ -0,0 +1,10 @@ +@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 static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using PancakesWeb +@using PancakesWeb.Components \ No newline at end of file diff --git a/PancakesWeb/PancakesWeb.csproj b/PancakesWeb/PancakesWeb.csproj new file mode 100644 index 0000000..5a25aeb --- /dev/null +++ b/PancakesWeb/PancakesWeb.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + diff --git a/PancakesWeb/Program.cs b/PancakesWeb/Program.cs new file mode 100644 index 0000000..3eff7fd --- /dev/null +++ b/PancakesWeb/Program.cs @@ -0,0 +1,28 @@ +using PancakesWeb.Components; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorComponents() + .AddInteractiveServerComponents(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error", createScopeForErrors: true); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); + + +app.UseAntiforgery(); + +app.MapStaticAssets(); +app.MapRazorComponents() + .AddInteractiveServerRenderMode(); + +app.Run(); \ No newline at end of file diff --git a/PancakesWeb/Properties/launchSettings.json b/PancakesWeb/Properties/launchSettings.json new file mode 100644 index 0000000..9f27ee4 --- /dev/null +++ b/PancakesWeb/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5015", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7197;http://localhost:5015", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } + } diff --git a/PancakesWeb/appsettings.Development.json b/PancakesWeb/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/PancakesWeb/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/PancakesWeb/appsettings.json b/PancakesWeb/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/PancakesWeb/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/PancakesWeb/wwwroot/app.css b/PancakesWeb/wwwroot/app.css new file mode 100644 index 0000000..5388357 --- /dev/null +++ b/PancakesWeb/wwwroot/app.css @@ -0,0 +1,38 @@ +h1:focus { + outline: none; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid #e50000; +} + +.validation-message { + color: #e50000; +} + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUz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41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.darker-border-checkbox.form-check-input { + border-color: #929292; +} + +.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { + color: var(--bs-secondary-color); + text-align: end; +} + +.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { + text-align: start; +} \ No newline at end of file