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