From fda81877922e71c9f60671ebe889444e6751fcb3 Mon Sep 17 00:00:00 2001 From: Trond Schertel Date: Fri, 29 May 2026 11:35:02 +0200 Subject: [PATCH] MudBlazor und DB-Verbindung --- Components/App.razor | 6 +++++ Components/Layout/MainLayout.razor | 36 +++++++++++++++++++----------- Program.cs | 12 ++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/Components/App.razor b/Components/App.razor index 0390ee7..de47482 100644 --- a/Components/App.razor +++ b/Components/App.razor @@ -5,6 +5,12 @@ + + + + + + diff --git a/Components/Layout/MainLayout.razor b/Components/Layout/MainLayout.razor index 9e253ba..57d4973 100644 --- a/Components/Layout/MainLayout.razor +++ b/Components/Layout/MainLayout.razor @@ -1,20 +1,30 @@ @inherits LayoutComponentBase +@using MudBlazor -
- + + + -
-
- About -
+ + + @Body + + -
- @Body -
-
-
+@code { + private MudTheme _myCustomTheme = new MudTheme() + { + Typography = new Typography() + { + // Hier liegt der Fix: DefaultTypography statt Default + Default = new DefaultTypography() { FontFamily = new[] { "Urbanist", "sans-serif" } } + }, + LayoutProperties = new LayoutProperties() + { + DefaultBorderRadius = "0px" + } + }; +}
An unhandled error has occurred. diff --git a/Program.cs b/Program.cs index 98b1fcc..b383c02 100644 --- a/Program.cs +++ b/Program.cs @@ -1,10 +1,22 @@ using ZahlenAnalyse.Web.Components; +using MudBlazor.Services; +using Raven.Client.Documents; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); +builder.Services.AddMudServices(); + +var store = new DocumentStore +{ + Urls = new[] { "http://localhost:8080" }, + Database = "ZahlenAnalyse" +}; +store.Initialize(); +builder.Services.AddSingleton(store); + var app = builder.Build();