Skip to content

Commit

Permalink
Merge pull request #4063 from sbwalker/dev
Browse files Browse the repository at this point in the history
fix #4061 - invalid type for favicon
  • Loading branch information
sbwalker authored Mar 25, 2024
2 parents 9fd0122 + c49ef49 commit 045c225
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Oqtane.Client/UI/ThemeBuilder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
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 += $"<link id=\"app-favicon\" rel=\"icon\" href=\"{Utilities.FileUrl(PageState.Alias, PageState.Site.FaviconFileId.Value)}\" />\n";
}
else
{
headcontent += $"<link id=\"app-favicon\" rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n";
}
headcontent += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/{favicontype}\" href=\"{favicon}\" />\n";

// head content
AddHeadContent(headcontent, PageState.Site.HeadContent);
Expand Down

0 comments on commit 045c225

Please sign in to comment.