diff --git a/TASVideos/Extensions/ViewDataDictionaryExtensions.cs b/TASVideos/Extensions/ViewDataDictionaryExtensions.cs index b58a652fe..78c7dab96 100644 --- a/TASVideos/Extensions/ViewDataDictionaryExtensions.cs +++ b/TASVideos/Extensions/ViewDataDictionaryExtensions.cs @@ -25,6 +25,14 @@ public static MetaTag GetMetaTags(this ViewDataDictionary viewData) public static void SetTitle(this ViewDataDictionary viewData, string title) => viewData["Title"] = title; + public static string GetFavicon(this ViewDataDictionary viewData) => viewData["Favicon"]?.ToString() ?? "favicon.ico"; + + public static void UseGreenFavicon(this ViewDataDictionary viewData) + => viewData["Favicon"] = "favicon_green.ico"; + + public static void UseRedFavicon(this ViewDataDictionary viewData) + => viewData["Favicon"] = "favicon_red.ico"; + public static void SetHeading(this ViewDataDictionary viewData, string heading) => viewData["Heading"] = heading; diff --git a/TASVideos/Pages/Publications/View.cshtml b/TASVideos/Pages/Publications/View.cshtml index 3c7ff794d..3d27b760c 100644 --- a/TASVideos/Pages/Publications/View.cshtml +++ b/TASVideos/Pages/Publications/View.cshtml @@ -1,6 +1,7 @@ @page "{id}" @model ViewModel @{ + ViewData.UseGreenFavicon(); ViewData.IgnorePageTitle(); ViewData.SetTitle($"{Model.Publication.Title} - Movie #{Model.Id}"); ViewData.SetMetaTags(new MetaTag diff --git a/TASVideos/Pages/Shared/_Layout.cshtml b/TASVideos/Pages/Shared/_Layout.cshtml index 79c7a6551..6be0ef764 100644 --- a/TASVideos/Pages/Shared/_Layout.cshtml +++ b/TASVideos/Pages/Shared/_Layout.cshtml @@ -9,7 +9,7 @@ @{ var title = ViewData.GetTitle(); }