From 726f9375e114fd56d375e28218d313bab53c2401 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 12 Jun 2023 12:30:56 -0400 Subject: [PATCH] handle type for favicon and improve helptext --- Oqtane.Client/Resources/Modules/Admin/Site/Index.resx | 2 +- Oqtane.Client/UI/ThemeBuilder.razor | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx index 0c5655db..e4a4c438 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx @@ -175,7 +175,7 @@ Specify a logo for the site - Specify a Favicon + Specify a Favicon. The format for the image must be 16×16, 32×32, 48×48, or 64×64 pixels in size, and 8-bit, 24-bit, or 32-bit in color depth. The format of the image must be ICO, PNG, or GIF. Select the sites default theme diff --git a/Oqtane.Client/UI/ThemeBuilder.razor b/Oqtane.Client/UI/ThemeBuilder.razor index dc03e12e..a26f3e26 100644 --- a/Oqtane.Client/UI/ThemeBuilder.razor +++ b/Oqtane.Client/UI/ThemeBuilder.razor @@ -33,11 +33,13 @@ var headcontent = ""; // favicon var favicon = "favicon.ico"; + var favicontype = "x-icon"; if (PageState.Site.FaviconFileId != null) { favicon = Utilities.FileUrl(PageState.Alias, PageState.Site.FaviconFileId.Value); + favicontype = favicon.Substring(favicon.LastIndexOf(".") + 1); } - headcontent += $"\n"; + headcontent += $"\n"; // stylesheets foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet)) {