mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(learn): add catalog (#65596)
Co-authored-by: jdwilkin4 <jwilkin4@hotmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { catalogSuperBlocks } from './curriculum';
|
||||
import { catalog } from './catalog';
|
||||
import { superBlockStages, SuperBlockStage } from './curriculum';
|
||||
|
||||
describe('catalog', () => {
|
||||
it('should have exactly one entry for each superblock in SuperBlockStage.Catalog', () => {
|
||||
const catalogSuperBlocks = superBlockStages[SuperBlockStage.Catalog];
|
||||
|
||||
expect(catalog.map(course => course.superBlock.toString()).sort()).toEqual(
|
||||
catalogSuperBlocks.map(sb => sb.toString()).sort()
|
||||
);
|
||||
|
||||
@@ -6,21 +6,188 @@ enum Levels {
|
||||
Advanced = 'advanced'
|
||||
}
|
||||
|
||||
enum Topic {
|
||||
Html = 'html',
|
||||
CSS = 'css',
|
||||
Js = 'js',
|
||||
React = 'react',
|
||||
Python = 'python',
|
||||
DataAnalysis = 'data-analysis',
|
||||
MachineLearning = 'machine-learning',
|
||||
D3 = 'd3',
|
||||
Api = 'api',
|
||||
InformationSecurity = 'information-security',
|
||||
ComputerFundamentals = 'computer-fundamentals'
|
||||
}
|
||||
|
||||
interface Catalog {
|
||||
superBlock: SuperBlocks;
|
||||
level: Levels;
|
||||
hours: number;
|
||||
topic: Topic;
|
||||
}
|
||||
|
||||
export const catalog: Catalog[] = [
|
||||
{
|
||||
superBlock: SuperBlocks.BasicHtml,
|
||||
superBlock: SuperBlocks.HtmlFormsAndTables,
|
||||
level: Levels.Beginner,
|
||||
hours: 2
|
||||
hours: 2,
|
||||
topic: Topic.Html
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.SemanticHtml,
|
||||
level: Levels.Beginner,
|
||||
hours: 2
|
||||
hours: 2,
|
||||
topic: Topic.Html
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.BasicHtml,
|
||||
level: Levels.Beginner,
|
||||
hours: 3,
|
||||
topic: Topic.Html
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LearnPythonForBeginners,
|
||||
level: Levels.Beginner,
|
||||
hours: 5,
|
||||
topic: Topic.Python
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LabSurveyForm,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.Html
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.HtmlAndAccessibility,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.Html
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.ComputerBasics,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.ComputerFundamentals
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.BasicCss,
|
||||
level: Levels.Beginner,
|
||||
hours: 3,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.DesignForDevelopers,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.AbsoluteAndRelativeUnits,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.PseudoClassesAndElements,
|
||||
level: Levels.Intermediate,
|
||||
hours: 1,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssColors,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.StylingForms,
|
||||
level: Levels.Intermediate,
|
||||
hours: 1,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssBoxModel,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssFlexbox,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LabPageOfPlayingCards,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssTypography,
|
||||
level: Levels.Intermediate,
|
||||
hours: 1,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssAndAccessibility,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssPositioning,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.AttributeSelectors,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LabBookInventoryApp,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.ResponsiveDesign,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LabTechnicalDocumentationPage,
|
||||
level: Levels.Advanced,
|
||||
hours: 1,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssVariables,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssGrid,
|
||||
level: Levels.Intermediate,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.LabProductLandingPage,
|
||||
level: Levels.Beginner,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
},
|
||||
{
|
||||
superBlock: SuperBlocks.CssAnimations,
|
||||
level: Levels.Advanced,
|
||||
hours: 2,
|
||||
topic: Topic.CSS
|
||||
}
|
||||
];
|
||||
|
||||
@@ -341,7 +341,32 @@ export const superBlockToCertMap: {
|
||||
[SuperBlocks.BasicHtml]: null,
|
||||
[SuperBlocks.SemanticHtml]: null,
|
||||
[SuperBlocks.DevPlayground]: null,
|
||||
[SuperBlocks.FullStackOpen]: null
|
||||
[SuperBlocks.FullStackOpen]: null,
|
||||
[SuperBlocks.HtmlFormsAndTables]: null,
|
||||
[SuperBlocks.LabSurveyForm]: null,
|
||||
[SuperBlocks.HtmlAndAccessibility]: null,
|
||||
[SuperBlocks.ComputerBasics]: null,
|
||||
[SuperBlocks.BasicCss]: null,
|
||||
[SuperBlocks.DesignForDevelopers]: null,
|
||||
[SuperBlocks.AbsoluteAndRelativeUnits]: null,
|
||||
[SuperBlocks.PseudoClassesAndElements]: null,
|
||||
[SuperBlocks.CssColors]: null,
|
||||
[SuperBlocks.StylingForms]: null,
|
||||
[SuperBlocks.CssBoxModel]: null,
|
||||
[SuperBlocks.CssFlexbox]: null,
|
||||
[SuperBlocks.LabPageOfPlayingCards]: null,
|
||||
[SuperBlocks.CssTypography]: null,
|
||||
[SuperBlocks.CssAndAccessibility]: null,
|
||||
[SuperBlocks.CssPositioning]: null,
|
||||
[SuperBlocks.AttributeSelectors]: null,
|
||||
[SuperBlocks.LabBookInventoryApp]: null,
|
||||
[SuperBlocks.ResponsiveDesign]: null,
|
||||
[SuperBlocks.LabTechnicalDocumentationPage]: null,
|
||||
[SuperBlocks.CssVariables]: null,
|
||||
[SuperBlocks.CssGrid]: null,
|
||||
[SuperBlocks.LabProductLandingPage]: null,
|
||||
[SuperBlocks.CssAnimations]: null,
|
||||
[SuperBlocks.LearnPythonForBeginners]: null
|
||||
};
|
||||
|
||||
export const certificationRequirements: Partial<
|
||||
|
||||
@@ -40,7 +40,32 @@ export enum SuperBlocks {
|
||||
PythonV9 = 'python-v9',
|
||||
RelationalDbV9 = 'relational-databases-v9',
|
||||
BackEndDevApisV9 = 'back-end-development-and-apis-v9',
|
||||
FullStackDeveloperV9 = 'full-stack-developer-v9'
|
||||
FullStackDeveloperV9 = 'full-stack-developer-v9',
|
||||
HtmlFormsAndTables = 'html-forms-and-tables',
|
||||
LabSurveyForm = 'lab-survey-form',
|
||||
HtmlAndAccessibility = 'html-and-accessibility',
|
||||
ComputerBasics = 'computer-basics',
|
||||
BasicCss = 'basic-css',
|
||||
DesignForDevelopers = 'design-for-developers',
|
||||
AbsoluteAndRelativeUnits = 'absolute-and-relative-units',
|
||||
PseudoClassesAndElements = 'pseudo-classes-and-elements',
|
||||
CssColors = 'css-colors',
|
||||
StylingForms = 'styling-forms',
|
||||
CssBoxModel = 'css-box-model',
|
||||
CssFlexbox = 'css-flexbox',
|
||||
LabPageOfPlayingCards = 'lab-page-of-playing-cards',
|
||||
CssTypography = 'css-typography',
|
||||
CssAndAccessibility = 'css-and-accessibility',
|
||||
CssPositioning = 'css-positioning',
|
||||
AttributeSelectors = 'attribute-selectors',
|
||||
LabBookInventoryApp = 'lab-book-inventory-app',
|
||||
ResponsiveDesign = 'responsive-design',
|
||||
LabTechnicalDocumentationPage = 'lab-technical-documentation-page',
|
||||
CssVariables = 'css-variables',
|
||||
CssGrid = 'css-grid',
|
||||
LabProductLandingPage = 'lab-product-landing-page',
|
||||
CssAnimations = 'css-animations',
|
||||
LearnPythonForBeginners = 'learn-python-for-beginners'
|
||||
}
|
||||
|
||||
export const languageSuperBlocks = [
|
||||
@@ -164,15 +189,41 @@ export const superBlockStages: StageMap = {
|
||||
],
|
||||
// Catalog is treated like upcoming for now
|
||||
// Add catalog superBlocks to catalog.ts when adding new superBlocks
|
||||
[SuperBlockStage.Catalog]: [SuperBlocks.BasicHtml, SuperBlocks.SemanticHtml]
|
||||
[SuperBlockStage.Catalog]: [
|
||||
SuperBlocks.HtmlFormsAndTables,
|
||||
SuperBlocks.BasicHtml,
|
||||
SuperBlocks.SemanticHtml,
|
||||
SuperBlocks.LabSurveyForm,
|
||||
SuperBlocks.HtmlAndAccessibility,
|
||||
SuperBlocks.ComputerBasics,
|
||||
SuperBlocks.BasicCss,
|
||||
SuperBlocks.DesignForDevelopers,
|
||||
SuperBlocks.AbsoluteAndRelativeUnits,
|
||||
SuperBlocks.PseudoClassesAndElements,
|
||||
SuperBlocks.CssColors,
|
||||
SuperBlocks.StylingForms,
|
||||
SuperBlocks.CssBoxModel,
|
||||
SuperBlocks.CssFlexbox,
|
||||
SuperBlocks.LabPageOfPlayingCards,
|
||||
SuperBlocks.CssTypography,
|
||||
SuperBlocks.CssAndAccessibility,
|
||||
SuperBlocks.CssPositioning,
|
||||
SuperBlocks.AttributeSelectors,
|
||||
SuperBlocks.LabBookInventoryApp,
|
||||
SuperBlocks.ResponsiveDesign,
|
||||
SuperBlocks.LabTechnicalDocumentationPage,
|
||||
SuperBlocks.CssVariables,
|
||||
SuperBlocks.CssGrid,
|
||||
SuperBlocks.LabProductLandingPage,
|
||||
SuperBlocks.CssAnimations,
|
||||
SuperBlocks.LearnPythonForBeginners
|
||||
]
|
||||
};
|
||||
|
||||
Object.freeze(superBlockStages);
|
||||
|
||||
export const archivedSuperBlocks = superBlockStages[SuperBlockStage.Legacy];
|
||||
|
||||
export const catalogSuperBlocks = superBlockStages[SuperBlockStage.Catalog];
|
||||
|
||||
type NotAuditedSuperBlocks = {
|
||||
[key in Languages]: SuperBlocks[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user