mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-22 05:01:23 -05:00
feat(Curriculum): Add new BlockType tags for the Language Curricula Chapter Based Certifications (#62156)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -647,7 +647,10 @@
|
||||
"lab": "Lab",
|
||||
"review": "Review",
|
||||
"quiz": "Quiz",
|
||||
"exam": "Exam"
|
||||
"exam": "Exam",
|
||||
"warm-up": "Warm-up",
|
||||
"learn": "Learn",
|
||||
"practice": "Practice"
|
||||
}
|
||||
},
|
||||
"donate": {
|
||||
|
||||
@@ -61,6 +61,21 @@
|
||||
color: var(--quaternary-color);
|
||||
}
|
||||
|
||||
.block-label-warm-up {
|
||||
border-color: var(--yellow-color);
|
||||
color: var(--yellow-color);
|
||||
}
|
||||
|
||||
.block-label-learn {
|
||||
border-color: var(--highlight-color);
|
||||
color: var(--highlight-color);
|
||||
}
|
||||
|
||||
.block-label-practice {
|
||||
border-color: var(--success-color);
|
||||
color: var(--success-color);
|
||||
}
|
||||
|
||||
.block-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -137,7 +137,10 @@ const schema = Joi.object().keys({
|
||||
'lecture',
|
||||
'review',
|
||||
'quiz',
|
||||
'exam'
|
||||
'exam',
|
||||
'warm-up',
|
||||
'learn',
|
||||
'practice'
|
||||
).required(),
|
||||
otherwise: Joi.valid(null)
|
||||
}),
|
||||
|
||||
@@ -21,7 +21,10 @@ const schema = Joi.object()
|
||||
'lecture',
|
||||
'review',
|
||||
'quiz',
|
||||
'exam'
|
||||
'exam',
|
||||
'warm-up',
|
||||
'learn',
|
||||
'practice'
|
||||
),
|
||||
isUpcomingChange: Joi.boolean().required(),
|
||||
dashedName: Joi.string().regex(slugRE).required(),
|
||||
|
||||
@@ -4,7 +4,11 @@ export enum BlockTypes {
|
||||
lab = 'lab',
|
||||
review = 'review',
|
||||
quiz = 'quiz',
|
||||
exam = 'exam'
|
||||
exam = 'exam',
|
||||
/* The tags below refer to the Language Curricula chapter based certifications*/
|
||||
warmup = 'warm-up',
|
||||
learn = 'learn',
|
||||
practice = 'practice'
|
||||
}
|
||||
|
||||
export enum BlockLayouts {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
const Joi = require('joi');
|
||||
const {
|
||||
chapterBasedSuperBlocks
|
||||
} = require('../../../shared/config/curriculum');
|
||||
|
||||
const blockSchema = Joi.object({}).keys({
|
||||
desc: Joi.array().min(1),
|
||||
@@ -40,9 +43,12 @@ const blockSchema = Joi.object({}).keys({
|
||||
'lab',
|
||||
'review',
|
||||
'quiz',
|
||||
'exam'
|
||||
'exam',
|
||||
'warm-up',
|
||||
'learn',
|
||||
'practice'
|
||||
).when('superBlock', {
|
||||
is: 'full-stack-developer',
|
||||
is: chapterBasedSuperBlocks,
|
||||
then: Joi.required(),
|
||||
otherwise: Joi.optional()
|
||||
}),
|
||||
|
||||
@@ -45,7 +45,10 @@ const blockSchema = Joi.object().keys({
|
||||
'lab',
|
||||
'review',
|
||||
'quiz',
|
||||
'exam'
|
||||
'exam',
|
||||
'warm-up',
|
||||
'learn',
|
||||
'practice'
|
||||
).when('superBlock', {
|
||||
is: chapterBasedSuperBlocks,
|
||||
then: Joi.required(),
|
||||
|
||||
Reference in New Issue
Block a user