Merge pull request #2885 from sbwalker/dev
handle type for favicon and improve helptext
This commit is contained in:
commit
875bcd8ce2
|
@ -175,7 +175,7 @@
|
|||
<value>Specify a logo for the site</value>
|
||||
</data>
|
||||
<data name="FavoriteIcon.HelpText" xml:space="preserve">
|
||||
<value>Specify a Favicon</value>
|
||||
<value>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.</value>
|
||||
</data>
|
||||
<data name="DefaultTheme.HelpText" xml:space="preserve">
|
||||
<value>Select the sites default theme</value>
|
||||
|
|
|
@ -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 += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{favicon}\" />\n";
|
||||
headcontent += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/{favicontype}\" href=\"{favicon}\" />\n";
|
||||
// stylesheets
|
||||
foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user