fix player wrapper and player channel links

This commit is contained in:
simon 2021-12-07 08:25:46 +07:00
parent 42eec604a7
commit 279c4538ca
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
4 changed files with 11 additions and 11 deletions

View File

@ -117,7 +117,7 @@
{% if videos %}
{% for video in videos %}
<div class="video-item {{ view_style }}">
<a href="#player" data-src="/media/{{ video.source.media_url }}" data-thumb="/cache/{{ video.source.vid_thumb_url }}" data-title="{{ video.source.title }}" data-channel="{{ video.source.channel.channel_name }}" data-id="{{ video.source.youtube_id }}" onclick="createPlayer(this)">
<a href="#player" data-src="/media/{{ video.source.media_url }}" data-thumb="/cache/{{ video.source.vid_thumb_url }}" data-title="{{ video.source.title }}" data-channel="{{ video.source.channel.channel_name }}" data-channel-id="{{ video.source.channel.channel_id }}" data-id="{{ video.source.youtube_id }}" onclick="createPlayer(this)">
<div class="video-thumb-wrap {{ view_style }}">
<div class="video-thumb">
<img src="/cache/{{ video.source.vid_thumb_url }}" alt="video-thumb">

View File

@ -66,7 +66,6 @@
</div>
<div id="player" class="player-wrapper"></div>
<div class="boxed-content">
<div id="player" class="video-player"></div>
<div class="view-controls">
<div class="toggle">
<span>Hide watched videos:</span>
@ -86,7 +85,7 @@
{% if videos %}
{% for video in videos %}
<div class="video-item {{ view_style }}">
<a href="#player" data-src="/media/{{ video.source.media_url }}" data-thumb="/cache/{{ video.source.vid_thumb_url }}" data-title="{{ video.source.title }}" data-channel="{{ video.source.channel.channel_name }}" data-id="{{ video.source.youtube_id }}" onclick="createPlayer(this)">
<a href="#player" data-src="/media/{{ video.source.media_url }}" data-thumb="/cache/{{ video.source.vid_thumb_url }}" data-title="{{ video.source.title }}" data-channel="{{ video.source.channel.channel_name }}" data-channel-id="{{ video.source.channel.channel_id }}" data-id="{{ video.source.youtube_id }}" onclick="createPlayer(this)">
<div class="video-thumb-wrap {{ view_style }}">
<div class="video-thumb">
<img src="/cache/{{ video.source.vid_thumb_url }}" alt="video-thumb">

View File

@ -436,7 +436,8 @@ button:hover {
text-align: left;
}
.video-desc h3 {
.video-desc h3,
.player-title h3 {
font-size: 0.9em;
text-transform: uppercase;
}

View File

@ -321,13 +321,6 @@ function createPlayer(button) {
titleBar.appendChild(closeButton);
// played
titleBar.appendChild(playedStatus);
// video title
var videoTitleLink = document.createElement('a');
videoTitleLink.setAttribute('href', '/video/' + dataId + '/');
var videoTitle = document.createElement('h2');
videoTitle.innerText = mediaTitle;
videoTitleLink.appendChild(videoTitle);
titleBar.appendChild(videoTitleLink);
// channel title
var channelTitleLink = document.createElement('a');
channelTitleLink.setAttribute('href', '/channel/' + mediaChannelId + '/');
@ -335,6 +328,13 @@ function createPlayer(button) {
channelTitle.innerText = mediaChannel;
channelTitleLink.appendChild(channelTitle);
titleBar.appendChild(channelTitleLink);
// video title
var videoTitleLink = document.createElement('a');
videoTitleLink.setAttribute('href', '/video/' + dataId + '/');
var videoTitle = document.createElement('h2');
videoTitle.innerText = mediaTitle;
videoTitleLink.appendChild(videoTitle);
titleBar.appendChild(videoTitleLink);
// add titlebar
playerElement.appendChild(titleBar);
// add whole