diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-11 14:33:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-11 16:41:51 +0200 |
commit | cf78883c70dca99fc519374d55620d9403d482be (patch) | |
tree | f5a10b078414ba5f0f3562a945b3e6cce9524e3a /client/src/sass/include | |
parent | 7e4022a554016ef7b8274f0473210e2232f5f455 (diff) | |
download | PeerTube-cf78883c70dca99fc519374d55620d9403d482be.tar.gz PeerTube-cf78883c70dca99fc519374d55620d9403d482be.tar.zst PeerTube-cf78883c70dca99fc519374d55620d9403d482be.zip |
Limit thumbnail sizes
Diffstat (limited to 'client/src/sass/include')
-rw-r--r-- | client/src/sass/include/_bootstrap-variables.scss | 2 | ||||
-rw-r--r-- | client/src/sass/include/_miniature.scss | 123 | ||||
-rw-r--r-- | client/src/sass/include/_variables.scss | 1 |
3 files changed, 63 insertions, 63 deletions
diff --git a/client/src/sass/include/_bootstrap-variables.scss b/client/src/sass/include/_bootstrap-variables.scss index 09c58a697..41a1448c4 100644 --- a/client/src/sass/include/_bootstrap-variables.scss +++ b/client/src/sass/include/_bootstrap-variables.scss | |||
@@ -18,7 +18,7 @@ $grid-breakpoints: ( | |||
18 | xxl: 1600px, | 18 | xxl: 1600px, |
19 | 19 | ||
20 | // SCREEN GROUP | 20 | // SCREEN GROUP |
21 | fhd: 1920px, | 21 | fhd: 1800px, |
22 | qhd: 2560px, | 22 | qhd: 2560px, |
23 | uhd: 3840px | 23 | uhd: 3840px |
24 | ); | 24 | ); |
diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss index d89d6f9ff..d79086723 100644 --- a/client/src/sass/include/_miniature.scss +++ b/client/src/sass/include/_miniature.scss | |||
@@ -108,38 +108,6 @@ $play-overlay-width: 18px; | |||
108 | color: #fff; | 108 | color: #fff; |
109 | } | 109 | } |
110 | 110 | ||
111 | @mixin video-miniature-small-screen { | ||
112 | text-align: center; | ||
113 | |||
114 | ::ng-deep .video-miniature { | ||
115 | padding-right: 0; | ||
116 | height: auto; | ||
117 | width: 100%; | ||
118 | margin-bottom: 20px; | ||
119 | |||
120 | .video-miniature-information { | ||
121 | width: 100% !important; | ||
122 | text-align: left; | ||
123 | |||
124 | span { | ||
125 | width: 100%; | ||
126 | } | ||
127 | } | ||
128 | |||
129 | .video-thumbnail { | ||
130 | margin-bottom: 10px; | ||
131 | width: 100%; | ||
132 | height: calc(100% / #{$video-thumbnail-ratio}); | ||
133 | border-radius: 0; | ||
134 | |||
135 | img { | ||
136 | width: 100%; | ||
137 | height: 100%; | ||
138 | } | ||
139 | } | ||
140 | } | ||
141 | } | ||
142 | |||
143 | @mixin miniature-rows { | 111 | @mixin miniature-rows { |
144 | &:first-child { | 112 | &:first-child { |
145 | padding-top: 30px; | 113 | padding-top: 30px; |
@@ -149,10 +117,6 @@ $play-overlay-width: 18px; | |||
149 | } | 117 | } |
150 | } | 118 | } |
151 | 119 | ||
152 | my-video-miniature { | ||
153 | text-align: left; | ||
154 | } | ||
155 | |||
156 | .section-title { | 120 | .section-title { |
157 | font-size: 24px; | 121 | font-size: 24px; |
158 | font-weight: $font-semibold; | 122 | font-weight: $font-semibold; |
@@ -213,44 +177,81 @@ $play-overlay-width: 18px; | |||
213 | max-height: initial; | 177 | max-height: initial; |
214 | overflow: initial; | 178 | overflow: initial; |
215 | 179 | ||
216 | @include video-miniature-small-screen; | ||
217 | |||
218 | .section-title { | 180 | .section-title { |
219 | font-size: 17px; | 181 | font-size: 17px; |
182 | margin-left: 10px; | ||
220 | } | 183 | } |
221 | } | 184 | } |
222 | } | 185 | } |
223 | 186 | ||
224 | @mixin adapt-margin-content-width($fluid: false) { | 187 | @mixin fluid-videos-miniature-layout { |
225 | @if $fluid { | 188 | margin-left: 3vw !important; |
226 | margin-left: 3vw !important; | 189 | margin-right: 3vw !important; |
227 | margin-right: 3vw !important; | ||
228 | } @else { | ||
229 | width: $video-miniature-width * 6; | ||
230 | margin: auto !important; | ||
231 | 190 | ||
232 | @media screen and (max-width: 1800px) { | 191 | @media screen and (max-width: $mobile-view) { |
233 | width: $video-miniature-width * 5; | 192 | width: auto; |
234 | } | 193 | margin: 0 !important; |
235 | 194 | ||
236 | @media screen and (max-width: 1800px - $video-miniature-width) { | 195 | .videos { |
237 | width: $video-miniature-width * 4; | 196 | text-align: center; |
238 | } | ||
239 | 197 | ||
240 | @media screen and (max-width: 1800px - (2* $video-miniature-width)) { | 198 | ::ng-deep .video-miniature { |
241 | width: $video-miniature-width * 3; | 199 | padding-right: 0; |
242 | } | 200 | height: auto; |
201 | width: 100%; | ||
202 | margin-bottom: 25px; | ||
243 | 203 | ||
244 | @media screen and (max-width: 1800px - (3* $video-miniature-width)) { | 204 | .video-miniature-information { |
245 | width: $video-miniature-width * 2; | 205 | width: 100% !important; |
206 | text-align: left; | ||
207 | |||
208 | span { | ||
209 | width: 100%; | ||
210 | } | ||
211 | } | ||
212 | |||
213 | .video-thumbnail { | ||
214 | border-radius: 0; | ||
215 | } | ||
216 | } | ||
246 | } | 217 | } |
218 | } | ||
219 | |||
220 | @media screen and (min-width: #{breakpoint(fhd)}) { | ||
221 | margin-left: 6vw !important; | ||
222 | margin-right: 6vw !important; | ||
223 | } | ||
247 | 224 | ||
248 | @media screen and (max-width: $mobile-view) { | 225 | @media screen and (min-width: $mobile-view) { |
249 | width: auto; | 226 | |
250 | margin: 0 !important; | 227 | .videos { |
228 | --miniature-min-width: #{$video-thumbnail-width - 15px}; | ||
229 | --miniature-max-width: #{$video-thumbnail-width}; | ||
230 | |||
231 | display: grid; | ||
232 | column-gap: 5px; | ||
233 | grid-template-columns: repeat( | ||
234 | auto-fill, | ||
235 | minmax( | ||
236 | var(--miniature-min-width), | ||
237 | 1fr | ||
238 | ) | ||
239 | ); | ||
240 | |||
241 | @media screen and (min-width: #{breakpoint(fhd)}) { | ||
242 | column-gap: 1%; | ||
243 | --miniature-min-width: #{$video-thumbnail-width}; | ||
244 | } | ||
245 | |||
246 | .video-wrapper { | ||
247 | margin: 0 auto; | ||
248 | width: 100%; | ||
251 | 249 | ||
252 | .videos { | 250 | my-video-miniature { |
253 | @include video-miniature-small-screen; | 251 | display: block; |
252 | min-width: var(--miniature-min-width); | ||
253 | max-width: var(--miniature-max-width); | ||
254 | } | ||
254 | } | 255 | } |
255 | } | 256 | } |
256 | } | 257 | } |
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index 14f1ae76c..56b1ff884 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -59,7 +59,6 @@ $video-miniature-width: 238px; | |||
59 | $video-miniature-margin-bottom: 30px; | 59 | $video-miniature-margin-bottom: 30px; |
60 | $video-thumbnail-height: 122px; | 60 | $video-thumbnail-height: 122px; |
61 | $video-thumbnail-width: 223px; | 61 | $video-thumbnail-width: 223px; |
62 | $video-thumbnail-ratio: $video-thumbnail-width / $video-thumbnail-height; | ||
63 | 62 | ||
64 | $theater-bottom-space: 115px; | 63 | $theater-bottom-space: 115px; |
65 | 64 | ||