]>
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 | .dropdown-item { | |
126 | @include dropdown-with-icon-item; | |
127 | } | |
128 | ||
129 | .timestamp-options { | |
130 | padding-top: 0; | |
131 | padding-left: 35px; | |
132 | margin-bottom: 15px; | |
133 | ||
134 | > div { | |
135 | display: flex; | |
136 | align-items: center; | |
137 | } | |
138 | ||
139 | input { | |
140 | @include peertube-button; | |
141 | @include orange-button; | |
142 | ||
143 | margin-top: 10px; | |
144 | } | |
145 | } | |
146 | } | |
147 | } | |
148 | ||
149 | @mixin more-dropdown-control { | |
150 | .video { | |
151 | my-edit-button { | |
152 | display: none; | |
153 | ||
154 | + .more { | |
155 | display: inline-flex; | |
156 | } | |
157 | } | |
158 | } | |
159 | } | |
160 | ||
161 | @mixin edit-button-control { | |
162 | .video { | |
163 | my-edit-button { | |
164 | display: none; | |
165 | } | |
166 | ||
167 | &.playing { | |
168 | my-edit-button { | |
169 | display: inline-flex; | |
170 | height: max-content; | |
171 | margin: auto; | |
172 | } | |
173 | } | |
174 | ||
175 | my-edit-button + .more { | |
176 | display: none; | |
177 | } | |
178 | } | |
179 | } | |
180 | ||
181 | @mixin edit-button-in-mobile-view { | |
182 | .video { | |
183 | my-edit-button { | |
184 | ::ng-deep .action-button-edit { | |
185 | padding: 0 13px; | |
186 | ||
187 | .button-label { | |
188 | display: none; | |
189 | } | |
190 | } | |
191 | } | |
192 | } | |
193 | } | |
194 | ||
195 | @media screen and (min-width: $small-view) { | |
196 | :host-context(.expanded) { | |
197 | @include more-dropdown-control(); | |
198 | } | |
199 | } | |
200 | ||
201 | @media screen and (max-width: $small-view) { | |
202 | :host-context(.expanded) { | |
203 | @include edit-button-control(); | |
204 | } | |
205 | } | |
206 | ||
207 | @media screen and (max-width: $mobile-view) { | |
208 | :host-context(.expanded) { | |
209 | @include edit-button-in-mobile-view(); | |
210 | } | |
211 | } | |
212 | ||
213 | @media screen and (min-width: #{$small-view + $menu-width}) { | |
214 | :host-context(.main-col:not(.expanded)) { | |
215 | @include more-dropdown-control(); | |
216 | } | |
217 | } | |
218 | ||
219 | @media screen and (max-width: #{$small-view + $menu-width}) { | |
220 | :host-context(.main-col:not(.expanded)) { | |
221 | @include edit-button-control(); | |
222 | } | |
223 | } | |
224 | ||
225 | @media screen and (max-width: #{$mobile-view + $menu-width}) { | |
226 | :host-context(.main-col:not(.expanded)) { | |
227 | @include edit-button-in-mobile-view(); | |
228 | } | |
229 | } |