]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-video-miniature/video-miniature.component.scss
Add `i18n` prop where it is missing (#3946)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-miniature.component.scss
CommitLineData
63c4db6d
C
1@import '_variables';
2@import '_mixins';
830b4faf 3@import '_miniature';
63c4db6d 4
adcf9212 5$more-button-width: 40px;
743f023c 6
0f7407d9
C
7.video-miniature-name {
8 @include miniature-name;
9}
501bc6c2 10
0f7407d9
C
11.video-miniature-information {
12 width: calc(100% - #{$more-button-width});
13}
501bc6c2 14
0f7407d9
C
15.avatar {
16 margin: 10px 10px 0 0;
cf78883c 17
0f7407d9
C
18 img:not(.channel) {
19 @include avatar(40px);
20 }
cf78883c 21
0f7407d9
C
22 img.channel {
23 @include channel-avatar(40px);
24 }
25}
deb8b9cd 26
0f7407d9
C
27.video-miniature-created-at-views {
28 font-size: 13px;
29}
501bc6c2 30
0f7407d9
C
31.video-miniature-account,
32.video-miniature-channel {
33 @include disable-default-a-behaviour;
34 @include ellipsis;
33253c1a 35
0f7407d9
C
36 display: block;
37 font-size: 13px;
38 color: pvar(--greyForegroundColor);
00a44645 39
0f7407d9
C
40 &:hover {
41 color: $grey-foreground-hover-color;
42 }
43}
adcf9212 44
0f7407d9
C
45.video-info-privacy,
46.video-info-blocked .blocked-label,
47.video-info-nsfw {
48 font-weight: $font-semibold;
49}
03e12d7c 50
0f7407d9
C
51.video-info-blocked {
52 color: red;
03e12d7c 53
0f7407d9
C
54 .blocked-reason::before {
55 content: ' - ';
56 }
57}
0f4905e1 58
0f7407d9
C
59.video-info-nsfw {
60 color: red;
61}
e2409062 62
0f7407d9
C
63.video-actions {
64 width: $more-button-width;
65 height: 30px;
e2409062 66
0f7407d9
C
67 ::ng-deep .dropdown-root:not(.show) {
68 opacity: 0;
69 }
e2409062 70
0f7407d9
C
71 ::ng-deep .playlist-dropdown.show + my-action-dropdown .dropdown-root {
72 opacity: 1;
73 }
e2409062 74
0f7407d9
C
75 ::ng-deep .more-icon {
76 opacity: .6;
3a0fb65c 77
0f7407d9
C
78 &:hover {
79 opacity: 1;
80 }
81 }
82}
3a0fb65c 83
0f7407d9
C
84.video-miniature {
85 &:hover ::ng-deep .video-thumbnail-actions-overlay,
86 &:hover .video-actions ::ng-deep .dropdown-root {
87 opacity: 1 !important;
88 }
89}
3a0fb65c 90
0f7407d9
C
91// Grid mode
92// Takes all the width on mobile
93.video-miniature:not(.display-as-row) {
94 display: flex;
95 flex-direction: column;
96 padding-bottom: $video-miniature-margin-bottom;
97 width: 100%;
3a0fb65c 98
0f7407d9 99 my-video-thumbnail {
cdeddff1 100 @include block-ratio($selector: '::ng-deep .video-thumbnail');
0f7407d9 101 }
3fbba1d2 102
0f7407d9
C
103 .video-bottom {
104 display: flex;
105 width: 100%;
106 }
3a0fb65c 107
0f7407d9
C
108 .video-miniature-name {
109 margin-top: 10px;
110 margin-bottom: 5px;
111 }
0f4905e1 112
0f7407d9
C
113 .video-miniature-created-at-views {
114 display: block;
3a0fb65c
C
115 }
116
0f7407d9
C
117 .video-actions {
118 margin-top: 3px;
3fbba1d2
RK
119 }
120
0f7407d9 121 @media screen and (max-width: $small-view) {
e66883b3 122 width: 100%;
0f7407d9
C
123 margin-bottom: 25px;
124
125 .video-miniature-information {
126 margin: 0 10px;
127
128 width: 100%;
129 text-align: left;
130 }
e66883b3 131
0f7407d9
C
132 .video-actions {
133 margin: 0;
134 top: -3px;
e66883b3 135
0f7407d9
C
136 ::ng-deep .dropdown-root {
137 opacity: 1 !important;
e66883b3
RK
138 }
139 }
140
0f7407d9
C
141 ::ng-deep .video-thumbnail {
142 border-radius: 0;
e66883b3
RK
143 }
144 }
0f7407d9
C
145}
146
147.video-miniature.display-as-row {
148 --rowThumbnailWidth: #{$video-thumbnail-width};
149 --rowThumbnailHeight: #{$video-thumbnail-height};
150
151 display: flex;
152 flex-direction: row;
e66883b3 153
0f7407d9 154 .video-bottom {
bf64ed41 155 display: flex;
0f7407d9 156 }
e2409062 157
0f7407d9
C
158 // We don't display avatar in row mode
159 .avatar {
160 display: none;
161 }
e2409062 162
0f7407d9
C
163 my-video-thumbnail {
164 min-width: var(--rowThumbnailWidth);
165 max-width: var(--rowThumbnailWidth);
166 height: var(--rowThumbnailHeight);
167 margin-right: 10px;
168 }
e2409062 169
0f7407d9 170 .video-miniature-name {
4429a4a6 171 @include ellipsis-multiline($video-miniature-row-name-font-size, 2);
0f7407d9
C
172 }
173
174 .video-miniature-created-at-views,
175 .video-miniature-account,
176 .video-miniature-channel {
4429a4a6 177 font-size: $video-miniature-row-info-font-size;
0f7407d9 178 }
e2409062 179
0f7407d9
C
180 .video-actions {
181 margin-top: -3px;
182 }
183}
e2409062 184
0f7407d9
C
185@include on-small-main-col {
186 .video-miniature.display-as-row {
187 --rowThumbnailWidth: #{$video-thumbnail-medium-width};
188 --rowThumbnailHeight: #{$video-thumbnail-medium-height};
189 }
190}
8dfceec4 191
0f7407d9
C
192@include on-mobile-main-col {
193 .video-miniature.display-as-row {
194 --rowThumbnailWidth: #{$video-thumbnail-small-width};
195 --rowThumbnailHeight: #{$video-thumbnail-small-height};
196
197 .video-miniature-name {
4429a4a6 198 font-size: $video-miniature-row-info-font-size;
0f7407d9
C
199 }
200
201 .video-miniature-created-at-views,
202 .video-miniature-account,
203 .video-miniature-channel {
4429a4a6 204 font-size: $video-miniature-row-mobile-info-font-size;
e2409062 205 }
501bc6c2
C
206 }
207}