Skip to content

Commit

Permalink
Remove UseStaticFiles call in favor of linking to static files correc…
Browse files Browse the repository at this point in the history
…tly in the _Host file
  • Loading branch information
calledude committed Dec 22, 2023
1 parent 624ec3d commit 9278f20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Modix.Web/Pages/Index.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
margin: auto;
}
6 changes: 3 additions & 3 deletions Modix.Web/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link href="css/site.css" rel="stylesheet" />
<link href="Modix.Web.styles.css" rel="stylesheet" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link href="_content/Modix.Web/css/site.css" rel="stylesheet" />
<link href="_content/Modix.Web/Modix.Web.bundle.scp.css" rel="stylesheet" />
<link rel="shortcut icon" type="image/x-icon" href="_content/Modix.Web/favicon.ico"/>

<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
Expand Down
8 changes: 0 additions & 8 deletions Modix.Web/Setup.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using AspNet.Security.OAuth.Discord;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.FileProviders;
using Modix.Web.Models;
using Modix.Web.Security;
using Modix.Web.Services;
Expand All @@ -23,13 +22,6 @@ public static WebApplication ConfigureBlazorApplication(this WebApplication app)

app.UseHttpsRedirection();

var wwwrootCssFileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "..", "Modix.Web", "wwwroot", "css"));
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = wwwrootCssFileProvider,
RequestPath = "/css",
});

app.UseStaticFiles();

app.UseRouting();
Expand Down

0 comments on commit 9278f20

Please sign in to comment.