fix(routing): static Routes, InteractiveAuto HeadOutlet, drop DefaultLayout

Routes needs no render mode — layouts declare the interactive mode.
MainLayout (WASM) and CmsLayout (Server) are top-level islands with no
conflicting parent render mode. DefaultLayout removed so AuthBlocks auth
pages render self-contained without being forced into the WASM layout.
This commit is contained in:
Daniel Harvey
2026-05-18 23:39:44 -04:00
parent c20c7d0dbd
commit 90e07ea9d7
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -15,11 +15,11 @@
<link rel="stylesheet" href="styles/deepdrft-styles.css" /> <link rel="stylesheet" href="styles/deepdrft-styles.css" />
<ImportMap /> <ImportMap />
<link rel="icon" type="image/ico" href="deepdrft-logo.ico" /> <link rel="icon" type="image/ico" href="deepdrft-logo.ico" />
<HeadOutlet @rendermode="InteractiveServer" /> <HeadOutlet @rendermode="InteractiveAuto" />
</head> </head>
<body> <body>
<Routes @rendermode="InteractiveServer" /> <Routes />
<script src="_framework/blazor.web.js"></script> <script src="_framework/blazor.web.js"></script>
<script src=@Assets["_content/MudBlazor/MudBlazor.min.js"]></script> <script src=@Assets["_content/MudBlazor/MudBlazor.min.js"]></script>
<script type="module"> <script type="module">
+1 -3
View File
@@ -1,7 +1,7 @@
<Router AppAssembly="typeof(App).Assembly" <Router AppAssembly="typeof(App).Assembly"
AdditionalAssemblies="new[] { typeof(DeepDrftWeb.Client._Imports).Assembly, typeof(DeepDrftCms._Imports).Assembly, typeof(AuthBlocksWeb._Imports).Assembly }"> AdditionalAssemblies="new[] { typeof(DeepDrftWeb.Client._Imports).Assembly, typeof(DeepDrftCms._Imports).Assembly, typeof(AuthBlocksWeb._Imports).Assembly }">
<Found Context="routeData"> <Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(DeepDrftWeb.Client.Layout.MainLayout)"> <AuthorizeRouteView RouteData="routeData">
<NotAuthorized> <NotAuthorized>
@{ @{
NavigationManager.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(NavigationManager.Uri)}", forceLoad: true); NavigationManager.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(NavigationManager.Uri)}", forceLoad: true);
@@ -12,9 +12,7 @@
</Found> </Found>
<NotFound> <NotFound>
<PageTitle>Not found</PageTitle> <PageTitle>Not found</PageTitle>
<LayoutView Layout="typeof(DeepDrftWeb.Client.Layout.MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p> <p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound> </NotFound>
</Router> </Router>