diff --git a/Components/App.razor b/Components/App.razor new file mode 100644 index 0000000..79636e8 --- /dev/null +++ b/Components/App.razor @@ -0,0 +1,25 @@ + + + +@* ReSharper disable once MissingTitleTag :: Added by HeadOutlet *@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Components/Layout/MainLayout.razor b/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..53a4e95 --- /dev/null +++ b/Components/Layout/MainLayout.razor @@ -0,0 +1,3 @@ +@inherits LayoutComponentBase + +@Body \ No newline at end of file diff --git a/Components/Pages/About.razor b/Components/Pages/About.razor new file mode 100644 index 0000000..e05344f --- /dev/null +++ b/Components/Pages/About.razor @@ -0,0 +1,9 @@ +@page "/about" + +About - Just Short It + +

About

+ +@code { + +} diff --git a/Components/Routes.razor b/Components/Routes.razor new file mode 100644 index 0000000..eb2c867 --- /dev/null +++ b/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/Components/_imports.razor b/Components/_imports.razor new file mode 100644 index 0000000..d7fd106 --- /dev/null +++ b/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 JustShortIt +@using JustShortIt.Components diff --git a/Program.cs b/Program.cs index 9ae145b..3b1bce1 100644 --- a/Program.cs +++ b/Program.cs @@ -1,3 +1,4 @@ +using JustShortIt.Components; using JustShortIt.Model; using JustShortIt.Service; using Microsoft.AspNetCore.Authentication.Cookies; @@ -6,6 +7,9 @@ builder.Configuration.AddEnvironmentVariables("JSI_"); builder.Services.AddRazorPages(); +builder.Services.AddAntiforgery(); +builder.Services.AddRazorComponents(); + // Get Configurations var redisConnection = builder.Configuration.GetSection("Redis").Get(); var user = builder.Configuration.GetSection("Account").Get(); @@ -65,5 +69,7 @@ app.UseStaticFiles(); app.UseRouting(); app.UseAuthorization(); +app.UseAntiforgery(); app.MapRazorPages(); +app.MapRazorComponents(); app.Run(); \ No newline at end of file