feat: add dark mode and switch button

This commit is contained in:
2025-07-22 12:57:49 +04:00
parent dd9dc6790c
commit f36d565ae2
11 changed files with 328 additions and 101 deletions
+75 -68
View File
@@ -56,7 +56,7 @@
font-weight: 700;
line-height: 1.3;
margin-bottom: 1rem;
color: #000;
color: var(--text-color);
}
.video-info {
@@ -80,7 +80,7 @@
.video-views, .video-date {
font-size: 0.875rem;
color: #666;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 5px;
@@ -119,10 +119,11 @@
transition: background-color 0.2s;
height: 36px;
min-width: 80px;
color: var(--text-color);
}
.action-button:hover {
background-color: #f5f5f5;
background-color: var(--card-bg);
}
.download-button {
@@ -148,13 +149,13 @@
right: 0;
bottom: 0;
border-radius: 4px;
border: 1px dashed #999;
border: 1px dashed var(--text-secondary);
pointer-events: none;
}
.action-button i {
font-size: 1.25rem;
color: #444;
color: var(--text-secondary);
}
.action-button span {
@@ -276,7 +277,7 @@
font-size: 0.9375rem;
line-height: 1.6;
margin-bottom: 1.5rem;
color: #333;
color: var(--text-color);
}
/* Styles pour les éléments Markdown dans la description */
@@ -305,29 +306,31 @@
}
.video-description blockquote {
border-left: 4px solid #e0e0e0;
border-left: 4px solid var(--border-color);
padding-left: 1rem;
margin-left: 0;
margin-right: 0;
margin-bottom: 1rem;
color: #555;
color: var(--text-secondary);
font-style: italic;
}
.video-description code {
background-color: #f5f5f5;
background-color: var(--card-bg);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family: monospace;
font-size: 0.875rem;
color: var(--text-color);
}
.video-description pre {
background-color: #f5f5f5;
background-color: var(--card-bg);
padding: 1rem;
border-radius: 4px;
overflow-x: auto;
margin-bottom: 1rem;
color: var(--text-color);
}
.video-description pre code {
@@ -341,7 +344,7 @@
.video-description hr {
border: 0;
height: 1px;
background-color: #e0e0e0;
background-color: var(--border-color);
margin: 2rem 0;
}
@@ -368,7 +371,7 @@
left: 0;
right: 0;
height: 60px;
background: linear-gradient(transparent, #fff);
background: linear-gradient(transparent, var(--main-bg));
pointer-events: none;
}
@@ -403,18 +406,18 @@
/* Licence de la vidéo */
.video-licence {
background-color: #f9f9f9;
background-color: var(--card-bg);
border-radius: 8px;
padding: 1rem;
margin-bottom: 1.5rem;
border: 1px solid #eee;
border: 1px solid var(--border-color);
}
.licence-title {
font-size: 0.9375rem;
font-weight: 600;
margin: 0 0 0.5rem 0;
color: #333;
color: var(--text-color);
}
.licence-info {
@@ -443,7 +446,7 @@
.licence-label {
font-size: 0.875rem;
color: #555;
color: var(--text-secondary);
}
.video-tags {
@@ -454,14 +457,14 @@
}
.tag {
background-color: #f5f5f5;
background-color: var(--tag-bg);
border-radius: 16px;
padding: 0.4rem 0.75rem;
font-size: 0.8125rem;
color: #222;
color: var(--text-color);
text-decoration: none;
transition: all 0.2s ease;
border: 1px solid #e0e0e0;
border: 1px solid var(--border-color);
display: inline-flex;
align-items: center;
}
@@ -476,7 +479,7 @@
/* Commentaires */
.comments-section {
grid-column: 1;
background-color: #fff;
background-color: var(--card-bg);
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
@@ -489,7 +492,7 @@
align-items: center;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
border-bottom: 1px solid var(--border-color);
}
.section-title-wrapper {
@@ -501,7 +504,7 @@
font-size: 1.25rem;
font-weight: 600;
margin: 0;
color: #000;
color: var(--text-color);
line-height: 1;
}
@@ -520,7 +523,7 @@
}
.view-on-peertube:hover {
background-color: #f5f5f5;
background-color: var(--card-bg);
}
.view-on-peertube i {
@@ -530,7 +533,7 @@
.no-comments {
text-align: center;
padding: 2rem;
color: #666;
color: var(--text-secondary);
display: flex;
flex-direction: column;
align-items: center;
@@ -539,7 +542,7 @@
.no-comments i {
font-size: 2.5rem;
color: #ddd;
color: var(--border-color);
}
.no-comments p {
@@ -550,7 +553,7 @@
}
.no-comments p:last-child {
color: #999;
color: var(--text-secondary);
font-size: 0.875rem;
}
@@ -574,12 +577,14 @@
.comment-input textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #ddd;
border: 1px solid var(--border-color);
border-radius: 4px;
resize: none;
height: 80px;
margin-bottom: 0.75rem;
font-family: inherit;
background-color: var(--main-bg);
color: var(--text-color);
}
.comment-buttons {
@@ -594,7 +599,7 @@
border: none;
cursor: pointer;
font-weight: 500;
color: #666;
color: var(--text-secondary);
}
.comment-submit {
@@ -622,7 +627,7 @@
display: flex;
gap: 1rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid #eee;
border-bottom: 1px solid var(--border-color);
}
.comment:last-of-type {
@@ -657,16 +662,16 @@
.comment-author {
font-weight: 600;
color: #000;
color: var(--text-color);
}
.comment-date {
color: #666;
color: var(--text-secondary);
font-size: 0.875rem;
}
.comment-text {
color: #333;
color: var(--text-color);
line-height: 1.5;
white-space: pre-line;
margin-bottom: 0.75rem;
@@ -696,9 +701,9 @@
.comments-info {
margin-top: 1rem;
padding: 1rem;
background-color: #f8f9fa;
background-color: var(--card-bg);
border-radius: 8px;
color: #666;
color: var(--text-secondary);
display: flex;
flex-direction: column;
align-items: center;
@@ -708,7 +713,7 @@
.comments-info i {
font-size: 1.5rem;
color: #999;
color: var(--text-secondary);
}
.comments-info p {
@@ -740,8 +745,8 @@
display: flex;
flex-direction: column;
text-decoration: none;
color: inherit;
background-color: #f9f9f9;
color: var(--text-color);
background-color: var(--card-bg);
border-radius: 8px;
overflow: hidden;
transition: transform 0.2s;
@@ -790,11 +795,12 @@
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: var(--text-color);
}
.suggested-video-channel {
font-size: 0.75rem;
color: #666;
color: var(--text-secondary);
margin-bottom: 0.25rem;
display: flex;
align-items: center;
@@ -816,7 +822,7 @@
.suggested-video-metadata {
display: flex;
font-size: 12px;
color: #777;
color: var(--text-secondary);
gap: 10px;
}
@@ -870,13 +876,13 @@
.related-video-channel {
font-size: 12px;
color: #666;
color: var(--text-secondary);
margin-bottom: 2px;
}
.related-video-metadata {
font-size: 12px;
color: #888;
color: var(--text-secondary);
}
/* Media Queries */
@@ -1076,7 +1082,7 @@
}
.modal-content {
background-color: #fff;
background-color: var(--card-bg);
border-radius: 8px;
max-width: 500px;
width: 100%;
@@ -1101,7 +1107,7 @@
.modal-header {
padding: 15px 20px;
border-bottom: 1px solid #eee;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
@@ -1110,14 +1116,14 @@
.modal-header h3 {
margin: 0;
font-size: 1.25rem;
color: #333;
color: var(--text-color);
}
.modal-close {
background: none;
border: none;
font-size: 1rem;
color: #888;
color: var(--text-secondary);
cursor: pointer;
padding: 5px;
display: flex;
@@ -1130,8 +1136,8 @@
}
.modal-close:hover {
background-color: #f3f3f3;
color: #333;
background-color: var(--card-bg);
color: var(--text-color);
}
.modal-body {
@@ -1142,7 +1148,7 @@
.modal-body p {
margin-top: 0;
margin-bottom: 15px;
color: #666;
color: var(--text-secondary);
}
.download-options {
@@ -1156,16 +1162,16 @@
justify-content: space-between;
align-items: center;
padding: 12px 15px;
background-color: #f5f5f5;
background-color: var(--main-bg);
border-radius: 8px;
text-decoration: none;
color: #333;
color: var(--text-color);
font-weight: 500;
transition: background-color 0.2s, transform 0.2s;
}
.download-option:hover {
background-color: #e0e0e0;
background-color: var(--card-bg);
transform: translateY(-2px);
}
@@ -1184,22 +1190,22 @@
display: flex;
align-items: center;
gap: 10px;
color: #666;
color: var(--text-secondary);
font-size: 0.875rem;
}
.download-info i {
color: #444;
color: var(--text-secondary);
}
.modal-footer {
padding: 15px 20px;
border-top: 1px solid #eee;
border-top: 1px solid var(--border-color);
}
.download-info-text {
margin: 0;
color: #888;
color: var(--text-secondary);
font-size: 0.8125rem;
text-align: center;
}
@@ -1207,7 +1213,7 @@
.no-download-options {
text-align: center;
padding: 20px;
color: #666;
color: var(--text-secondary);
}
/* Adaptations responsives */
@@ -1228,7 +1234,7 @@
.share-link-box {
display: flex;
border: 1px solid #ddd;
border: 1px solid var(--border-color);
border-radius: 4px;
overflow: hidden;
margin-top: 8px;
@@ -1239,27 +1245,27 @@
padding: 10px 12px;
border: none;
font-size: 14px;
color: #333;
background-color: #f9f9f9;
color: var(--text-color);
background-color: var(--main-bg);
}
.share-link-box input:focus {
outline: none;
background-color: #fff;
background-color: var(--card-bg);
}
.copy-btn {
background-color: #f5f5f5;
background-color: var(--card-bg);
border: none;
border-left: 1px solid #ddd;
color: #555;
border-left: 1px solid var(--border-color);
color: var(--text-secondary);
padding: 0 15px;
cursor: pointer;
transition: background-color 0.2s;
}
.copy-btn:hover {
background-color: #e5e5e5;
background-color: var(--main-bg);
}
.copy-btn.copied {
@@ -1271,6 +1277,7 @@
margin-top: 20px;
margin-bottom: 10px;
font-weight: 500;
color: var(--text-color);
}
.share-platforms {
@@ -1285,15 +1292,15 @@
flex-direction: column;
align-items: center;
text-decoration: none;
color: #333;
color: var(--text-color);
padding: 15px 10px;
border-radius: 8px;
background-color: #f5f5f5;
background-color: var(--card-bg);
transition: transform 0.2s, background-color 0.2s;
}
.share-platform-btn:hover {
background-color: #e0e0e0;
background-color: var(--main-bg);
transform: translateY(-2px);
}
@@ -1310,7 +1317,7 @@
.share-embed {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #eee;
border-top: 1px solid var(--border-color);
}
@media (max-width: 576px) {