diff options
Diffstat (limited to 'client/src/sass/include')
-rw-r--r-- | client/src/sass/include/_actor.scss | 88 | ||||
-rw-r--r-- | client/src/sass/include/_miniature.scss | 172 | ||||
-rw-r--r-- | client/src/sass/include/_mixins.scss | 228 | ||||
-rw-r--r-- | client/src/sass/include/_variables.scss | 44 |
4 files changed, 268 insertions, 264 deletions
diff --git a/client/src/sass/include/_actor.scss b/client/src/sass/include/_actor.scss new file mode 100644 index 000000000..a4798ce1d --- /dev/null +++ b/client/src/sass/include/_actor.scss | |||
@@ -0,0 +1,88 @@ | |||
1 | @import '_variables'; | ||
2 | |||
3 | @mixin section-label-responsive { | ||
4 | color: pvar(--mainColor); | ||
5 | font-size: 12px; | ||
6 | margin-bottom: 15px; | ||
7 | font-weight: $font-bold; | ||
8 | letter-spacing: 2.5px; | ||
9 | |||
10 | @media screen and (max-width: $mobile-view) { | ||
11 | font-size: 10px; | ||
12 | letter-spacing: 2.1px; | ||
13 | margin-bottom: 5px; | ||
14 | } | ||
15 | } | ||
16 | |||
17 | @mixin show-more-description { | ||
18 | color: pvar(--mainColor); | ||
19 | cursor: pointer; | ||
20 | margin: 10px auto 45px auto; | ||
21 | } | ||
22 | |||
23 | @mixin avatar-row-responsive ($img-margin, $grey-font-size) { | ||
24 | display: flex; | ||
25 | grid-column: 1; | ||
26 | margin-bottom: 30px; | ||
27 | |||
28 | .channel-avatar { | ||
29 | @include channel-avatar(120px); | ||
30 | } | ||
31 | |||
32 | > div { | ||
33 | margin-left: $img-margin; | ||
34 | min-width: 1px; | ||
35 | } | ||
36 | |||
37 | .actor-info { | ||
38 | display: flex; | ||
39 | |||
40 | > div:first-child { | ||
41 | flex-grow: 1; | ||
42 | min-width: 1px; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | .actor-display-name { | ||
47 | display: flex; | ||
48 | flex-wrap: wrap; | ||
49 | } | ||
50 | |||
51 | h1 { | ||
52 | font-size: 28px; | ||
53 | font-weight: $font-bold; | ||
54 | margin: 0; | ||
55 | } | ||
56 | |||
57 | .actor-handle { | ||
58 | @include ellipsis; | ||
59 | } | ||
60 | |||
61 | .actor-handle, | ||
62 | .actor-counters { | ||
63 | color: pvar(--greyForegroundColor); | ||
64 | font-size: $grey-font-size; | ||
65 | } | ||
66 | |||
67 | .actor-counters > *:not(:last-child)::after { | ||
68 | content: '•'; | ||
69 | margin: 0 10px; | ||
70 | color: pvar(--mainColor); | ||
71 | } | ||
72 | |||
73 | @media screen and (max-width: $mobile-view) { | ||
74 | margin-bottom: 15px; | ||
75 | |||
76 | h1 { | ||
77 | font-size: 22px; | ||
78 | } | ||
79 | |||
80 | .channel-avatar { | ||
81 | @include channel-avatar(80px); | ||
82 | } | ||
83 | |||
84 | .account-avatar { | ||
85 | @include avatar(120px); | ||
86 | } | ||
87 | } | ||
88 | } | ||
diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss index 134b307b1..3b86f29b4 100644 --- a/client/src/sass/include/_miniature.scss +++ b/client/src/sass/include/_miniature.scss | |||
@@ -4,11 +4,11 @@ | |||
4 | @mixin miniature-name { | 4 | @mixin miniature-name { |
5 | @include ellipsis-multiline(1.1em, 2); | 5 | @include ellipsis-multiline(1.1em, 2); |
6 | 6 | ||
7 | word-break: break-all; | ||
8 | word-wrap: break-word; | ||
7 | transition: color 0.2s; | 9 | transition: color 0.2s; |
8 | font-weight: $font-semibold; | 10 | font-weight: $font-semibold; |
9 | color: pvar(--mainForegroundColor); | 11 | color: pvar(--mainForegroundColor); |
10 | margin-top: 10px; | ||
11 | margin-bottom: 5px; | ||
12 | 12 | ||
13 | &:hover { | 13 | &:hover { |
14 | text-decoration: none; | 14 | text-decoration: none; |
@@ -20,20 +20,20 @@ | |||
20 | } | 20 | } |
21 | } | 21 | } |
22 | 22 | ||
23 | $play-overlay-transition: 0.2s ease; | ||
24 | $play-overlay-height: 26px; | ||
25 | $play-overlay-width: 18px; | ||
26 | |||
27 | @mixin miniature-thumbnail { | 23 | @mixin miniature-thumbnail { |
28 | @include disable-outline; | 24 | @include disable-outline; |
29 | 25 | ||
26 | $play-overlay-transition: 0.2s ease; | ||
27 | $play-overlay-height: 26px; | ||
28 | $play-overlay-width: 18px; | ||
29 | |||
30 | display: flex; | 30 | display: flex; |
31 | flex-direction: column; | 31 | flex-direction: column; |
32 | position: relative; | 32 | position: relative; |
33 | border-radius: 3px; | 33 | border-radius: 3px; |
34 | width: 100%; | ||
35 | height: 100%; | ||
34 | overflow: hidden; | 36 | overflow: hidden; |
35 | width: $video-thumbnail-width; | ||
36 | height: $video-thumbnail-height; | ||
37 | background-color: #ececec; | 37 | background-color: #ececec; |
38 | transition: filter $play-overlay-transition; | 38 | transition: filter $play-overlay-transition; |
39 | 39 | ||
@@ -97,154 +97,64 @@ $play-overlay-width: 18px; | |||
97 | color: #fff; | 97 | color: #fff; |
98 | } | 98 | } |
99 | 99 | ||
100 | @mixin miniature-rows { | 100 | // Use margin by default, or padding if $margin is false |
101 | &:first-child { | 101 | @mixin grid-videos-miniature-margins ($margin: true, $min-margin: 0) { |
102 | padding-top: 30px; | 102 | --gridVideosMiniatureMargins: #{pvar(--videosHorizontalMarginContent)}; |
103 | 103 | ||
104 | .section-title { | 104 | @if $margin { |
105 | border-top: none !important; | 105 | margin-left: var(--gridVideosMiniatureMargins) !important; |
106 | } | 106 | margin-right: var(--gridVideosMiniatureMargins) !important; |
107 | } | 107 | } @else { |
108 | 108 | padding-left: var(--gridVideosMiniatureMargins) !important; | |
109 | .section-title { | 109 | padding-right: var(--gridVideosMiniatureMargins) !important; |
110 | font-size: 24px; | ||
111 | font-weight: $font-semibold; | ||
112 | padding-top: 15px; | ||
113 | margin-bottom: 15px; | ||
114 | display: flex; | ||
115 | justify-content: space-between; | ||
116 | |||
117 | &:not(h2) { | ||
118 | border-top: 1px solid $separator-border-color; | ||
119 | } | ||
120 | |||
121 | a { | ||
122 | &:hover, &:focus:not(.focus-visible), &:active { | ||
123 | text-decoration: none; | ||
124 | outline: none; | ||
125 | } | ||
126 | |||
127 | color: pvar(--mainForegroundColor); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | &.channel { | ||
132 | .section-title { | ||
133 | a { | ||
134 | display: flex; | ||
135 | width: fit-content; | ||
136 | align-items: center; | ||
137 | |||
138 | img { | ||
139 | @include avatar(28px); | ||
140 | |||
141 | margin-right: 8px; | ||
142 | } | ||
143 | } | ||
144 | |||
145 | .followers { | ||
146 | color: pvar(--greyForegroundColor); | ||
147 | font-weight: normal; | ||
148 | font-size: 14px; | ||
149 | margin-left: 10px; | ||
150 | position: relative; | ||
151 | top: 2px; | ||
152 | } | ||
153 | } | ||
154 | } | ||
155 | |||
156 | .show-more { | ||
157 | position: relative; | ||
158 | top: -5px; | ||
159 | display: inline-block; | ||
160 | font-size: 16px; | ||
161 | text-transform: uppercase; | ||
162 | color: pvar(--greyForegroundColor); | ||
163 | margin-bottom: 10px; | ||
164 | font-weight: $font-semibold; | ||
165 | text-decoration: none; | ||
166 | } | 110 | } |
167 | 111 | ||
168 | @media screen and (max-width: $mobile-view) { | 112 | @media screen and (max-width: $mobile-view) { |
169 | max-height: initial; | 113 | --gridVideosMiniatureMargins: #{$min-margin}; |
170 | overflow: initial; | ||
171 | |||
172 | .section-title { | ||
173 | font-size: 17px; | ||
174 | margin-left: 10px; | ||
175 | } | ||
176 | } | ||
177 | } | ||
178 | 114 | ||
179 | @mixin fluid-videos-miniature-layout { | ||
180 | margin-left: $not-expanded-horizontal-margins !important; | ||
181 | margin-right: $not-expanded-horizontal-margins !important; | ||
182 | |||
183 | @media screen and (max-width: $mobile-view) { | ||
184 | width: auto; | 115 | width: auto; |
185 | margin: 0 !important; | ||
186 | |||
187 | .videos { | ||
188 | text-align: center; | ||
189 | |||
190 | ::ng-deep .video-miniature { | ||
191 | padding-right: 0; | ||
192 | height: auto; | ||
193 | width: 100%; | ||
194 | margin-bottom: 25px; | ||
195 | |||
196 | .video-miniature-information { | ||
197 | width: 100% !important; | ||
198 | text-align: left; | ||
199 | |||
200 | span { | ||
201 | width: 100%; | ||
202 | } | ||
203 | } | ||
204 | |||
205 | .video-thumbnail { | ||
206 | border-radius: 0; | ||
207 | } | ||
208 | } | ||
209 | } | ||
210 | } | 116 | } |
117 | } | ||
211 | 118 | ||
212 | @media screen and (min-width: #{breakpoint(fhd)}) { | 119 | @mixin grid-videos-miniature-layout { |
213 | margin-left: 6vw !important; | 120 | @include grid-videos-miniature-margins; |
214 | margin-right: 6vw !important; | ||
215 | } | ||
216 | 121 | ||
217 | @media screen and (min-width: $mobile-view) { | 122 | @media screen and (min-width: $mobile-view) { |
218 | 123 | .videos, | |
219 | .videos { | 124 | .playlists { |
220 | --miniature-min-width: #{$video-thumbnail-width - 15px}; | 125 | --miniatureMinWidth: #{$video-thumbnail-width - 25px}; |
221 | --miniature-max-width: #{$video-thumbnail-width}; | 126 | --miniatureMaxWidth: #{$video-thumbnail-width}; |
222 | 127 | ||
223 | display: grid; | 128 | display: grid; |
224 | column-gap: 5px; | 129 | column-gap: 30px; |
225 | grid-template-columns: repeat( | 130 | grid-template-columns: repeat( |
226 | auto-fill, | 131 | auto-fill, |
227 | minmax( | 132 | minmax( |
228 | var(--miniature-min-width), | 133 | var(--miniatureMinWidth), |
229 | 1fr | 134 | 1fr |
230 | ) | 135 | ) |
231 | ); | 136 | ); |
232 | 137 | ||
233 | @media screen and (min-width: #{breakpoint(fhd)}) { | 138 | .video-wrapper, |
234 | column-gap: 1%; | 139 | .playlist-wrapper { |
235 | --miniature-min-width: #{$video-thumbnail-width}; | ||
236 | } | ||
237 | |||
238 | .video-wrapper { | ||
239 | margin: 0 auto; | 140 | margin: 0 auto; |
240 | width: 100%; | 141 | width: 100%; |
241 | 142 | ||
242 | my-video-miniature { | 143 | my-video-miniature, |
144 | my-video-playlist-miniature { | ||
243 | display: block; | 145 | display: block; |
244 | min-width: var(--miniature-min-width); | 146 | min-width: var(--miniatureMinWidth); |
245 | max-width: var(--miniature-max-width); | 147 | max-width: var(--miniatureMaxWidth); |
246 | } | 148 | } |
247 | } | 149 | } |
150 | |||
151 | @media screen and (min-width: #{breakpoint(xm)}) { | ||
152 | column-gap: 15px; | ||
153 | } | ||
154 | |||
155 | @media screen and (min-width: #{breakpoint(fhd)}) { | ||
156 | column-gap: 2%; | ||
157 | } | ||
248 | } | 158 | } |
249 | } | 159 | } |
250 | } | 160 | } |
diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index ca11488cb..e03201cef 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss | |||
@@ -23,17 +23,28 @@ | |||
23 | display: block; | 23 | display: block; |
24 | /* Fallback for non-webkit */ | 24 | /* Fallback for non-webkit */ |
25 | display: -webkit-box; | 25 | display: -webkit-box; |
26 | max-height: $font-size * $number-of-lines; | 26 | -webkit-line-clamp: $number-of-lines; |
27 | /* Fallback for non-webkit */ | 27 | /* Fallback for non-webkit */ |
28 | font-size: $font-size; | 28 | font-size: $font-size; |
29 | line-height: $font-size; | 29 | line-height: $font-size; |
30 | overflow: hidden; | 30 | overflow: hidden; |
31 | text-overflow: ellipsis; | 31 | text-overflow: ellipsis; |
32 | max-height: $font-size * $number-of-lines; | ||
32 | } | 33 | } |
33 | 34 | ||
34 | @mixin prefix($property, $parameters...) { | 35 | @mixin fade-text ($fade-after, $background-color) { |
35 | @each $prefix in -webkit-, -moz-, -ms-, -o-, "" { | 36 | position: relative; |
36 | #{$prefix}#{$property}: $parameters; | 37 | overflow: hidden; |
38 | |||
39 | &:after { | ||
40 | content: ''; | ||
41 | pointer-events: none; | ||
42 | width: 100%; | ||
43 | height: 100%; | ||
44 | position: absolute; | ||
45 | left: 0; | ||
46 | top: 0; | ||
47 | background: linear-gradient(transparent $fade-after, $background-color); | ||
37 | } | 48 | } |
38 | } | 49 | } |
39 | 50 | ||
@@ -41,9 +52,6 @@ | |||
41 | word-break: break-word; | 52 | word-break: break-word; |
42 | word-wrap: break-word; | 53 | word-wrap: break-word; |
43 | overflow-wrap: break-word; | 54 | overflow-wrap: break-word; |
44 | -webkit-hyphens: auto; | ||
45 | -ms-hyphens: auto; | ||
46 | -moz-hyphens: auto; | ||
47 | hyphens: auto; | 55 | hyphens: auto; |
48 | } | 56 | } |
49 | 57 | ||
@@ -52,28 +60,6 @@ | |||
52 | ::ng-deep .material { | 60 | ::ng-deep .material { |
53 | color: $color; | 61 | color: $color; |
54 | } | 62 | } |
55 | |||
56 | ::ng-deep svg { | ||
57 | path[fill="#000"], | ||
58 | g[fill="#000"], | ||
59 | rect[fill="#000"], | ||
60 | circle[fill="#000"], | ||
61 | polygon[fill="#000"] { | ||
62 | fill: $color; | ||
63 | } | ||
64 | |||
65 | path[stroke="#000"], | ||
66 | g[stroke="#000"], | ||
67 | rect[stroke="#000"], | ||
68 | circle[stroke="#000"], | ||
69 | polygon[stroke="#000"] { | ||
70 | stroke: $color; | ||
71 | } | ||
72 | |||
73 | stop[stop-color="#000"] { | ||
74 | stop-color: $color; | ||
75 | } | ||
76 | } | ||
77 | } | 63 | } |
78 | 64 | ||
79 | @mixin fill-svg-color ($color) { | 65 | @mixin fill-svg-color ($color) { |
@@ -163,6 +149,33 @@ | |||
163 | } | 149 | } |
164 | } | 150 | } |
165 | 151 | ||
152 | @mixin orange-button-inverted { | ||
153 | @include button-focus(pvar(--mainColorLightest)); | ||
154 | |||
155 | border: 2px solid pvar(--mainColor); | ||
156 | font-weight: $font-semibold; | ||
157 | |||
158 | &, &:active, &:focus { | ||
159 | color: pvar(--mainColor); | ||
160 | background-color: pvar(--mainBackgroundColor); | ||
161 | } | ||
162 | |||
163 | &:hover { | ||
164 | color: pvar(--mainColor); | ||
165 | background-color: pvar(--mainColorLightest); | ||
166 | } | ||
167 | |||
168 | &[disabled], &.disabled { | ||
169 | cursor: default; | ||
170 | color: pvar(--mainColor); | ||
171 | background-color: #C6C6C6; | ||
172 | } | ||
173 | |||
174 | my-global-icon { | ||
175 | @include apply-svg-color(pvar(--mainColor)) | ||
176 | } | ||
177 | } | ||
178 | |||
166 | @mixin tertiary-button { | 179 | @mixin tertiary-button { |
167 | @include button-focus($grey-button-outline-color); | 180 | @include button-focus($grey-button-outline-color); |
168 | 181 | ||
@@ -225,7 +238,8 @@ | |||
225 | font-size: 15px; | 238 | font-size: 15px; |
226 | height: $button-height; | 239 | height: $button-height; |
227 | line-height: $button-height; | 240 | line-height: $button-height; |
228 | border-radius: 3px; | 241 | // FIXME: because of primeng that redefines border-radius of all input[type="..."] |
242 | border-radius: 3px !important; | ||
229 | text-align: center; | 243 | text-align: center; |
230 | padding: 0 17px 0 13px; | 244 | padding: 0 17px 0 13px; |
231 | cursor: pointer; | 245 | cursor: pointer; |
@@ -534,6 +548,14 @@ | |||
534 | min-height: $size; | 548 | min-height: $size; |
535 | } | 549 | } |
536 | 550 | ||
551 | @mixin channel-avatar ($size) { | ||
552 | width: $size; | ||
553 | height: $size; | ||
554 | min-width: $size; | ||
555 | min-height: $size; | ||
556 | border-radius: 5px; | ||
557 | } | ||
558 | |||
537 | @mixin chevron ($size, $border-width) { | 559 | @mixin chevron ($size, $border-width) { |
538 | border-style: solid; | 560 | border-style: solid; |
539 | border-width: $border-width $border-width 0 0; | 561 | border-width: $border-width $border-width 0 0; |
@@ -593,103 +615,29 @@ | |||
593 | } | 615 | } |
594 | } | 616 | } |
595 | 617 | ||
596 | @mixin sub-menu-with-actor { | ||
597 | position: initial; | ||
598 | z-index: unset; | ||
599 | height: max-content; | ||
600 | display: flex; | ||
601 | flex-direction: column; | ||
602 | align-items: flex-start; | ||
603 | |||
604 | .actor { | ||
605 | display: flex; | ||
606 | margin-top: 20px; | ||
607 | margin-bottom: 20px; | ||
608 | |||
609 | img { | ||
610 | @include avatar(80px); | ||
611 | |||
612 | margin-right: 20px; | ||
613 | } | ||
614 | |||
615 | .actor-info { | ||
616 | display: flex; | ||
617 | flex-direction: column; | ||
618 | justify-content: center; | ||
619 | |||
620 | .actor-names { | ||
621 | display: flex; | ||
622 | align-items: center; | ||
623 | flex-wrap: wrap; | ||
624 | |||
625 | .actor-display-name { | ||
626 | font-size: 23px; | ||
627 | font-weight: $font-bold; | ||
628 | margin-right: 7px; | ||
629 | } | ||
630 | |||
631 | .actor-name { | ||
632 | position: relative; | ||
633 | top: 3px; | ||
634 | font-size: 14px; | ||
635 | color: $grey-actor-name; | ||
636 | } | ||
637 | } | ||
638 | |||
639 | .actor-lower { | ||
640 | grid-area: lower; | ||
641 | } | ||
642 | |||
643 | .actor-followers { | ||
644 | font-size: 15px; | ||
645 | } | ||
646 | |||
647 | .actor-owner { | ||
648 | @include actor-owner; | ||
649 | } | ||
650 | } | ||
651 | } | ||
652 | |||
653 | .links { | ||
654 | margin-top: 0; | ||
655 | margin-bottom: 15px; | ||
656 | |||
657 | a { | ||
658 | margin-top: 0; | ||
659 | margin-bottom: 0; | ||
660 | text-transform: uppercase; | ||
661 | font-weight: 600; | ||
662 | font-size: 110%; | ||
663 | |||
664 | @media screen and (max-width: $mobile-view) { | ||
665 | font-size: 130%; | ||
666 | } | ||
667 | } | ||
668 | |||
669 | list-overflow { | ||
670 | display: inline-block; | ||
671 | width: max-content; | ||
672 | } | ||
673 | } | ||
674 | } | ||
675 | |||
676 | @mixin create-button { | 618 | @mixin create-button { |
677 | @include peertube-button-link; | 619 | @include peertube-button-link; |
678 | @include orange-button; | 620 | @include orange-button; |
679 | @include button-with-icon(20px, 5px, -1px); | 621 | @include button-with-icon(20px, 5px, -1px); |
680 | } | 622 | } |
681 | 623 | ||
682 | @mixin row-blocks { | 624 | @mixin row-blocks ($column-responsive: true) { |
683 | display: flex; | 625 | display: flex; |
684 | min-height: 130px; | 626 | min-height: 130px; |
685 | padding-bottom: 20px; | 627 | padding-bottom: 20px; |
686 | margin-bottom: 20px; | 628 | margin-bottom: 20px; |
687 | border-bottom: 1px solid #C6C6C6; | 629 | border-bottom: 1px solid #C6C6C6; |
688 | 630 | ||
689 | @media screen and (max-width: 800px) { | 631 | @media screen and (max-width: $small-view) { |
690 | flex-direction: column; | 632 | @if $column-responsive { |
691 | height: auto; | 633 | flex-direction: column; |
692 | align-items: center; | 634 | height: auto; |
635 | align-items: center; | ||
636 | } @else { | ||
637 | min-height: initial; | ||
638 | padding-bottom: 10px; | ||
639 | margin-bottom: 10px; | ||
640 | } | ||
693 | } | 641 | } |
694 | } | 642 | } |
695 | 643 | ||
@@ -756,7 +704,7 @@ | |||
756 | padding: 0.75rem 1rem; | 704 | padding: 0.75rem 1rem; |
757 | margin-bottom: 1rem; | 705 | margin-bottom: 1rem; |
758 | list-style: none; | 706 | list-style: none; |
759 | background-color: pvar(--submenuColor); | 707 | background-color: pvar(--submenuBackgroundColor); |
760 | border-radius: 0.25rem; | 708 | border-radius: 0.25rem; |
761 | 709 | ||
762 | .breadcrumb-item { | 710 | .breadcrumb-item { |
@@ -811,7 +759,7 @@ | |||
811 | & > a, | 759 | & > a, |
812 | & > div { | 760 | & > div { |
813 | padding: 20px; | 761 | padding: 20px; |
814 | background: pvar(--submenuColor); | 762 | background: pvar(--submenuBackgroundColor); |
815 | border-radius: 4px; | 763 | border-radius: 4px; |
816 | box-sizing: border-box; | 764 | box-sizing: border-box; |
817 | height: 100%; | 765 | height: 100%; |
@@ -833,7 +781,7 @@ | |||
833 | } | 781 | } |
834 | } | 782 | } |
835 | 783 | ||
836 | @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) { | 784 | @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) { |
837 | width: 95%; | 785 | width: 95%; |
838 | border-top: .05rem solid $color; | 786 | border-top: .05rem solid $color; |
839 | height: .05rem; | 787 | height: .05rem; |
@@ -916,7 +864,7 @@ | |||
916 | } | 864 | } |
917 | } | 865 | } |
918 | 866 | ||
919 | @mixin admin-sub-header-responsive ($horizontal-margins) { | 867 | @mixin admin-sub-header-responsive { |
920 | flex-direction: column; | 868 | flex-direction: column; |
921 | 869 | ||
922 | .form-sub-title { | 870 | .form-sub-title { |
@@ -931,7 +879,7 @@ | |||
931 | white-space: nowrap; | 879 | white-space: nowrap; |
932 | height: 50px; | 880 | height: 50px; |
933 | padding: 10px 0; | 881 | padding: 10px 0; |
934 | width: calc(100vw - #{$horizontal-margins*2}); | 882 | width: 100%; |
935 | 883 | ||
936 | a { | 884 | a { |
937 | margin-left: 5px; | 885 | margin-left: 5px; |
@@ -939,14 +887,16 @@ | |||
939 | } | 887 | } |
940 | } | 888 | } |
941 | 889 | ||
942 | // applies 16:9 ratio to a child element (using $selector) only using | 890 | // applies ratio (default to 16:9) to a child element (using $selector) only using |
943 | // an immediate's parent size. This allows 16:9 ratio without explicit | 891 | // an immediate's parent size. This allows to set a ratio without explicit |
944 | // dimensions, as width/height cannot be computed from each other. | 892 | // dimensions, as width/height cannot be computed from each other. |
945 | @mixin large-screen-ratio ($selector: 'div') { | 893 | @mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) { |
894 | $padding-percent: percentage($inverted-ratio); | ||
895 | |||
946 | position: relative; | 896 | position: relative; |
947 | height: 0; | 897 | height: 0; |
948 | width: 100%; | 898 | width: 100%; |
949 | padding-top: 56%; | 899 | padding-top: $padding-percent; |
950 | 900 | ||
951 | #{$selector} { | 901 | #{$selector} { |
952 | position: absolute; | 902 | position: absolute; |
@@ -964,7 +914,7 @@ | |||
964 | padding-bottom: 15px; | 914 | padding-bottom: 15px; |
965 | margin-bottom: $sub-menu-margin-bottom; | 915 | margin-bottom: $sub-menu-margin-bottom; |
966 | 916 | ||
967 | my-global-icon { | 917 | > my-global-icon { |
968 | margin-right: 10px; | 918 | margin-right: 10px; |
969 | vertical-align: bottom; | 919 | vertical-align: bottom; |
970 | width: 24px; | 920 | width: 24px; |
@@ -991,3 +941,31 @@ | |||
991 | 941 | ||
992 | border-left: $width solid rgba(255, 255, 255, 0.95); | 942 | border-left: $width solid rgba(255, 255, 255, 0.95); |
993 | } | 943 | } |
944 | |||
945 | @mixin on-small-main-col () { | ||
946 | :host-context(.main-col:not(.expanded)) { | ||
947 | @media screen and (max-width: $small-view + $menu-width) { | ||
948 | @content; | ||
949 | } | ||
950 | } | ||
951 | |||
952 | :host-context(.main-col.expanded) { | ||
953 | @media screen and (max-width: $small-view) { | ||
954 | @content; | ||
955 | } | ||
956 | } | ||
957 | } | ||
958 | |||
959 | @mixin on-mobile-main-col () { | ||
960 | :host-context(.main-col:not(.expanded)) { | ||
961 | @media screen and (max-width: $mobile-view + $menu-width) { | ||
962 | @content; | ||
963 | } | ||
964 | } | ||
965 | |||
966 | :host-context(.main-col.expanded) { | ||
967 | @media screen and (max-width: $mobile-view) { | ||
968 | @content; | ||
969 | } | ||
970 | } | ||
971 | } | ||
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index c8316473d..d2a5d2bd9 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -16,9 +16,10 @@ $grey-foreground-hover-color: #303030; | |||
16 | $grey-button-outline-color: scale-color($grey-foreground-color, $alpha: -95%); | 16 | $grey-button-outline-color: scale-color($grey-foreground-color, $alpha: -95%); |
17 | 17 | ||
18 | $main-color: hsl(24, 90%, 50%); | 18 | $main-color: hsl(24, 90%, 50%); |
19 | $main-hover-color: lighten($main-color, 5%); | ||
20 | $main-color-lighter: lighten($main-color, 10%); | 19 | $main-color-lighter: lighten($main-color, 10%); |
21 | $main-color-lightest: lighten($main-color, 40%); | 20 | $main-color-lightest: lighten($main-color, 40%); |
21 | $main-hover-color: lighten($main-color, 5%); | ||
22 | |||
22 | $secondary-color: hsl(187, 77%, 34%); | 23 | $secondary-color: hsl(187, 77%, 34%); |
23 | 24 | ||
24 | $support-button: inherit; | 25 | $support-button: inherit; |
@@ -47,18 +48,34 @@ $menu-bottom-color: #C6C6C6; | |||
47 | $menu-width: 240px; | 48 | $menu-width: 240px; |
48 | $menu-lateral-padding: 26px; | 49 | $menu-lateral-padding: 26px; |
49 | 50 | ||
50 | $sub-menu-color: #F7F7F7; | 51 | $sub-menu-background-color: #F7F7F7; |
51 | $sub-menu-height: 81px; | 52 | $sub-menu-height: 81px; |
52 | 53 | ||
54 | $channel-background-color: #f6ede8; | ||
55 | |||
56 | $banner-inverted-ratio: 1/6; | ||
57 | |||
58 | $max-channels-width: 1200px; | ||
59 | |||
53 | $footer-height: 30px; | 60 | $footer-height: 30px; |
54 | $footer-margin: 30px; | 61 | $footer-margin: 30px; |
55 | 62 | ||
56 | $separator-border-color: rgba(0, 0, 0, 0.10); | 63 | $separator-border-color: rgba(0, 0, 0, 0.10); |
57 | 64 | ||
58 | $video-miniature-width: 238px; | ||
59 | $video-miniature-margin-bottom: 15px; | 65 | $video-miniature-margin-bottom: 15px; |
60 | $video-thumbnail-height: 122px; | 66 | |
61 | $video-thumbnail-width: 223px; | 67 | $video-miniature-row-name-font-size: 1.3em; |
68 | $video-miniature-row-mobile-name-font-size: 14px; | ||
69 | |||
70 | $video-miniature-row-info-font-size: 14px; | ||
71 | $video-miniature-row-mobile-info-font-size: 12px; | ||
72 | |||
73 | $video-thumbnail-height: 153px; | ||
74 | $video-thumbnail-width: 280px; | ||
75 | $video-thumbnail-medium-height: 114px; | ||
76 | $video-thumbnail-medium-width: 201px; | ||
77 | $video-thumbnail-small-height: 71px; | ||
78 | $video-thumbnail-small-width: 125px; | ||
62 | 79 | ||
63 | $theater-bottom-space: 115px; | 80 | $theater-bottom-space: 115px; |
64 | 81 | ||
@@ -98,7 +115,9 @@ $variables: ( | |||
98 | 115 | ||
99 | --menuBackgroundColor: var(--menuBackgroundColor), | 116 | --menuBackgroundColor: var(--menuBackgroundColor), |
100 | --menuForegroundColor: var(--menuForegroundColor), | 117 | --menuForegroundColor: var(--menuForegroundColor), |
101 | --submenuColor: var(--submenuColor), | 118 | |
119 | --submenuBackgroundColor: var(--submenuBackgroundColor), | ||
120 | --channelBackgroundColor: var(--channelBackgroundColor), | ||
102 | 121 | ||
103 | --inputForegroundColor: var(--inputForegroundColor), | 122 | --inputForegroundColor: var(--inputForegroundColor), |
104 | --inputBackgroundColor: var(--inputBackgroundColor), | 123 | --inputBackgroundColor: var(--inputBackgroundColor), |
@@ -116,11 +135,20 @@ $variables: ( | |||
116 | --supportButtonHeartColor: var(--supportButtonHeartColor), | 135 | --supportButtonHeartColor: var(--supportButtonHeartColor), |
117 | 136 | ||
118 | --embedForegroundColor: var(--embedForegroundColor), | 137 | --embedForegroundColor: var(--embedForegroundColor), |
119 | --embedBigPlayBackgroundColor: var(--embedBigPlayBackgroundColor) | 138 | --embedBigPlayBackgroundColor: var(--embedBigPlayBackgroundColor), |
139 | |||
140 | --horizontalMarginContent: var(--horizontalMarginContent), | ||
141 | --videosHorizontalMarginContent: var(--videosHorizontalMarginContent), | ||
142 | --mainColWidth: var(--mainColWidth) | ||
120 | ); | 143 | ); |
121 | 144 | ||
145 | // SASS type check our CSS variables | ||
122 | @function pvar($variable) { | 146 | @function pvar($variable) { |
123 | @return map-get($variables, $variable); | 147 | @if map-has-key($variables, $variable) { |
148 | @return map-get($variables, $variable); | ||
149 | } @else { | ||
150 | @error "ERROR: Variable #{$variable} does not exist"; | ||
151 | } | ||
124 | } | 152 | } |
125 | 153 | ||
126 | /*** z-index groups ***/ | 154 | /*** z-index groups ***/ |