video page responsive
This commit is contained in:
+127
-88
@@ -292,85 +292,87 @@
|
||||
}
|
||||
|
||||
/* Vidéos suggérées */
|
||||
.suggested-videos {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 2rem;
|
||||
padding: 1.5rem;
|
||||
.video-suggestions {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.video-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1.5rem;
|
||||
.suggestion-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.video-card {
|
||||
cursor: pointer;
|
||||
.suggested-video {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.video-card:hover {
|
||||
.suggested-video:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.video-thumbnail {
|
||||
.suggested-video-thumbnail {
|
||||
position: relative;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.video-thumbnail img {
|
||||
width: 100%;
|
||||
aspect-ratio: 16/9;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s;
|
||||
padding-top: 56.25%; /* Ratio 16:9 */
|
||||
}
|
||||
|
||||
.video-card:hover .video-thumbnail img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.video-play-icon {
|
||||
.suggested-video-thumbnail img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.video-play-icon i {
|
||||
font-size: 3rem;
|
||||
.suggested-video-duration {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
opacity: 0.9;
|
||||
font-size: 12px;
|
||||
padding: 2px 4px;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.video-card:hover .video-play-icon {
|
||||
opacity: 1;
|
||||
.suggested-video-info {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.video-info h3 {
|
||||
font-size: 0.9375rem;
|
||||
.suggested-video-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 0.5rem;
|
||||
margin: 0 0 5px 0;
|
||||
line-height: 1.3;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.video-tag {
|
||||
display: inline-block;
|
||||
background-color: #f0f0f0;
|
||||
color: #333;
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
.suggested-video-channel {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.suggested-video-metadata {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
color: #777;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.suggested-video-views, .suggested-video-date {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Vidéos associées */
|
||||
@@ -434,39 +436,37 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.related-videos {
|
||||
.video-content {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.related-videos-list {
|
||||
.video-suggestions {
|
||||
grid-column: 1;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.suggestion-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.related-video-card {
|
||||
flex-direction: column;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.related-video-thumbnail {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-top: 56.25%;
|
||||
margin-right: 0;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.related-video-thumbnail img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.video-player-container {
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
width: calc(100% + 40px);
|
||||
}
|
||||
|
||||
.video-player {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.video-player iframe {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.video-info {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
@@ -478,27 +478,40 @@
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.video-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
.suggestion-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.related-videos-list {
|
||||
grid-template-columns: 1fr;
|
||||
.video-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.related-video-card {
|
||||
flex-direction: row;
|
||||
margin-bottom: 15px;
|
||||
.video-player-container {
|
||||
width: 100vw;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
.related-video-thumbnail {
|
||||
width: 120px;
|
||||
height: 68px;
|
||||
padding-top: 0;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 0;
|
||||
.video-content,
|
||||
.video-suggestions {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.video-title {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.video-actions {
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
padding: 0.3rem;
|
||||
}
|
||||
|
||||
.comment {
|
||||
@@ -509,7 +522,33 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.video-grid {
|
||||
grid-template-columns: 1fr;
|
||||
.suggested-video {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.suggested-video-thumbnail {
|
||||
width: 120px;
|
||||
min-width: 120px;
|
||||
height: 68px;
|
||||
padding-top: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.suggested-video-info {
|
||||
padding: 5px;
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
|
||||
.suggested-video-title {
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Message d'erreur */
|
||||
.error-message {
|
||||
text-align: center;
|
||||
padding: 50px 20px;
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ if (empty($videoData) || isset($videoData['error'])) {
|
||||
<div class="video-page">
|
||||
<div class="video-player-container">
|
||||
<div class="video-player">
|
||||
<iframe src="<?php echo $video['url']; ?>" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe src="<?php echo $video['url']; ?>" frameborder="0" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" title="<?php echo htmlspecialchars($video['title']); ?>"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -259,9 +259,9 @@ if (empty($videoData) || isset($videoData['error'])) {
|
||||
<a href="video.php?id=<?php echo $suggestedVideo['id']; ?>" class="suggested-video">
|
||||
<div class="suggested-video-thumbnail">
|
||||
<img src="<?php echo $suggestedVideo['thumbnail']; ?>" alt="<?php echo $suggestedVideo['title']; ?>">
|
||||
<span class="suggested-video-duration"><?php echo formatDuration($suggestedVideo['duration']); ?></span>
|
||||
</div>
|
||||
<div class="suggested-video-info">
|
||||
<span class="suggested-video-duration"><?php echo formatDuration($suggestedVideo['duration']); ?></span>
|
||||
<h4 class="suggested-video-title"><?php echo $suggestedVideo['title']; ?></h4>
|
||||
<div class="suggested-video-channel"><?php echo $suggestedVideo['channel']; ?></div>
|
||||
<div class="suggested-video-metadata">
|
||||
|
||||
Reference in New Issue
Block a user