pull/733/head
Jamie.Rees 8 years ago
parent 92d4c0d9c1
commit 698d31ae2a

@ -262,6 +262,23 @@ namespace PlexRequests.UI.Helpers
return helper.Raw(asset); 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) public static IHtmlString GetSidebarUrl(this HtmlHelpers helper, NancyContext context, string url, string title)
{ {
var content = GetLinkUrl(GetBaseUrl()); var content = GetLinkUrl(GetBaseUrl());

@ -22,6 +22,8 @@
<meta charset="utf-8"> <meta charset="utf-8">
<!-- Styles --> <!-- Styles -->
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@Html.LoadFavIcon()
@Html.LoadAnalytics() @Html.LoadAnalytics()
@Html.LoadAssets() @Html.LoadAssets()
</head> </head>
Loading…
Cancel
Save