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