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"> <div class="flex flex-col h-screen overflow-x-auto">
<header class="md:hidden p-4 flex justify-between bg-base-200"> <header class="md:hidden p-4 flex justify-between bg-base-200">
<div class="h-12"> <div class="h-12">
<LogoPartial /> <LogoPartial/>
</div> </div>
<label for="main-drawer" class="btn btn-square btn-ghost drawer-button" title="open navigation"> <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"> <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> @using Wave.Data
<source type="image/jxl" srcset="img/logo.jxl" /> @using Microsoft.Extensions.Options
<source type="image/webp" srcset="img/logo.webp" /> @inject IOptions<Customization> Customizations
<source type="image/svg+xml" scrset="img/logo.svg" />
<img class="max-h-full object-contain object-left" src="img/logo.png" alt="Wave" /> @if (Customizations.Value.LogoLink is { } logo && !string.IsNullOrWhiteSpace(logo)) {
</picture> <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 class Customization {
public string AppName { get; set; } = "Wave"; public string AppName { get; set; } = "Wave";
public string LogoLink { get; set; } = "";
public string Footer { get; set; } = ""; public string Footer { get; set; } = "";
} }