]>
Commit | Line | Data |
---|---|---|
1 | @use '_variables' as *; | |
2 | @use '_mixins' as *; | |
3 | @use '_miniature' as *; | |
4 | ||
5 | $thumbnail-width: 130px; | |
6 | $thumbnail-height: 72px; | |
7 | ||
8 | my-video-thumbnail { | |
9 | @include thumbnail-size-component($thumbnail-width, $thumbnail-height); | |
10 | } | |
11 | ||
12 | .fake-thumbnail { | |
13 | width: $thumbnail-width; | |
14 | height: $thumbnail-height; | |
15 | background-color: #ececec; | |
16 | } | |
17 | ||
18 | my-video-thumbnail, | |
19 | .fake-thumbnail { | |
20 | @include margin-right(10px); | |
21 | ||
22 | display: flex; // Avoids an issue with line-height that adds space below the element | |
23 | } | |
24 | ||
25 | .video { | |
26 | display: grid; | |
27 | grid-template-columns: 1fr auto; | |
28 | background-color: pvar(--mainBackgroundColor); | |
29 | padding: 10px; | |
30 | border-bottom: 1px solid $separator-border-color; | |
31 | ||
32 | .more { | |
33 | display: flex; | |
34 | } | |
35 | ||
36 | &:hover { | |
37 | background-color: rgba(0, 0, 0, 0.05); | |
38 | ||
39 | .more { | |
40 | opacity: 1; | |
41 | } | |
42 | } | |
43 | ||
44 | @media not all and (hover: hover) and (pointer: fine) { | |
45 | .more { | |
46 | opacity: 1 !important; | |
47 | } | |
48 | } | |
49 | ||
50 | &.playing { | |
51 | background-color: rgba(0, 0, 0, 0.02); | |
52 | } | |
53 | ||
54 | a { | |
55 | @include disable-default-a-behaviour; | |
56 | ||
57 | color: pvar(--mainForegroundColor); | |
58 | display: flex; | |
59 | min-width: 0; | |
60 | align-items: center; | |
61 | cursor: pointer; | |
62 | ||
63 | .position { | |
64 | @include margin-right(10px); | |
65 | ||
66 | font-weight: $font-semibold; | |
67 | color: pvar(--greyForegroundColor); | |
68 | min-width: 25px; | |
69 | ||
70 | my-global-icon { | |
71 | @include apply-svg-color(pvar(--greyForegroundColor)); | |
72 | ||
73 | width: 17px; | |
74 | position: relative; | |
75 | left: -2px; | |
76 | } | |
77 | } | |
78 | } | |
79 | ||
80 | .more, | |
81 | my-edit-button { | |
82 | @include margin-left(auto); | |
83 | ||
84 | justify-self: flex-end; | |
85 | cursor: pointer; | |
86 | min-width: 24px; | |
87 | } | |
88 | ||
89 | .more { | |
90 | opacity: 0; | |
91 | ||
92 | &.show { | |
93 | opacity: 1; | |
94 | } | |
95 | ||
96 | .icon-more { | |
97 | @include apply-svg-color(pvar(--greyForegroundColor)); | |
98 | ||
99 | display: flex; | |
100 | ||
101 | &::after { | |
102 | border: 0; | |
103 | } | |
104 | } | |
105 | } | |
106 | } | |
107 | ||
108 | .video-info-name { | |
109 | @include ellipsis; | |
110 | ||
111 | font-size: 18px; | |
112 | font-weight: $font-semibold; | |
113 | display: inline-block; | |
114 | } | |
115 | ||
116 | .video-info { | |
117 | display: flex; | |
118 | flex-direction: column; | |
119 | align-self: flex-start; | |
120 | min-width: 0; | |
121 | ||
122 | .video-info-header { | |
123 | display: flex; | |
124 | align-items: baseline; | |
125 | ||
126 | a { | |
127 | width: auto; | |
128 | padding-right: 5px; | |
129 | } | |
130 | ||
131 | .pt-badge { | |
132 | @include margin-right(5px); | |
133 | } | |
134 | } | |
135 | ||
136 | .video-info-account, | |
137 | .video-info-timestamp { | |
138 | color: pvar(--greyForegroundColor); | |
139 | } | |
140 | } | |
141 | ||
142 | .video-info-account, | |
143 | .video-miniature-created-at-views { | |
144 | font-size: 14px; | |
145 | } | |
146 | ||
147 | .dropdown-menu { | |
148 | ||
149 | .dropdown-item { | |
150 | @include dropdown-with-icon-item; | |
151 | ||
152 | cursor: pointer; | |
153 | } | |
154 | ||
155 | .timestamp-options { | |
156 | @include padding-left(35px); | |
157 | ||
158 | padding-top: 0; | |
159 | margin-bottom: 15px; | |
160 | ||
161 | > div { | |
162 | display: flex; | |
163 | align-items: center; | |
164 | margin-bottom: 5px; | |
165 | } | |
166 | ||
167 | my-peertube-checkbox { | |
168 | @include margin-right(5px); | |
169 | } | |
170 | ||
171 | input { | |
172 | @include peertube-button; | |
173 | @include orange-button; | |
174 | ||
175 | margin-top: 10px; | |
176 | } | |
177 | } | |
178 | } | |
179 | ||
180 | @mixin more-dropdown-control { | |
181 | .video { | |
182 | my-edit-button { | |
183 | display: none; | |
184 | ||
185 | + .more { | |
186 | display: inline-flex; | |
187 | } | |
188 | } | |
189 | } | |
190 | } | |
191 | ||
192 | @mixin edit-button-control { | |
193 | .video { | |
194 | my-edit-button { | |
195 | display: none; | |
196 | } | |
197 | ||
198 | &.playing { | |
199 | my-edit-button { | |
200 | display: inline-flex; | |
201 | height: max-content; | |
202 | margin: auto; | |
203 | } | |
204 | } | |
205 | ||
206 | my-edit-button + .more { | |
207 | display: none; | |
208 | } | |
209 | } | |
210 | } | |
211 | ||
212 | @mixin edit-button-in-mobile-view { | |
213 | .video { | |
214 | my-edit-button { | |
215 | ::ng-deep .action-button-edit { | |
216 | padding: 0 13px; | |
217 | ||
218 | .button-label { | |
219 | display: none; | |
220 | } | |
221 | } | |
222 | } | |
223 | } | |
224 | } | |
225 | ||
226 | @media screen and (min-width: $small-view) { | |
227 | :host-context(.expanded) { | |
228 | @include more-dropdown-control(); | |
229 | } | |
230 | } | |
231 | ||
232 | @media screen and (max-width: $small-view) { | |
233 | :host-context(.expanded) { | |
234 | @include edit-button-control(); | |
235 | } | |
236 | } | |
237 | ||
238 | @media screen and (max-width: $mobile-view) { | |
239 | :host-context(.expanded) { | |
240 | @include edit-button-in-mobile-view(); | |
241 | } | |
242 | } | |
243 | ||
244 | @media screen and (min-width: #{$small-view + $menu-width}) { | |
245 | :host-context(.main-col:not(.expanded)) { | |
246 | @include more-dropdown-control(); | |
247 | } | |
248 | } | |
249 | ||
250 | @media screen and (max-width: #{$small-view + $menu-width}) { | |
251 | :host-context(.main-col:not(.expanded)) { | |
252 | @include edit-button-control(); | |
253 | } | |
254 | } | |
255 | ||
256 | @media screen and (max-width: #{$mobile-view + $menu-width}) { | |
257 | :host-context(.main-col:not(.expanded)) { | |
258 | @include edit-button-in-mobile-view(); | |
259 | } | |
260 | } |