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