add channel link on video page

This commit is contained in:
2025-04-10 11:48:56 +04:00
parent f5e63e2c8d
commit 87d06ad174
2 changed files with 57 additions and 7 deletions
+41
View File
@@ -1,3 +1,7 @@
:root {
--primary-red: #FF0000;
}
/* Styles pour la page vidéo */
.video-page {
display: grid;
@@ -216,6 +220,43 @@
line-height: 1.4;
}
.channel-avatar-link {
transition: transform 0.2s ease-in-out;
display: block;
}
.channel-avatar-link:hover {
transform: scale(1.05);
}
.channel-name-link {
text-decoration: none;
color: inherit;
position: relative;
display: inline-block;
}
.channel-name-link:hover .channel-name {
color: var(--primary-red);
}
.channel-name-link:after {
content: '';
position: absolute;
width: 100%;
height: 2px;
bottom: -3px;
left: 0;
background-color: var(--primary-red);
transform: scaleX(0);
transition: transform 0.3s;
transform-origin: bottom left;
}
.channel-name-link:hover:after {
transform: scaleX(1);
}
.subscribe-button {
background-color: #0d6efd;
color: white;
+9
View File
@@ -245,17 +245,26 @@ if (empty($videoData) || isset($videoData['error'])) {
<div class="video-secondary-info">
<div class="channel-info">
<?php
$channelUrl = PEERTUBE_URL . '/c/' . $video['channelHandle'];
?>
<?php if (strpos($channelAvatar, 'default-avatar') !== false || empty($channelAvatar)): ?>
<a href="<?php echo $channelUrl; ?>" target="_blank" rel="noopener noreferrer" class="channel-avatar-link">
<div class="channel-avatar-placeholder">
<i class="fas fa-user-circle"></i>
</div>
</a>
<?php else: ?>
<a href="<?php echo $channelUrl; ?>" target="_blank" rel="noopener noreferrer" class="channel-avatar-link">
<div class="channel-avatar">
<img src="<?php echo $channelAvatar; ?>" alt="<?php echo $video['channel']; ?>">
</div>
</a>
<?php endif; ?>
<div class="channel-details">
<a href="<?php echo $channelUrl; ?>" target="_blank" rel="noopener noreferrer" class="channel-name-link">
<h3 class="channel-name"><?php echo $video['channel']; ?></h3>
</a>
</div>
</div>