richie-education 2.33.1-dev6 → 2.33.1-dev8
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.
|
@@ -11,6 +11,16 @@ import CourseRunEnrollment from '../CourseRunEnrollment';
|
|
|
11
11
|
import CourseProductItem from '../CourseProductItem';
|
|
12
12
|
|
|
13
13
|
const messages = defineMessages({
|
|
14
|
+
enrollNow: {
|
|
15
|
+
id: 'components.SyllabusCourseRun.enrollNow',
|
|
16
|
+
description: 'CTA for users to enroll on ongoing of future open course.',
|
|
17
|
+
defaultMessage: 'Enroll now',
|
|
18
|
+
},
|
|
19
|
+
studyNow: {
|
|
20
|
+
id: 'components.SyllabusCourseRun.studyNow',
|
|
21
|
+
description: 'CTA for users to enroll on archived course.',
|
|
22
|
+
defaultMessage: 'Study now',
|
|
23
|
+
},
|
|
14
24
|
enrollment: {
|
|
15
25
|
id: 'components.SyllabusCourseRun.enrollment',
|
|
16
26
|
description: 'Title of the enrollment dates section of an opened course run block',
|
|
@@ -94,7 +104,12 @@ const OpenedCourseRun = ({
|
|
|
94
104
|
<CourseRunEnrollment courseRun={courseRun} />
|
|
95
105
|
) : (
|
|
96
106
|
<Button className="course-run-enrollment__cta" href={courseRun.resource_link} fullWidth>
|
|
97
|
-
{
|
|
107
|
+
{courseRun.state.call_to_action === 'enroll now' ? (
|
|
108
|
+
<FormattedMessage {...messages.enrollNow} />
|
|
109
|
+
) : null}
|
|
110
|
+
{courseRun.state.call_to_action === 'study now' ? (
|
|
111
|
+
<FormattedMessage {...messages.studyNow} />
|
|
112
|
+
) : null}
|
|
98
113
|
</Button>
|
|
99
114
|
)}
|
|
100
115
|
</>
|
|
@@ -11,6 +11,16 @@ import CourseRunEnrollment from '../CourseRunEnrollment';
|
|
|
11
11
|
import CourseProductItem from '../CourseProductItem';
|
|
12
12
|
|
|
13
13
|
const messages = defineMessages({
|
|
14
|
+
enrollNow: {
|
|
15
|
+
id: 'components.SyllabusCourseRunCompacted.enrollNow',
|
|
16
|
+
description: 'CTA for users to enroll on ongoing of future open course.',
|
|
17
|
+
defaultMessage: 'Enroll now',
|
|
18
|
+
},
|
|
19
|
+
studyNow: {
|
|
20
|
+
id: 'components.SyllabusCourseRunCompacted.studyNow',
|
|
21
|
+
description: 'CTA for users to enroll on archived course.',
|
|
22
|
+
defaultMessage: 'Study now',
|
|
23
|
+
},
|
|
14
24
|
course: {
|
|
15
25
|
id: 'components.SyllabusCourseRunCompacted.course',
|
|
16
26
|
description: 'Title of the course dates section of an opened course run block',
|
|
@@ -78,7 +88,12 @@ const OpenedSelfPacedCourseRun = ({
|
|
|
78
88
|
<CourseRunEnrollment courseRun={courseRun} />
|
|
79
89
|
) : (
|
|
80
90
|
<Button className="course-run-enrollment__cta" href={courseRun.resource_link} fullWidth>
|
|
81
|
-
{
|
|
91
|
+
{courseRun.state.call_to_action === 'enroll now' ? (
|
|
92
|
+
<FormattedMessage {...messages.enrollNow} />
|
|
93
|
+
) : null}
|
|
94
|
+
{courseRun.state.call_to_action === 'study now' ? (
|
|
95
|
+
<FormattedMessage {...messages.studyNow} />
|
|
96
|
+
) : null}
|
|
82
97
|
</Button>
|
|
83
98
|
)}
|
|
84
99
|
</>
|
package/package.json
CHANGED
|
@@ -208,6 +208,11 @@
|
|
|
208
208
|
@include sv-flex(0, 0, auto);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
// Define color variable for default item color on hover then available variants
|
|
212
|
+
@if r-theme-val(topbar, item-hover-color) {
|
|
213
|
+
--r--menu--item--hover--color: #{r-theme-val(topbar, item-hover-color)};
|
|
214
|
+
}
|
|
215
|
+
|
|
211
216
|
& > a {
|
|
212
217
|
@include sv-flex(1, 0, 100%);
|
|
213
218
|
display: flex;
|
|
@@ -228,6 +233,7 @@
|
|
|
228
233
|
@include media-breakpoint-up($r-topbar-breakpoint) {
|
|
229
234
|
position: relative;
|
|
230
235
|
|
|
236
|
+
// If there is no default hover color we assume there is also no variant
|
|
231
237
|
@if r-theme-val(topbar, item-hover-color) {
|
|
232
238
|
&::after {
|
|
233
239
|
content: '';
|
|
@@ -236,7 +242,7 @@
|
|
|
236
242
|
left: 0;
|
|
237
243
|
right: 0;
|
|
238
244
|
height: 8px;
|
|
239
|
-
background-color: r
|
|
245
|
+
background-color: var(--r--menu--item--hover--color);
|
|
240
246
|
border-top-left-radius: 0.2rem;
|
|
241
247
|
border-top-right-radius: 0.2rem;
|
|
242
248
|
}
|