Repository navigation
Expand file tree
/
Copy pathVideoGroup.cshtml
More file actions
59 lines (57 loc) · 3.02 KB
/
Copy pathVideoGroup.cshtml
File metadata and controls
59 lines (57 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@page
@model MyApp.Pages.Shared.VideoGroup
@inject MarkdownVideos Videos
@{
var videos = Videos.GetVideos(Model.Group);
}
<!-- BSD License: https://docs.servicestack.net/BSD-LICENSE.txt -->
<section>
<div class="@Model.Background py-24 sm:py-32">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div class="mx-auto max-w-5xl">
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">@Model.Title</h2>
<p class="mt-2 text-lg leading-8 text-gray-600">
@Model.Summary
@if (Model.LearnMore != null)
{
<a href="@Model.LearnMore" class="ml-2 text-sm font-semibold leading-6">Learn more <span aria-hidden="true">→</span></a>
}
</p>
<div class="mt-16 space-y-20 lg:mt-20 lg:space-y-20">
@foreach (var video in videos)
{
var videoId = video.Url.LastRightPart('/');
<article class="relative isolate flex flex-col gap-8 lg:flex-row">
<div class="relative lg:w-1/2 lg:shrink-0">
<lite-youtube width="560" height="315" videoid="@videoId" class="@Model.Border"
style="margin-bottom:3px;background-image: url('https://img.youtube.com/vi/@videoId/maxresdefault.jpg')">
</lite-youtube>
</div>
<div>
<div class="flex items-center gap-x-4 text-xs">
<time datetime="2020-03-16" class="text-gray-500">@($"{video.Date.Value:MMMM d, yyyy}")</time>
@foreach (var tag in video.Tags.Safe())
{
<span class="relative z-10 rounded-full bg-gray-50 dark:bg-gray-900 py-1.5 px-3 font-medium text-gray-600 dark:text-gray-300">@tag</span>
}
</div>
<div class="group relative max-w-xl">
<h3 class="mt-3 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600">
<a href="@video.Url">
@video.Title
</a>
</h3>
<div class="mt-5 text-sm leading-6 text-gray-600">
<div class="prose">
@Html.Raw(video.Preview)
</div>
</div>
</div>
</div>
</article>
}
</div>
</div>
</div>
</div>
</section>