Added customization for setting a default theme

This commit is contained in:
Mia Rose Winter 2024-01-25 13:48:14 +01:00
parent cb8e12d01d
commit d1e58f7f2a
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
3 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,10 @@
@using System.Globalization
@using Microsoft.AspNetCore.Localization
@using Microsoft.Extensions.Options
@using Wave.Data
@inject IOptions<Customization> Customizations
<!DOCTYPE html>
<html lang="@CultureInfo.CurrentUICulture.ToString()" data-theme="@UserTheme">
<html lang="@CultureInfo.CurrentUICulture.ToString()" data-theme="@(UserTheme ?? Customizations.Value.DefaultTheme)">
<head>
<meta charset="utf-8" />

View file

@ -2,6 +2,7 @@
public class Customization {
public string AppName { get; set; } = "Wave";
public string DefaultTheme { get; set; } = "";
public string LogoLink { get; set; } = "";
public string Footer { get; set; } = "";
}