richie-education 2.34.1-dev4 → 2.34.1-dev45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,14 @@ $r-theme: (
47
47
  item-cta-hollow-background: transparent,
48
48
  item-cta-hollow-border: transparent,
49
49
  item-divider-border: r-color('light-grey'),
50
+ dropdown-border-radius: 8px,
51
+ dropdown-padding: 0.5rem,
52
+ dropdown-gap: 0.5rem,
53
+ dropdown-background-color: r-color('azure2'),
54
+ dropdown-item-background-color: r-color('indianred3'),
55
+ dropdown-item-text-color: r-color('white'),
56
+ dropdown-item-border-radius: 4px,
57
+ dropdown-item-padding: 0.5rem 1rem,
50
58
  ),
51
59
  body-content: (
52
60
  base-color: r-color('black'),
@@ -209,8 +217,8 @@ $r-theme: (
209
217
  ),
210
218
  course-glimpse: (
211
219
  card-background: r-color('white'),
212
- base-shadow: 0 0 6px r-color('light-grey'),
213
- base-hover-shadow: 0 0 6px r-color('battleship-grey'),
220
+ base-shadow: 0 0 8px #00000033,
221
+ base-hover-shadow: 0 0 4px #00000055,
214
222
  cta-background: r-color('battleship-grey'),
215
223
  empty-color: r-color('slate-grey'),
216
224
  icon-shadow: (
@@ -224,8 +232,15 @@ $r-theme: (
224
232
  organization-color: r-color('firebrick6'),
225
233
  code-color: r-color('battleship-grey'),
226
234
  svg-icon-fill: r-color('white'),
227
- footer: $battleship-grey-scheme,
228
235
  organization-shadow: 0 0 6px r-color('light-grey'),
236
+ footer: $battleship-grey-scheme,
237
+ footer-offer-paid: $indianred3-scheme,
238
+ footer-offer-subscription: $indianred3-scheme,
239
+ footer-offer-partially_free: $indianred3-scheme,
240
+ footer-offer-certificate: null,
241
+ offer-icon-visibility: visible,
242
+ offer-certificate-icon-visibility: visible,
243
+ offer-price-visibility: visible,
229
244
  ),
230
245
  category-badges: (
231
246
  primary-item: $indianred3-scheme,
@@ -483,6 +498,8 @@ $r-theme: (
483
498
  ),
484
499
  program-detail: (
485
500
  cover-empty-background: r-color('smoke'),
501
+ checkmark-list-decoration: url('../../richie/images/components/checkmark.svg'),
502
+ checkmark-list-decoration-color: r-color('indianred3'),
486
503
  ),
487
504
  registered-credit-card: (
488
505
  title-color: r-color('charcoal'),
@@ -168,6 +168,10 @@
168
168
  flex-wrap: nowrap;
169
169
  }
170
170
 
171
+ & > .topbar__list {
172
+ position: relative;
173
+ }
174
+
171
175
  // Aside menu variation
172
176
  &--aside {
173
177
  @include sv-flex(1, 0, auto);
@@ -197,6 +201,81 @@
197
201
  // Menu item element
198
202
  &__item {
199
203
  $item-selector: &;
204
+ &.dropdown {
205
+ display: block;
206
+ position: static;
207
+
208
+ & > button {
209
+ width: 100%;
210
+
211
+ & > .icon {
212
+ height: 1rem;
213
+ margin-left: 0.5rem;
214
+ width: 1rem;
215
+ }
216
+ }
217
+
218
+ & ul[role='menu'] {
219
+ padding-left: 0.5rem;
220
+ }
221
+ }
222
+
223
+ @include media-breakpoint-up($r-topbar-breakpoint) {
224
+ &.dropdown {
225
+ // See header_menu.html for the definition of the variables
226
+ --active-background-color: #{r-theme-val(topbar, dropdown-item-background-color)};
227
+ --active-text-color: #{r-theme-val(topbar, dropdown-item-text-color)};
228
+
229
+ & > button[aria-expanded='true'] {
230
+ background-color: r-theme-val(topbar, dropdown-background-color);
231
+ }
232
+
233
+ & > button[aria-expanded='true'] + .topbar__sublist {
234
+ display: block;
235
+ }
236
+
237
+ & > .topbar__sublist {
238
+ background: r-theme-val(topbar, dropdown-background-color);
239
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
240
+ border-radius: r-theme-val(topbar, dropdown-border-radius);
241
+ display: none;
242
+ position: absolute;
243
+ transform: translateX(-8px);
244
+ width: max-content;
245
+ max-width: 100%;
246
+
247
+ & > ul[role='menu'] {
248
+ display: flex;
249
+ flex-wrap: wrap;
250
+ gap: r-theme-val(topbar, dropdown-gap);
251
+ padding: r-theme-val(topbar, dropdown-padding);
252
+ }
253
+
254
+ & .topbar__item > a {
255
+ background-color: #fff;
256
+ border-radius: r-theme-val(topbar, dropdown-item-border-radius);
257
+ padding: r-theme-val(topbar, dropdown-item-padding);
258
+ &::after {
259
+ display: none;
260
+ }
261
+
262
+ &:is(:focus, :hover) {
263
+ background-color: var(--active-background-color);
264
+ color: var(--active-text-color);
265
+ }
266
+ }
267
+
268
+ &--full-width {
269
+ left: 0;
270
+ transform: inherit;
271
+ }
272
+
273
+ &--position-right {
274
+ transform: translateX(calc(-100% + (var(--button-width) + 8px)));
275
+ }
276
+ }
277
+ }
278
+ }
200
279
 
201
280
  @include sv-flex(1, 0, auto);
202
281
  display: flex;
@@ -213,15 +292,23 @@
213
292
  --r--menu--item--hover--color: #{r-theme-val(topbar, item-hover-color)};
214
293
  }
215
294
 
216
- & > a {
295
+ & > button {
296
+ @include button-reset-style();
297
+ --radius: #{r-theme-val(topbar, dropdown-border-radius)};
298
+ border-radius: var(--radius) var(--radius) 0 0;
299
+ }
300
+
301
+ & > a,
302
+ & > button {
217
303
  @include sv-flex(1, 0, 100%);
304
+ align-items: center;
305
+ color: inherit;
218
306
  display: flex;
219
- padding: 1rem 0.2rem 1rem 1rem;
220
307
  flex-direction: row;
221
- align-items: center;
222
308
  font-family: inherit;
223
309
  font-weight: inherit;
224
- color: inherit;
310
+ justify-content: space-between;
311
+ padding: 1rem 0.2rem 1rem 1rem;
225
312
 
226
313
  @include media-breakpoint-up($r-topbar-breakpoint) {
227
314
  padding: 1rem 1rem;
@@ -235,18 +322,22 @@
235
322
 
236
323
  // If there is no default hover color we assume there is also no variant
237
324
  @if r-theme-val(topbar, item-hover-color) {
238
- &::after {
239
- content: '';
240
- position: absolute;
241
- bottom: 0;
242
- left: 0;
243
- right: 0;
244
- height: 8px;
325
+ &:is(a)::after {
245
326
  background-color: var(--r--menu--item--hover--color);
246
327
  border-top-left-radius: 0.2rem;
247
328
  border-top-right-radius: 0.2rem;
329
+ bottom: 0;
330
+ content: '';
331
+ height: 8px;
332
+ left: 0;
333
+ position: absolute;
334
+ right: 0;
248
335
  }
249
336
  }
337
+
338
+ &:is(button) {
339
+ background-color: r-theme-val(topbar, dropdown-background-color);
340
+ }
250
341
  }
251
342
  }
252
343
  }
@@ -257,8 +348,10 @@
257
348
 
258
349
  // Current page item or current ancestor
259
350
  &--selected,
260
- &--ancestor {
261
- & > a {
351
+ &--ancestor,
352
+ &:has(.topbar__sublist .topbar__item.topbar__item--selected) {
353
+ & > a,
354
+ & > button {
262
355
  position: relative;
263
356
  color: r-theme-val(topbar, item-active-color);
264
357
 
@@ -328,7 +421,8 @@
328
421
  }
329
422
 
330
423
  // Item divider
331
- & + #{$item-selector} {
424
+ & + #{$item-selector},
425
+ & > .topbar__list #{$item-selector} {
332
426
  @if r-theme-val(topbar, item-divider-border) {
333
427
  border-top: $onepixel solid r-theme-val(topbar, item-divider-border);
334
428
  }
@@ -170,6 +170,41 @@ $r-subheader-search-title-width: 19rem !default; // aligned on computed search r
170
170
  position: relative;
171
171
  padding-bottom: 56.25%; // Aspect ratio 16/9
172
172
 
173
+ .video-player-image {
174
+ img {
175
+ filter: brightness(0.85);
176
+ object-fit: cover;
177
+ }
178
+ img,
179
+ span {
180
+ position: absolute;
181
+ width: 100%;
182
+ top: 0;
183
+ bottom: 0;
184
+ margin: auto;
185
+ }
186
+ span {
187
+ text-align: center;
188
+ font: 48px/1.5 sans-serif;
189
+ fill: white;
190
+ display: flex;
191
+ justify-content: center;
192
+ align-items: center;
193
+ }
194
+ span svg {
195
+ transition: 0.5s;
196
+ width: 85px;
197
+ height: 85px;
198
+ }
199
+ img:hover,
200
+ span:hover svg {
201
+ fill-opacity: 1;
202
+ filter: drop-shadow(3px 3px 30px rgb(0 0 0 / 0.65));
203
+ }
204
+ span svg {
205
+ filter: drop-shadow(3px 3px 12px rgb(0 0 0 / 0.25));
206
+ }
207
+ }
173
208
  iframe {
174
209
  height: 100%;
175
210
  position: absolute;
@@ -2,11 +2,13 @@
2
2
  //
3
3
 
4
4
  .program-detail {
5
+ $detail-selector: &;
5
6
  margin: 0 auto;
6
7
  padding: 0;
7
8
 
8
9
  &__block {
9
10
  @include detail-block;
11
+
10
12
  @if $body-padding-fix {
11
13
  @include content-padding-fix($target: '&:last-child');
12
14
  }
@@ -54,6 +56,75 @@
54
56
  padding-right: $grid-gutter-width;
55
57
  }
56
58
 
59
+ &__objectives {
60
+ ul {
61
+ padding-left: 0.3rem;
62
+ list-style-type: none;
63
+
64
+ li {
65
+ position: relative;
66
+ margin-top: 0.5rem;
67
+ font-size: 1rem;
68
+ padding-left: 1.5rem;
69
+
70
+ &::before {
71
+ content: '';
72
+ display: block;
73
+ position: absolute;
74
+ top: 0.2rem;
75
+ left: 0;
76
+ width: 0.8rem;
77
+ height: 0.8rem;
78
+ background-repeat: no-repeat;
79
+ background-color: r-theme-val(program-detail, checkmark-list-decoration-color);
80
+ -webkit-mask: r-theme-val(program-detail, checkmark-list-decoration);
81
+ mask: r-theme-val(program-detail, checkmark-list-decoration);
82
+ -webkit-mask-size: cover;
83
+ mask-size: cover;
84
+ }
85
+ }
86
+ }
87
+ }
88
+
89
+ &__content {
90
+ @include media-breakpoint-up(lg) {
91
+ padding-right: 3rem;
92
+ }
93
+ }
94
+
95
+ &__aside {
96
+ padding: 1rem 0;
97
+
98
+ @include media-breakpoint-up(lg) {
99
+ @include sv-flex(1, 0, $r-program-aside);
100
+ padding: 3rem 1rem;
101
+ }
102
+
103
+ #{$detail-selector}__row {
104
+ margin-bottom: 1.5rem;
105
+ }
106
+
107
+ #{$detail-selector}__title {
108
+ @include font-size($h3-font-size);
109
+ padding-bottom: 1rem;
110
+
111
+ @if r-theme-val(course-detail, aside-title-border) {
112
+ border-bottom: $onepixel solid r-theme-val(course-detail, aside-title-border);
113
+ }
114
+ }
115
+ }
116
+
117
+ &__main {
118
+ @include media-breakpoint-up(lg) {
119
+ @include sv-flex(1, 0, calc(100% - #{$r-program-subheader-aside}));
120
+ display: flex;
121
+ justify-content: flex-start;
122
+ align-content: flex-start;
123
+ align-items: flex-start;
124
+ flex-wrap: wrap;
125
+ }
126
+ }
127
+
57
128
  &__courses {
58
129
  @include make-col-ready();
59
130
  @include make-col(12);
@@ -57,10 +57,8 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
57
57
 
58
58
  position: relative;
59
59
  margin: $r-course-glimpse-gutter;
60
- border-radius: $border-radius-lg;
61
- box-shadow: r-theme-val(course-glimpse, base-shadow);
60
+
62
61
  min-width: 16rem;
63
- overflow: hidden;
64
62
 
65
63
  @include media-breakpoint-up(sm) {
66
64
  @include sv-flex(1, 0, calc(50% - #{$r-course-glimpse-gutter * 2}));
@@ -83,8 +81,16 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
83
81
  pointer-events: auto;
84
82
  }
85
83
 
86
- &:hover,
87
- &:focus-within {
84
+ &__body {
85
+ box-shadow: r-theme-val(course-glimpse, base-shadow);
86
+ border-radius: $border-radius-lg;
87
+ overflow: hidden;
88
+ transition: box-shadow 0.5s $r-ease-out;
89
+ z-index: 1;
90
+ }
91
+
92
+ &:hover &__body,
93
+ &:focus-within &__body {
88
94
  color: inherit;
89
95
  text-decoration: none;
90
96
  border: 0;
@@ -149,6 +155,7 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
149
155
  &__content {
150
156
  font-size: 0.9rem;
151
157
  color: r-theme-val(course-glimpse, content-color);
158
+ background: map-get(r-theme-val(course-glimpse, footer), 'background');
152
159
  }
153
160
 
154
161
  &__wrapper {
@@ -156,6 +163,9 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
156
163
  display: flex;
157
164
  flex-direction: column;
158
165
  position: relative;
166
+ color: r-theme-val(course-glimpse, card-background);
167
+ border-radius: 0 0 $border-radius-lg $border-radius-lg;
168
+ background-color: r-theme-val(course-glimpse, card-background);
159
169
  }
160
170
 
161
171
  &__title,
@@ -322,9 +332,26 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
322
332
  border-bottom-left-radius: $border-radius-lg;
323
333
  border-bottom-right-radius: $border-radius-lg;
324
334
  font-size: 0.7rem;
335
+ justify-content: space-between;
336
+ flex-wrap: wrap;
337
+ position: relative;
338
+ z-index: 0;
339
+ transition: transform 0.25s $r-ease-out;
325
340
 
326
- &__date {
327
- @include sv-flex(1, 0, auto);
341
+ &:after {
342
+ content: '';
343
+ position: absolute;
344
+ display: block;
345
+ top: -15px;
346
+ height: 30px;
347
+ left: 0;
348
+ right: 0;
349
+ @include r-button-colors(r-theme-val(course-glimpse, footer), $apply-border: true);
350
+ z-index: -1;
351
+ }
352
+
353
+ &__column {
354
+ @include sv-flex(0, 130px, auto);
328
355
  display: flex;
329
356
  margin: 0;
330
357
  padding: 0.45rem 0;
@@ -335,7 +362,54 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
335
362
  .icon {
336
363
  margin-right: 0.5rem;
337
364
  }
365
+
366
+ span {
367
+ display: inline-block;
368
+ max-width: 15ch;
369
+ font-variant-numeric: tabular-nums;
370
+ }
338
371
  }
372
+
373
+ &__price {
374
+ .offer-certificate__icon {
375
+ $visibility: r-theme-val(course-glimpse, offer-certificate-icon-visibility);
376
+ @if $visibility == hidden {
377
+ display: none;
378
+ }
379
+ visibility: $visibility;
380
+ }
381
+ .offer__icon {
382
+ $visibility: r-theme-val(course-glimpse, offer-icon-visibility);
383
+ @if $visibility == hidden {
384
+ display: none;
385
+ }
386
+ visibility: $visibility;
387
+ }
388
+
389
+ .offer__icon {
390
+ margin-right: 0;
391
+ & + .offer__price {
392
+ margin-left: 0.25rem;
393
+ }
394
+ }
395
+
396
+ .offer__price {
397
+ $visibility: r-theme-val(course-glimpse, offer-price-visibility);
398
+ @if $visibility == hidden {
399
+ display: none;
400
+ }
401
+ visibility: $visibility;
402
+ // Align vertically the price with the icon
403
+ margin-top: calc(1ex - 1cap);
404
+ }
405
+ }
406
+ }
407
+
408
+ .course-glimpse:hover .course-glimpse-footer,
409
+ .course-glimpse:hover .course-glimpse__large-footer,
410
+ .course-glimpse:focus-within .course-glimpse-footer,
411
+ .course-glimpse:focus-within .course-glimpse__large-footer {
412
+ transform: translateY(4px);
339
413
  }
340
414
 
341
415
  //
@@ -346,3 +420,25 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
346
420
  @include sv-flex(1, 0, calc(33.33333% - #{$r-course-glimpse-gutter * 2}));
347
421
  }
348
422
  }
423
+
424
+ // Course Glimpse Variant according to the offer
425
+ $offer-schemes: (
426
+ certificate: r-theme-val(course-glimpse, footer-offer-certificate),
427
+ free: r-theme-val(course-glimpse, footer-offer-free),
428
+ paid: r-theme-val(course-glimpse, footer-offer-paid),
429
+ partially_free: r-theme-val(course-glimpse, footer-offer-partially_free),
430
+ subscription: r-theme-val(course-glimpse, footer-offer-subscription),
431
+ );
432
+
433
+ @each $offer, $scheme in $offer-schemes {
434
+ @if $scheme != null {
435
+ .course-glimpse--offer-#{$offer} {
436
+ .course-glimpse-footer {
437
+ @include r-button-colors($scheme, $apply-border: true);
438
+ &:after {
439
+ background: map-get($scheme, 'background');
440
+ }
441
+ }
442
+ }
443
+ }
444
+ }
@@ -1,5 +1,6 @@
1
1
  .selector {
2
2
  position: relative;
3
+ z-index: 200;
3
4
 
4
5
  &__button {
5
6
  appearance: none;
@@ -152,11 +152,13 @@ $r-footer-logo-width-lg: 11.875rem !default;
152
152
  // full width like common blocks. Usefull if you plan to remove course run from
153
153
  // template
154
154
  $r-course-aside: 35% !default;
155
+ $r-program-aside: 25% !default;
155
156
 
156
157
  // Subheader aside column width in course detail. Unlike, $r-course-aside this
157
158
  // variable cannot be null. Otherwise to homegenize layout, it should have the
158
159
  // same value than $r-course-aside.
159
160
  $r-course-subheader-aside: 35% !default;
161
+ $r-program-subheader-aside: 25% !default;
160
162
 
161
163
  // Course search page shared variables
162
164
  $r-search-filters-gutter: 0.2rem !default;
@@ -173,6 +175,8 @@ $r-section-grid-sizes: (
173
175
  '33x33x33': 1fr 1fr 1fr,
174
176
  '25x75': 25% 2fr,
175
177
  '75x25': 2fr 25%,
178
+ '35x65': 35% 2fr,
179
+ '65x35': 2fr 35%,
176
180
  );
177
181
 
178
182
  // Define gutter size to apply on Section grid