diff --git a/TASVideos/Pages/Shared/_NicoEmbed.cshtml b/TASVideos/Pages/Shared/_NicoEmbed.cshtml new file mode 100644 index 000000000..77f0e5fde --- /dev/null +++ b/TASVideos/Pages/Shared/_NicoEmbed.cshtml @@ -0,0 +1,11 @@ +@model string +@{ + var code = Model.Split('/').Last(); + var embedLink = $"//embed.nicovideo.jp/watch/{code}"; + var fullLink = $"//www.nicovideo.jp/watch/{code}"; +} +
+ +
+ (Link to video) +
\ No newline at end of file diff --git a/TASVideos/Pages/Submissions/View.cshtml b/TASVideos/Pages/Submissions/View.cshtml index a88605b2f..fd73affd1 100644 --- a/TASVideos/Pages/Submissions/View.cshtml +++ b/TASVideos/Pages/Submissions/View.cshtml @@ -29,6 +29,8 @@ ? "https://i.ytimg.com/vi/" + Model.Submission.EncodeEmbedLink.Split('/').Last() + "/hqdefault.jpg" : null; + var isNicoEmbed = hasEncode && Model.Submission.EncodeEmbedLink!.Contains("nicovideo"); + ViewData.SetMetaTags(new MetaTagModel { Title = Model.Submission.Title, @@ -60,7 +62,8 @@
- + +