]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/include/_miniature.scss
Square channel avatar consistency
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _miniature.scss
CommitLineData
830b4faf
C
1@import '_variables';
2@import '_mixins';
3
4@mixin miniature-name {
8fc02e47 5 @include ellipsis-multiline(1.1em, 2);
0c9945d9 6
830b4faf 7 transition: color 0.2s;
830b4faf 8 font-weight: $font-semibold;
e66883b3 9 color: pvar(--mainForegroundColor);
8fc02e47 10 margin-top: 10px;
830b4faf
C
11 margin-bottom: 5px;
12
13 &:hover {
14 text-decoration: none;
15 }
16
17 &.blur-filter {
18 filter: blur(3px);
19 padding-left: 4px;
20 }
21}
22
23$play-overlay-transition: 0.2s ease;
24$play-overlay-height: 26px;
25$play-overlay-width: 18px;
26
e2f01c47 27@mixin miniature-thumbnail {
830b4faf
C
28 @include disable-outline;
29
8fc02e47
C
30 display: flex;
31 flex-direction: column;
830b4faf
C
32 position: relative;
33 border-radius: 3px;
34 overflow: hidden;
e2f01c47
C
35 width: $video-thumbnail-width;
36 height: $video-thumbnail-height;
830b4faf
C
37 background-color: #ececec;
38 transition: filter $play-overlay-transition;
39
40 .play-overlay {
41 position: absolute;
42 right: 0;
43 bottom: 0;
44
c5a1ae50
C
45 width: inherit;
46 height: inherit;
830b4faf 47 opacity: 0;
41f8f620 48 background-color: rgba(0, 0, 0, 0.3);
830b4faf
C
49
50 &, .icon {
51 transition: all $play-overlay-transition;
52 }
53
54 .icon {
3efa3f4d 55 @include play-icon($play-overlay-width, $play-overlay-height);
830b4faf
C
56 }
57 }
58
59 &:hover {
60 text-decoration: none !important;
61
62 .play-overlay {
63 opacity: 1;
64
65 .icon {
66 transform: translate(-50%, -50%) scale(1);
67 }
68 }
69 }
70
71 &.focus-visible {
e66883b3 72 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
6a4c30de 73 outline: none;
830b4faf
C
74 }
75
76 img {
c5a1ae50
C
77 width: inherit;
78 height: inherit;
830b4faf
C
79
80 &.blur-filter {
1b8a8905 81 filter: blur(20px);
830b4faf
C
82 transform : scale(1.03);
83 }
84 }
85}
86
e2f01c47 87@mixin thumbnail-size-component ($width, $height) {
03652b31 88 ::ng-deep .video-thumbnail {
e2f01c47
C
89 width: $width;
90 height: $height;
91 }
92}
93
830b4faf
C
94@mixin static-thumbnail-overlay {
95 display: inline-block;
96 background-color: rgba(0, 0, 0, 0.7);
97 color: #fff;
98}
99
c8487f3f 100@mixin miniature-rows {
c8487f3f
C
101 &:first-child {
102 padding-top: 30px;
dc890263
C
103
104 .section-title {
105 border-top: none !important;
106 }
c8487f3f
C
107 }
108
c8487f3f
C
109 .section-title {
110 font-size: 24px;
111 font-weight: $font-semibold;
dc890263
C
112 padding-top: 15px;
113 margin-bottom: 15px;
bc01017b
C
114 display: flex;
115 justify-content: space-between;
c9e3565d
CC
116
117 &:not(h2) {
118 border-top: 1px solid $separator-border-color;
119 }
c8487f3f
C
120
121 a {
122 &:hover, &:focus:not(.focus-visible), &:active {
123 text-decoration: none;
124 outline: none;
125 }
126
e66883b3 127 color: pvar(--mainForegroundColor);
c8487f3f
C
128 }
129 }
130
131 &.channel {
132 .section-title {
133 a {
134 display: flex;
135 width: fit-content;
136 align-items: center;
137
138 img {
deb8b9cd 139 @include channel-avatar(28px);
c8487f3f
C
140
141 margin-right: 8px;
142 }
143 }
144
145 .followers {
e66883b3 146 color: pvar(--greyForegroundColor);
c8487f3f
C
147 font-weight: normal;
148 font-size: 14px;
149 margin-left: 10px;
150 position: relative;
151 top: 2px;
152 }
153 }
154 }
155
dc890263
C
156 .show-more {
157 position: relative;
158 top: -5px;
159 display: inline-block;
160 font-size: 16px;
161 text-transform: uppercase;
e66883b3 162 color: pvar(--greyForegroundColor);
dc890263
C
163 margin-bottom: 10px;
164 font-weight: $font-semibold;
25266908 165 text-decoration: none;
dc890263
C
166 }
167
c8487f3f
C
168 @media screen and (max-width: $mobile-view) {
169 max-height: initial;
170 overflow: initial;
171
c8487f3f
C
172 .section-title {
173 font-size: 17px;
cf78883c 174 margin-left: 10px;
c8487f3f
C
175 }
176 }
177}
178
900f7820
C
179// Use margin by default, or padding if $margin is false
180@mixin fluid-videos-miniature-margins ($margin: true, $min-margin: 0) {
181 @if $margin {
182 margin-left: $not-expanded-horizontal-margins !important;
183 margin-right: $not-expanded-horizontal-margins !important;
184 } @else {
185 padding-left: $not-expanded-horizontal-margins !important;
186 padding-right: $not-expanded-horizontal-margins !important;
187 }
c8487f3f 188
cf78883c
C
189 @media screen and (max-width: $mobile-view) {
190 width: auto;
c8487f3f 191
900f7820
C
192 @if $margin {
193 margin: $min-margin !important;
194 } @else {
195 padding: $min-margin !important;
196 }
197 }
198
199 @media screen and (min-width: #{breakpoint(fhd)}) {
200 @if $margin {
201 margin-left: 6vw !important;
202 margin-right: 6vw !important;
203 } @else {
204 padding-left: 6vw !important;
205 padding-right: 6vw !important;
206 }
207 }
208}
209
210@mixin fluid-videos-miniature-layout {
211 @include fluid-videos-miniature-margins;
212
213 @media screen and (max-width: $mobile-view) {
cf78883c
C
214 .videos {
215 text-align: center;
c8487f3f 216
cf78883c
C
217 ::ng-deep .video-miniature {
218 padding-right: 0;
219 height: auto;
220 width: 100%;
221 margin-bottom: 25px;
c8487f3f 222
cf78883c
C
223 .video-miniature-information {
224 width: 100% !important;
225 text-align: left;
226
227 span {
228 width: 100%;
229 }
230 }
231
232 .video-thumbnail {
233 border-radius: 0;
234 }
235 }
e66883b3 236 }
cf78883c
C
237 }
238
cf78883c 239 @media screen and (min-width: $mobile-view) {
cf78883c
C
240 .videos {
241 --miniature-min-width: #{$video-thumbnail-width - 15px};
242 --miniature-max-width: #{$video-thumbnail-width};
243
244 display: grid;
245 column-gap: 5px;
246 grid-template-columns: repeat(
247 auto-fill,
248 minmax(
249 var(--miniature-min-width),
250 1fr
251 )
252 );
253
254 @media screen and (min-width: #{breakpoint(fhd)}) {
255 column-gap: 1%;
256 --miniature-min-width: #{$video-thumbnail-width};
257 }
258
259 .video-wrapper {
260 margin: 0 auto;
261 width: 100%;
c8487f3f 262
cf78883c
C
263 my-video-miniature {
264 display: block;
265 min-width: var(--miniature-min-width);
266 max-width: var(--miniature-max-width);
267 }
e66883b3 268 }
c8487f3f
C
269 }
270 }
271}