Added simple customization to replace wave logo

This commit is contained in:
Mia Rose Winter 2024-01-23 14:49:10 +01:00
parent 70c7052110
commit e1d8520b26
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
4 changed files with 17 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@
<div class="flex flex-col h-screen overflow-x-auto">
<header class="md:hidden p-4 flex justify-between bg-base-200">
<div class="h-12">
<LogoPartial />
<LogoPartial/>
</div>
<label for="main-drawer" class="btn btn-square btn-ghost drawer-button" title="open navigation">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">

View file

@ -1,6 +1,14 @@
<picture>
<source type="image/jxl" srcset="img/logo.jxl" />
<source type="image/webp" srcset="img/logo.webp" />
<source type="image/svg+xml" scrset="img/logo.svg" />
<img class="max-h-full object-contain object-left" src="img/logo.png" alt="Wave" />
</picture>
@using Wave.Data
@using Microsoft.Extensions.Options
@inject IOptions<Customization> Customizations
@if (Customizations.Value.LogoLink is { } logo && !string.IsNullOrWhiteSpace(logo)) {
<img class="max-h-full object-contain object-left" src="@logo" alt="" />
} else {
<picture>
<source type="image/jxl" srcset="img/logo.jxl" />
<source type="image/webp" srcset="img/logo.webp" />
<source type="image/svg+xml" scrset="img/logo.svg" />
<img class="max-h-full object-contain object-left" src="img/logo.png" alt="Wave" />
</picture>
}

View file

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