mirror of
https://codeberg.org/ashley/poke
synced 2026-03-03 20:03:44 +00:00
owo
This commit is contained in:
26
core/LightTube/Views/Feed/Channels.cshtml
Normal file
26
core/LightTube/Views/Feed/Channels.cshtml
Normal file
@@ -0,0 +1,26 @@
|
||||
@using LightTube.Database
|
||||
@model LightTube.Contexts.FeedContext
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Channel list";
|
||||
}
|
||||
|
||||
<div class="video-list">
|
||||
@foreach (LTChannel channel in Model.Channels)
|
||||
{
|
||||
<div class="channel">
|
||||
<a href="/channel/@channel.ChannelId" class="avatar">
|
||||
<img src="@channel.IconUrl" alt="Channel Avatar">
|
||||
</a>
|
||||
<a href="/channel/@channel.ChannelId" class="info">
|
||||
<span class="name max-lines-2">@channel.Name</span>
|
||||
<div>
|
||||
<div>
|
||||
<span>@channel.Subscribers</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<button class="subscribe-button" data-cid="@channel.ChannelId">Subscribe</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
8
core/LightTube/Views/Feed/Explore.cshtml
Normal file
8
core/LightTube/Views/Feed/Explore.cshtml
Normal file
@@ -0,0 +1,8 @@
|
||||
@{
|
||||
ViewData["Title"] = "Explore";
|
||||
ViewData["SelectedGuideItem"] = "explore";
|
||||
}
|
||||
|
||||
<div style="text-align: center">
|
||||
<h1>Coming soon!</h1>
|
||||
</div>
|
||||
35
core/LightTube/Views/Feed/Playlists.cshtml
Normal file
35
core/LightTube/Views/Feed/Playlists.cshtml
Normal file
@@ -0,0 +1,35 @@
|
||||
@using LightTube.Database
|
||||
@model LightTube.Contexts.PlaylistsContext
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Playlists";
|
||||
ViewData["SelectedGuideItem"] = "library";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
||||
<div class="video-list">
|
||||
<h2>Playlists</h2>
|
||||
@foreach (LTPlaylist playlist in Model.Playlists)
|
||||
{
|
||||
<div class="playlist">
|
||||
<a href="/watch?v=@playlist.VideoIds.FirstOrDefault()&list=@playlist.Id" class="thumbnail" style="background-image: url('https://i.ytimg.com/vi_webp/@playlist.VideoIds.FirstOrDefault()/maxresdefault.webp')">
|
||||
<div>
|
||||
<span>@playlist.VideoIds.Count</span><span>VIDEOS</span>
|
||||
</div>
|
||||
</a>
|
||||
<div class="info">
|
||||
<a href="/watch?v=@playlist.VideoIds.FirstOrDefault()&list=@playlist.Id" class="title max-lines-2">@playlist.Name</a>
|
||||
<div>
|
||||
<a href="/channel/@PlaylistManager.GenerateAuthorId(playlist.Author)">@playlist.Author</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/playlist?list=@playlist.Id">
|
||||
<b>View Full Playlist</b>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
55
core/LightTube/Views/Feed/Subscriptions.cshtml
Normal file
55
core/LightTube/Views/Feed/Subscriptions.cshtml
Normal file
@@ -0,0 +1,55 @@
|
||||
@using Humanizer
|
||||
@using LightTube.Database
|
||||
@using System.Web
|
||||
@model LightTube.Contexts.FeedContext
|
||||
@{
|
||||
ViewData["Title"] = "Subscriptions";
|
||||
ViewData["SelectedGuideItem"] = "subs";
|
||||
|
||||
bool minMode = false;
|
||||
if (Context.Request.Cookies.TryGetValue("minMode", out string minModeString))
|
||||
bool.TryParse(minModeString, out minMode);
|
||||
}
|
||||
|
||||
<div class="horizontal-channel-list" style="max-width: @(!Model.MobileLayout ? $"calc(100vw - {(minMode ? 80 : 312)}px);" : "")">
|
||||
<a href="/feed/channels" class="channel">
|
||||
<i class="bi bi-gear"></i>
|
||||
<div class="name max-lines-2">Manage Channels</div>
|
||||
</a>
|
||||
<a href="/rss?token=@HttpUtility.UrlEncode(Model.RssToken)" class="channel">
|
||||
<i class="bi bi-rss"></i>
|
||||
<div class="name max-lines-2">RSS Feed</div>
|
||||
</a>
|
||||
@foreach (LTChannel channel in Model.Channels)
|
||||
{
|
||||
<a href="/channel/@channel.ChannelId" class="channel">
|
||||
<img src="@channel.IconUrl" loading="lazy">
|
||||
<div class="name max-lines-2">@channel.Name</div>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="rich-video-grid">
|
||||
@foreach (FeedVideo video in Model.Videos)
|
||||
{
|
||||
<div class="video">
|
||||
<a href="/watch?v=@video.Id" class="thumbnail img-thumbnail">
|
||||
<img src="@video.Thumbnail" loading="lazy">
|
||||
</a>
|
||||
<a href="/channel/@video.ChannelId" class="avatar">
|
||||
<img src="@Model.Channels.First(x => x.ChannelId == video.ChannelId).IconUrl">
|
||||
</a>
|
||||
<div class="info">
|
||||
<a href="/watch?v=@video.Id" class="title max-lines-2">@video.Title</a>
|
||||
<div>
|
||||
<a href="/channel/@video.ChannelId">@video.ChannelName</a>
|
||||
<div>
|
||||
<span>@video.ViewCount views</span>
|
||||
<span>•</span>
|
||||
<span>@video.PublishedDate.Humanize(DateTimeOffset.Now)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
Reference in New Issue
Block a user