This commit is contained in:
Jamie.Rees 2016-11-25 13:58:54 +00:00
parent 92d4c0d9c1
commit 698d31ae2a
2 changed files with 19 additions and 0 deletions

View file

@ -262,6 +262,23 @@ namespace PlexRequests.UI.Helpers
return helper.Raw(asset);
}
public static IHtmlString LoadFavIcon(this HtmlHelpers helper)
{
var settings = GetSettings();
if (!settings.CollectAnalyticData)
{
return helper.Raw(string.Empty);
}
var assetLocation = GetBaseUrl();
var content = GetContentUrl(assetLocation);
var asset = $"<link rel=\"SHORTCUT ICON\" href=\"{content}/Content/favicon.ico\" />";
asset += $"<link rel=\"icon\" href=\"{content}/Content/favicon.ico\" type=\"image/ico\" />";
return helper.Raw(asset);
}
public static IHtmlString GetSidebarUrl(this HtmlHelpers helper, NancyContext context, string url, string title)
{
var content = GetLinkUrl(GetBaseUrl());