]>
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 | ||
94 | .badge { | |
95 | @include peertube-badge; | |
96 | margin-right: 5px; | |
97 | } | |
e2f01c47 C |
98 | } |
99 | ||
931d3430 C |
100 | .video-info-account, |
101 | .video-info-timestamp { | |
e66883b3 | 102 | color: pvar(--greyForegroundColor); |
e2f01c47 C |
103 | } |
104 | } | |
105 | } | |
106 | ||
bfbd9128 | 107 | .video-info-name { |
931d3430 C |
108 | @include ellipsis; |
109 | ||
bfbd9128 C |
110 | font-size: 18px; |
111 | font-weight: $font-semibold; | |
112 | display: inline-block; | |
bfbd9128 C |
113 | } |
114 | ||
931d3430 C |
115 | .more, |
116 | my-edit-button { | |
27bc9586 C |
117 | @include margin-left(auto); |
118 | ||
e2f01c47 | 119 | justify-self: flex-end; |
e2f01c47 | 120 | cursor: pointer; |
c5407d70 | 121 | min-width: 24px; |
bedf0e60 | 122 | } |
123 | ||
124 | .more { | |
125 | opacity: 0; | |
e2f01c47 C |
126 | |
127 | &.show { | |
3143ae17 | 128 | opacity: 1; |
e2f01c47 C |
129 | } |
130 | ||
131 | .icon-more { | |
e66883b3 | 132 | @include apply-svg-color(pvar(--greyForegroundColor)); |
e2f01c47 C |
133 | |
134 | display: flex; | |
135 | ||
136 | &::after { | |
931d3430 | 137 | border: 0; |
e2f01c47 C |
138 | } |
139 | } | |
da2516fd C |
140 | } |
141 | } | |
e2f01c47 | 142 | |
da2516fd | 143 | .dropdown-menu { |
e2f01c47 | 144 | |
da2516fd C |
145 | .dropdown-item { |
146 | @include dropdown-with-icon-item; | |
e2f01c47 | 147 | |
da2516fd C |
148 | cursor: pointer; |
149 | } | |
e2f01c47 | 150 | |
da2516fd | 151 | .timestamp-options { |
27bc9586 C |
152 | @include padding-left(35px); |
153 | ||
da2516fd | 154 | padding-top: 0; |
da2516fd | 155 | margin-bottom: 15px; |
e2f01c47 | 156 | |
da2516fd C |
157 | > div { |
158 | display: flex; | |
159 | align-items: center; | |
160 | margin-bottom: 5px; | |
161 | } | |
162 | ||
163 | my-peertube-checkbox { | |
27bc9586 | 164 | @include margin-right(5px); |
da2516fd C |
165 | } |
166 | ||
167 | input { | |
168 | @include peertube-button; | |
169 | @include orange-button; | |
170 | ||
171 | margin-top: 10px; | |
e2f01c47 C |
172 | } |
173 | } | |
174 | } | |
bedf0e60 | 175 | |
176 | @mixin more-dropdown-control { | |
177 | .video { | |
178 | my-edit-button { | |
179 | display: none; | |
180 | ||
181 | + .more { | |
182 | display: inline-flex; | |
183 | } | |
184 | } | |
185 | } | |
186 | } | |
187 | ||
188 | @mixin edit-button-control { | |
189 | .video { | |
190 | my-edit-button { | |
191 | display: none; | |
192 | } | |
193 | ||
194 | &.playing { | |
195 | my-edit-button { | |
196 | display: inline-flex; | |
197 | height: max-content; | |
2d0d756e | 198 | margin: auto; |
bedf0e60 | 199 | } |
200 | } | |
201 | ||
202 | my-edit-button + .more { | |
203 | display: none; | |
204 | } | |
205 | } | |
206 | } | |
207 | ||
208 | @mixin edit-button-in-mobile-view { | |
209 | .video { | |
210 | my-edit-button { | |
211 | ::ng-deep .action-button-edit { | |
212 | padding: 0 13px; | |
213 | ||
214 | .button-label { | |
215 | display: none; | |
216 | } | |
217 | } | |
218 | } | |
219 | } | |
220 | } | |
221 | ||
222 | @media screen and (min-width: $small-view) { | |
223 | :host-context(.expanded) { | |
224 | @include more-dropdown-control(); | |
225 | } | |
226 | } | |
227 | ||
228 | @media screen and (max-width: $small-view) { | |
229 | :host-context(.expanded) { | |
230 | @include edit-button-control(); | |
231 | } | |
232 | } | |
233 | ||
234 | @media screen and (max-width: $mobile-view) { | |
235 | :host-context(.expanded) { | |
236 | @include edit-button-in-mobile-view(); | |
237 | } | |
238 | } | |
239 | ||
240 | @media screen and (min-width: #{$small-view + $menu-width}) { | |
241 | :host-context(.main-col:not(.expanded)) { | |
242 | @include more-dropdown-control(); | |
243 | } | |
244 | } | |
245 | ||
246 | @media screen and (max-width: #{$small-view + $menu-width}) { | |
247 | :host-context(.main-col:not(.expanded)) { | |
248 | @include edit-button-control(); | |
249 | } | |
250 | } | |
251 | ||
252 | @media screen and (max-width: #{$mobile-view + $menu-width}) { | |
253 | :host-context(.main-col:not(.expanded)) { | |
254 | @include edit-button-in-mobile-view(); | |
255 | } | |
256 | } |