proxitok/templates/views/video.latte
Chris Novakovic 013feeb679 Set page title to video description in video view
If the upstream video has a description set, use it as the page title in
place of "Video" in the video view. This helps to disambiguate video
pages in the browser history.
2023-02-27 23:11:36 +00:00

51 lines
1.9 KiB
Plaintext

{layout "../layouts/{$layout}.latte"}
{var $og = $info->meta->og}
{var $og_content = $item->video->originCover}
{var $og_url = url_video_internal($info->detail->uniqueId, $item->id)}
{if !empty($item->desc)}
{var $title = trim($item->desc)}
{/if}
{block content}
<div class="columns is-centered is-vcentered is-gapless">
<div class="column has-text-centered">
<video controls autoplay poster="{url_stream($item->video->originCover)}">
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
</video>
</div>
<div class="column">
<div class="box">
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="{url_stream($info->detail->avatarThumb)}" />
</p>
</figure>
<div class="media-content">
<p>
<strong>{$info->detail->nickname}</strong>
<small>
<a href="{url_user($info->detail->uniqueId)}">@{$info->detail->uniqueId}</a>
</small>
<small title="{date('M d, Y H:i:s e', $item->createTime)}">{date('M d, Y', $item->createTime)}</small>
</p>
{if !empty($item->challenges)}
<p>{include '../components/themes/common/tags.latte', challenges: $item->challenges}</p>
{/if}
<div class="content">
<p n:ifcontent>{$item->desc}</p>
{include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
<div class="has-text-centered">
{include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id}
{include '../components/themes/common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $info->detail->uniqueId}
</div>
</div>
</div>
</article>
</div>
</div>
</div>
{/block}