@sp-days-framework/create-sp-days 1.0.3 → 1.1.0-beta1
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.
- package/README.md +14 -0
- package/bin/index.js +2 -0
- package/docs/advanced-config.mdx +387 -0
- package/docs/changelog.mdx +106 -0
- package/docs/index.mdx +205 -0
- package/docs/install.mdx +199 -0
- package/docs/sidebar-sections.mdx +268 -0
- package/docs/sp-days-plugin-color-light.svg +53 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/.tsbuildinfo-build +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +36 -7
- package/package.json +31 -7
- package/publish-package-docs.js +12 -0
- package/templates/addon-resources/resources/api-reference.mdx +132 -0
- package/templates/addon-resources/resources/best-practice.mdx +407 -0
- package/templates/addon-resources/resources/cheat-sheet.mdx +120 -0
- package/templates/addon-resources/resources/cli-reference.mdx +280 -0
- package/templates/addon-resources/resources/configuration-guide.mdx +211 -0
- package/templates/addon-resources/resources/environment-setup.mdx +317 -0
- package/templates/addon-resources/resources/faq.mdx +146 -0
- package/templates/addon-resources/resources/glossary.mdx +78 -0
- package/templates/addon-resources/resources/index.mdx +67 -16
- package/templates/addon-resources/resources/quick-start.mdx +193 -0
- package/templates/addon-resources/resources/troubleshooting.mdx +263 -0
- package/templates/addon-resources/resources/useful-links.mdx +61 -0
- package/templates/page-course/README.md +62 -0
- package/templates/page-course/docusaurus.config.ts +65 -5
- package/templates/page-course/package.json +12 -2
- package/templates/page-course/sidebarSections.js +118 -0
- package/tsconfig.base.client.json +10 -0
- package/tsconfig.base.json +71 -0
- package/tsconfig.build.json +9 -0
- package/templates/addon-resources/resources/frontpage-collection/components/Columns.mdx +0 -191
- package/templates/addon-resources/resources/frontpage-collection/components/ContentBlock.mdx +0 -126
- package/templates/addon-resources/resources/frontpage-collection/components/CourseFeature.mdx +0 -147
- package/templates/addon-resources/resources/frontpage-collection/components/FancyHeader.mdx +0 -76
- package/templates/addon-resources/resources/frontpage-collection/components/GetStarted.mdx +0 -222
- package/templates/addon-resources/resources/frontpage-collection/components/HeroBanner.mdx +0 -205
- package/templates/addon-resources/resources/frontpage-collection/components/IconContainer.mdx +0 -249
- package/templates/addon-resources/resources/frontpage-collection/components/Iconify.mdx +0 -228
- package/templates/addon-resources/resources/frontpage-collection/components/_category_.yml +0 -2
- package/templates/addon-resources/resources/frontpage-collection/index.mdx +0 -85
- package/templates/addon-resources/resources/frontpage-collection/setup/index.mdx +0 -185
- package/templates/addon-resources/resources/interactive-tasks/creating-tasks.mdx +0 -292
- package/templates/addon-resources/resources/interactive-tasks/examples/_category_.yml +0 -3
- package/templates/addon-resources/resources/interactive-tasks/examples/advanced-usage.mdx +0 -304
- package/templates/addon-resources/resources/interactive-tasks/examples/basic-usage.mdx +0 -128
- package/templates/addon-resources/resources/interactive-tasks/index.mdx +0 -93
- package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx +0 -150
- package/templates/addon-resources/resources/interactive-tasks/setup/index.mdx +0 -174
- package/templates/addon-resources/resources/interactive-tasks/task-progression.mdx +0 -140
- package/templates/addon-resources/resources/slidev-integration/index.mdx +0 -106
- package/templates/addon-resources/resources/slidev-integration/setup/advanced-configuration.mdx +0 -144
- package/templates/addon-resources/resources/slidev-integration/setup/index.mdx +0 -200
- package/templates/addon-resources/resources/sykehuspartner-theme/index.mdx +0 -105
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/center.mdx +0 -33
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/default.mdx +0 -59
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/full.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-left.mdx +0 -37
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-right.mdx +0 -37
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image.mdx +0 -56
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols-header.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols.mdx +0 -47
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols-header.mdx +0 -43
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols.mdx +0 -38
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/cover.mdx +0 -43
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/end.mdx +0 -33
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/intro.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/section.mdx +0 -41
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/about-me.mdx +0 -92
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/fact.mdx +0 -47
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/quote.mdx +0 -27
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/statement.mdx +0 -28
- package/templates/addon-resources/resources/sykehuspartner-theme/setup/advanced-configuration.mdx +0 -79
- package/templates/addon-resources/resources/sykehuspartner-theme/setup/index.mdx +0 -104
- package/templates/addon-resources/resources/sykehuspartner-theme/syntax-and-icons.mdx +0 -89
- package/templates/addon-slidev/package.json +0 -54
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"serve": "docusaurus serve",
|
|
13
13
|
"write-translations": "docusaurus write-translations",
|
|
14
14
|
"write-heading-ids": "docusaurus write-heading-ids",
|
|
15
|
+
// CONDITIONAL: addon-slidev (START)
|
|
16
|
+
"slidev": "slidev",
|
|
17
|
+
// CONDITIONAL: addon-slidev (END)
|
|
15
18
|
"typecheck": "tsc"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
@@ -19,8 +22,15 @@
|
|
|
19
22
|
"@docusaurus/preset-classic": "^3.9.2",
|
|
20
23
|
"@docusaurus/theme-mermaid": "^3.9.2",
|
|
21
24
|
"@mdx-js/react": "^3.0.0",
|
|
22
|
-
"@sp-days-framework/docusaurus-frontpage-collection": "^1.0
|
|
23
|
-
"@sp-days-framework/docusaurus-plugin-interactive-tasks": "^1.0
|
|
25
|
+
"@sp-days-framework/docusaurus-frontpage-collection": "^1.1.0-beta1",
|
|
26
|
+
"@sp-days-framework/docusaurus-plugin-interactive-tasks": "^1.1.0-beta1",
|
|
27
|
+
// CONDITIONAL: addon-slidev (START)
|
|
28
|
+
"@sp-days-framework/docusaurus-plugin-slidev": "^1.1.0-beta1",
|
|
29
|
+
"@sp-days-framework/slidev-theme-sykehuspartner": "^1.1.0-beta1",
|
|
30
|
+
// CONDITIONAL: addon-slidev (END)
|
|
31
|
+
// CONDITIONAL: package-docs (START)
|
|
32
|
+
"@sp-days-framework/create-sp-days": "^1.1.0-beta1",
|
|
33
|
+
// CONDITIONAL: package-docs (END)
|
|
24
34
|
"clsx": "^2.0.0",
|
|
25
35
|
"docusaurus-plugin-sass": "^0.2.6",
|
|
26
36
|
"prism-react-renderer": "^2.3.0",
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom sidebar generator that dynamically groups pages and categories based on sidebar_custom_props.section
|
|
3
|
+
*
|
|
4
|
+
* Usage in document frontmatter:
|
|
5
|
+
* ---
|
|
6
|
+
* sidebar_label: "API Reference"
|
|
7
|
+
* sidebar_custom_props:
|
|
8
|
+
* section: "Templates"
|
|
9
|
+
* section_position: 2
|
|
10
|
+
* ---
|
|
11
|
+
*
|
|
12
|
+
* Usage in _category_.yml:
|
|
13
|
+
* label: "Content"
|
|
14
|
+
* customProps:
|
|
15
|
+
* section: "Layouts"
|
|
16
|
+
* section_position: 3
|
|
17
|
+
*
|
|
18
|
+
* Pages and categories with the same section value will be grouped together under a separator with that name.
|
|
19
|
+
* Items without a section will appear at the top in their natural order.
|
|
20
|
+
* Sections are ordered by section_position (optional). Sections without position are sorted alphabetically after positioned sections.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} params - Sidebar generation parameters
|
|
23
|
+
* @returns {Promise<Array>} Modified sidebar items with section separators
|
|
24
|
+
*/
|
|
25
|
+
async function dynamicSectionSidebarGenerator({
|
|
26
|
+
defaultSidebarItemsGenerator,
|
|
27
|
+
...args
|
|
28
|
+
}) {
|
|
29
|
+
const sidebarItems = await defaultSidebarItemsGenerator(args);
|
|
30
|
+
|
|
31
|
+
// Group items by section
|
|
32
|
+
const unsectioned = [];
|
|
33
|
+
const sections = new Map(); // Map<sectionName, {items: [], positions: Set}>
|
|
34
|
+
|
|
35
|
+
sidebarItems.forEach((item) => {
|
|
36
|
+
if (item.type === "doc") {
|
|
37
|
+
const doc = args.docs.find((d) => d.id === item.id);
|
|
38
|
+
const section = doc?.frontMatter?.sidebar_custom_props?.section;
|
|
39
|
+
const sectionPosition =
|
|
40
|
+
doc?.frontMatter?.sidebar_custom_props?.section_position;
|
|
41
|
+
|
|
42
|
+
if (section) {
|
|
43
|
+
if (!sections.has(section)) {
|
|
44
|
+
sections.set(section, { items: [], positions: new Set() });
|
|
45
|
+
}
|
|
46
|
+
sections.get(section).items.push(item);
|
|
47
|
+
if (sectionPosition !== undefined) {
|
|
48
|
+
sections.get(section).positions.add(sectionPosition);
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
unsectioned.push(item);
|
|
52
|
+
}
|
|
53
|
+
} else if (item.type === "category") {
|
|
54
|
+
// Handle categories (e.g., from _category_.yml files)
|
|
55
|
+
const section = item.customProps?.section;
|
|
56
|
+
const sectionPosition = item.customProps?.section_position;
|
|
57
|
+
|
|
58
|
+
if (section) {
|
|
59
|
+
if (!sections.has(section)) {
|
|
60
|
+
sections.set(section, { items: [], positions: new Set() });
|
|
61
|
+
}
|
|
62
|
+
sections.get(section).items.push(item);
|
|
63
|
+
if (sectionPosition !== undefined) {
|
|
64
|
+
sections.get(section).positions.add(sectionPosition);
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
unsectioned.push(item);
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
// Links, HTML items, etc. stay at top
|
|
71
|
+
unsectioned.push(item);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Validate section_position values
|
|
76
|
+
sections.forEach((data, sectionName) => {
|
|
77
|
+
if (data.positions.size > 1) {
|
|
78
|
+
const positionValues = Array.from(data.positions).join(", ");
|
|
79
|
+
throw new Error(
|
|
80
|
+
`Section "${sectionName}" has conflicting section_position values: ${positionValues}. ` +
|
|
81
|
+
`All pages in a section must use the same section_position value.`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// Sort sections by position, then alphabetically
|
|
87
|
+
const sortedSections = Array.from(sections.entries()).sort(
|
|
88
|
+
([nameA, dataA], [nameB, dataB]) => {
|
|
89
|
+
const posA =
|
|
90
|
+
dataA.positions.size > 0 ? Array.from(dataA.positions)[0] : Infinity;
|
|
91
|
+
const posB =
|
|
92
|
+
dataB.positions.size > 0 ? Array.from(dataB.positions)[0] : Infinity;
|
|
93
|
+
|
|
94
|
+
if (posA !== posB) {
|
|
95
|
+
return posA - posB;
|
|
96
|
+
}
|
|
97
|
+
// If positions are equal (both Infinity or same number), sort alphabetically
|
|
98
|
+
return nameA.localeCompare(nameB);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
// Build final sidebar with separators
|
|
103
|
+
const result = [...unsectioned];
|
|
104
|
+
|
|
105
|
+
sortedSections.forEach(([sectionName, data]) => {
|
|
106
|
+
result.push({
|
|
107
|
+
type: "html",
|
|
108
|
+
value: `<div style=" margin: 0.5rem; padding: 0.25rem 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.5rem;"><span style=" flex: 1; border-top: 1px solid var(--ifm-color-emphasis-300); " ></span> <span style=" text-transform: uppercase; color: var(--ifm-color-emphasis-600);
|
|
109
|
+
white-space: nowrap;">${sectionName}</span><span style="flex: 1; border-top: 1px solid var(--ifm-color-emphasis-300);"></span></div>`,
|
|
110
|
+
className: `sidebar-section-${sectionName.toLowerCase().replace(/\s+/g, "-")}`,
|
|
111
|
+
});
|
|
112
|
+
result.push(...data.items);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
module.exports = dynamicSectionSidebarGenerator;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "${configDir}/src",
|
|
4
|
+
"outDir": "${configDir}/lib",
|
|
5
|
+
"composite": true,
|
|
6
|
+
"incremental": true,
|
|
7
|
+
"tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo",
|
|
8
|
+
"erasableSyntaxOnly": true,
|
|
9
|
+
/* Emit */
|
|
10
|
+
"target": "ES2020",
|
|
11
|
+
"lib": ["ESNext"],
|
|
12
|
+
"declaration": true,
|
|
13
|
+
// These two options will be selectively overridden in each project.
|
|
14
|
+
// Utility libraries will have source maps on, but plugins will not.
|
|
15
|
+
"declarationMap": false,
|
|
16
|
+
"sourceMap": false,
|
|
17
|
+
"jsx": "react-native",
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"noEmitHelpers": true,
|
|
20
|
+
// Will be overridden in client projects
|
|
21
|
+
"module": "NodeNext",
|
|
22
|
+
// Avoid accidentally using this config to build
|
|
23
|
+
"noEmit": true,
|
|
24
|
+
|
|
25
|
+
/* Strict Type-Checking Options */
|
|
26
|
+
"allowUnreachableCode": false,
|
|
27
|
+
// Too hard to turn on
|
|
28
|
+
"exactOptionalPropertyTypes": false,
|
|
29
|
+
"noFallthroughCasesInSwitch": true,
|
|
30
|
+
"noImplicitOverride": true,
|
|
31
|
+
"noImplicitReturns": true,
|
|
32
|
+
// `process.env` is usually accessed as property
|
|
33
|
+
"noPropertyAccessFromIndexSignature": false,
|
|
34
|
+
"noUncheckedIndexedAccess": true,
|
|
35
|
+
/* strict family */
|
|
36
|
+
"strict": true,
|
|
37
|
+
"alwaysStrict": true,
|
|
38
|
+
"noImplicitAny": true,
|
|
39
|
+
"noImplicitThis": true,
|
|
40
|
+
"strictBindCallApply": true,
|
|
41
|
+
"strictFunctionTypes": true,
|
|
42
|
+
"strictNullChecks": true,
|
|
43
|
+
"strictPropertyInitialization": true,
|
|
44
|
+
"useUnknownInCatchVariables": true,
|
|
45
|
+
/* Handled by ESLint */
|
|
46
|
+
"noUnusedLocals": false,
|
|
47
|
+
"noUnusedParameters": false,
|
|
48
|
+
"importsNotUsedAsValues": "remove",
|
|
49
|
+
|
|
50
|
+
/* Module Resolution */
|
|
51
|
+
"moduleResolution": "NodeNext",
|
|
52
|
+
"resolveJsonModule": true,
|
|
53
|
+
"allowSyntheticDefaultImports": true,
|
|
54
|
+
"esModuleInterop": true,
|
|
55
|
+
"forceConsistentCasingInFileNames": true,
|
|
56
|
+
"isolatedModules": true,
|
|
57
|
+
"allowJs": true,
|
|
58
|
+
"skipLibCheck": true // @types/webpack and webpack/types.d.ts are not the same thing
|
|
59
|
+
},
|
|
60
|
+
"include": ["./**/*", "./**/.eslintrc.js"],
|
|
61
|
+
"exclude": [
|
|
62
|
+
"node_modules",
|
|
63
|
+
"coverage/**",
|
|
64
|
+
"**/lib/**/*",
|
|
65
|
+
"website/**",
|
|
66
|
+
"**/__mocks__/**/*",
|
|
67
|
+
"**/__fixtures__/**/*",
|
|
68
|
+
"examples/**",
|
|
69
|
+
"packages/create-docusaurus/templates/**"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import Tabs from "@theme/Tabs";
|
|
2
|
-
import TabItem from "@theme/TabItem";
|
|
3
|
-
import {
|
|
4
|
-
Columns,
|
|
5
|
-
Left,
|
|
6
|
-
Right,
|
|
7
|
-
Block,
|
|
8
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
9
|
-
|
|
10
|
-
# Columns Section
|
|
11
|
-
|
|
12
|
-
Create responsive two-column layouts with customizable ratios.
|
|
13
|
-
|
|
14
|
-
<div className="preview">
|
|
15
|
-
<div className="container" style={{ width: '-webkit-fill-available'}}>
|
|
16
|
-
<Columns leftRatio="60">
|
|
17
|
-
<Left>
|
|
18
|
-
### Main Content
|
|
19
|
-
|
|
20
|
-
This is a live example of the Columns component. The left column takes up 60% of the width, while the right column takes up 40%.
|
|
21
|
-
|
|
22
|
-
The columns will automatically stack on smaller screens for better mobile experience.
|
|
23
|
-
</Left>
|
|
24
|
-
<Right>
|
|
25
|
-
<Block>
|
|
26
|
-
### Quick Stats
|
|
27
|
-
|
|
28
|
-
- **Responsive**: Stacks on mobile
|
|
29
|
-
- **Flexible**: Custom ratios
|
|
30
|
-
- **Equal height**: Automatic
|
|
31
|
-
</Block>
|
|
32
|
-
</Right>
|
|
33
|
-
</Columns>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
## Features
|
|
38
|
-
|
|
39
|
-
- Flexible column ratios
|
|
40
|
-
- Equal height option
|
|
41
|
-
- Automatic text wrapping
|
|
42
|
-
|
|
43
|
-
## Import
|
|
44
|
-
|
|
45
|
-
<Tabs>
|
|
46
|
-
<TabItem value="individual" label="Individual import" default>
|
|
47
|
-
```mdx
|
|
48
|
-
import {
|
|
49
|
-
Columns,
|
|
50
|
-
Left,
|
|
51
|
-
Right,
|
|
52
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
53
|
-
```
|
|
54
|
-
</TabItem>
|
|
55
|
-
<TabItem value="default" label="Default import">
|
|
56
|
-
```mdx
|
|
57
|
-
import Columns, { Left, Right } from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/Columns";
|
|
58
|
-
```
|
|
59
|
-
</TabItem>
|
|
60
|
-
</Tabs>
|
|
61
|
-
|
|
62
|
-
## Basic Usage
|
|
63
|
-
|
|
64
|
-
```mdx
|
|
65
|
-
<Columns>
|
|
66
|
-
<Left>
|
|
67
|
-
Left column content
|
|
68
|
-
</Left>
|
|
69
|
-
<Right>
|
|
70
|
-
Right column content
|
|
71
|
-
</Right>
|
|
72
|
-
</Columns>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Props
|
|
76
|
-
|
|
77
|
-
### Columns
|
|
78
|
-
|
|
79
|
-
| Prop | Type | Default | Description |
|
|
80
|
-
| ------------- | ----------- | --------- | ---------------------------------------- |
|
|
81
|
-
| `leftRatio` | `string` | `'50'` | Width percentage for left column |
|
|
82
|
-
| `equalHeight` | `boolean` | `true` | Whether columns should have equal height |
|
|
83
|
-
| `minWidth` | `string` | `'700px'` | Minimum width before stacking |
|
|
84
|
-
| `noStretch` | `boolean` | `false` | Prevent columns from stretching |
|
|
85
|
-
| `children` | `ReactNode` | required | Left and Right components |
|
|
86
|
-
|
|
87
|
-
### Left / Right
|
|
88
|
-
|
|
89
|
-
| Prop | Type | Description |
|
|
90
|
-
| ---------- | ----------- | ----------------------------- |
|
|
91
|
-
| `children` | `ReactNode` | Column content (supports MDX) |
|
|
92
|
-
|
|
93
|
-
## Examples
|
|
94
|
-
|
|
95
|
-
### 50/50 Split
|
|
96
|
-
|
|
97
|
-
```mdx
|
|
98
|
-
<Columns>
|
|
99
|
-
<Left>
|
|
100
|
-
## Left Side
|
|
101
|
-
|
|
102
|
-
Content for the left column
|
|
103
|
-
</Left>
|
|
104
|
-
<Right>
|
|
105
|
-
## Right Side
|
|
106
|
-
|
|
107
|
-
Content for the right column
|
|
108
|
-
</Right>
|
|
109
|
-
</Columns>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 60/40 Split
|
|
113
|
-
|
|
114
|
-
```mdx
|
|
115
|
-
<Columns leftRatio="60">
|
|
116
|
-
<Left>
|
|
117
|
-
## Main Content (60%)
|
|
118
|
-
|
|
119
|
-
This column takes up 60% of the width
|
|
120
|
-
</Left>
|
|
121
|
-
<Right>
|
|
122
|
-
## Sidebar (40%)
|
|
123
|
-
|
|
124
|
-
This column takes up 40% of the width
|
|
125
|
-
</Right>
|
|
126
|
-
</Columns>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 70/30 Split
|
|
130
|
-
|
|
131
|
-
```mdx
|
|
132
|
-
<Columns leftRatio="70">
|
|
133
|
-
<Left>
|
|
134
|
-
## Primary Content
|
|
135
|
-
|
|
136
|
-
Larger column for main content
|
|
137
|
-
</Left>
|
|
138
|
-
<Right>
|
|
139
|
-
### Quick Stats
|
|
140
|
-
|
|
141
|
-
- Duration: 4 weeks
|
|
142
|
-
- Effort: 10 hrs/week
|
|
143
|
-
</Right>
|
|
144
|
-
</Columns>
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### With Block Component
|
|
148
|
-
|
|
149
|
-
```mdx
|
|
150
|
-
import {
|
|
151
|
-
Columns,
|
|
152
|
-
Left,
|
|
153
|
-
Right,
|
|
154
|
-
Block,
|
|
155
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
156
|
-
|
|
157
|
-
<Columns leftRatio="65">
|
|
158
|
-
<Left>
|
|
159
|
-
## Course Overview
|
|
160
|
-
|
|
161
|
-
Detailed description of the course...
|
|
162
|
-
</Left>
|
|
163
|
-
<Right>
|
|
164
|
-
<Block>
|
|
165
|
-
### Info
|
|
166
|
-
|
|
167
|
-
- **Level**: Intermediate
|
|
168
|
-
- **Duration**: 6 weeks
|
|
169
|
-
- **Certificate**: Yes
|
|
170
|
-
</Block>
|
|
171
|
-
</Right>
|
|
172
|
-
</Columns>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Responsive Behavior
|
|
176
|
-
|
|
177
|
-
The columns automatically stack vertically when the container is too narrow:
|
|
178
|
-
|
|
179
|
-
- **> 900px**: Full two-column layout
|
|
180
|
-
- **750px - 900px**: Reduced gap between columns
|
|
181
|
-
- **600px - 750px**: Further adjusted spacing
|
|
182
|
-
- **< 600px**: Stacks vertically
|
|
183
|
-
|
|
184
|
-
## Content Wrapping
|
|
185
|
-
|
|
186
|
-
Text and content automatically wrap within columns:
|
|
187
|
-
|
|
188
|
-
- Long words break appropriately
|
|
189
|
-
- Tables become scrollable
|
|
190
|
-
- Images scale to fit
|
|
191
|
-
- Code blocks wrap or scroll
|
package/templates/addon-resources/resources/frontpage-collection/components/ContentBlock.mdx
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import Tabs from "@theme/Tabs";
|
|
2
|
-
import TabItem from "@theme/TabItem";
|
|
3
|
-
import { Block } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
4
|
-
|
|
5
|
-
# Content Block
|
|
6
|
-
|
|
7
|
-
A simple styled block container for highlighting content.
|
|
8
|
-
|
|
9
|
-
<div className="preview">
|
|
10
|
-
<div className="container">
|
|
11
|
-
<Block>
|
|
12
|
-
### Example Block
|
|
13
|
-
|
|
14
|
-
This is a live example of the Block component with hover effect.
|
|
15
|
-
|
|
16
|
-
- **Feature 1**: Styled container
|
|
17
|
-
- **Feature 2**: Hover animation
|
|
18
|
-
- **Feature 3**: Perfect for side content
|
|
19
|
-
</Block>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
- Hover effect
|
|
26
|
-
- Works great in columns or standalone
|
|
27
|
-
|
|
28
|
-
## Import
|
|
29
|
-
|
|
30
|
-
<Tabs>
|
|
31
|
-
<TabItem value="individual" label="Individual import" default>
|
|
32
|
-
```mdx
|
|
33
|
-
import { Block } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
34
|
-
```
|
|
35
|
-
</TabItem>
|
|
36
|
-
<TabItem value="default" label="Default import">
|
|
37
|
-
```mdx
|
|
38
|
-
import Block from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/Block";
|
|
39
|
-
```
|
|
40
|
-
</TabItem>
|
|
41
|
-
</Tabs>
|
|
42
|
-
|
|
43
|
-
## Basic Usage
|
|
44
|
-
|
|
45
|
-
```mdx
|
|
46
|
-
<Block>
|
|
47
|
-
## Quick Info
|
|
48
|
-
|
|
49
|
-
- **Duration**: 4 weeks
|
|
50
|
-
- **Effort**: 10 hours/week
|
|
51
|
-
- **Level**: Intermediate
|
|
52
|
-
</Block>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Props
|
|
56
|
-
|
|
57
|
-
| Prop | Type | Description |
|
|
58
|
-
| ----------- | ----------- | ---------------------- |
|
|
59
|
-
| `className` | `string` | Additional CSS classes |
|
|
60
|
-
| `children` | `ReactNode` | Markdown content |
|
|
61
|
-
|
|
62
|
-
## Examples
|
|
63
|
-
|
|
64
|
-
### Simple Block
|
|
65
|
-
|
|
66
|
-
```mdx
|
|
67
|
-
<Block>
|
|
68
|
-
### Important Note
|
|
69
|
-
|
|
70
|
-
Remember to complete all iconContainers before starting.
|
|
71
|
-
</Block>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### With Custom Class
|
|
75
|
-
|
|
76
|
-
```mdx
|
|
77
|
-
<Block className="my-custom-class">Custom styled content</Block>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### In Columns
|
|
81
|
-
|
|
82
|
-
```mdx
|
|
83
|
-
import {
|
|
84
|
-
Columns,
|
|
85
|
-
Left,
|
|
86
|
-
Right,
|
|
87
|
-
Block,
|
|
88
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
89
|
-
|
|
90
|
-
<Columns leftRatio="65">
|
|
91
|
-
<Left>
|
|
92
|
-
Main content goes here...
|
|
93
|
-
</Left>
|
|
94
|
-
<Right>
|
|
95
|
-
<Block>
|
|
96
|
-
### Course Stats
|
|
97
|
-
|
|
98
|
-
- 1,000+ students
|
|
99
|
-
- 4.8/5 rating
|
|
100
|
-
- Updated monthly
|
|
101
|
-
</Block>
|
|
102
|
-
</Right>
|
|
103
|
-
</Columns>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Multiple Blocks
|
|
107
|
-
|
|
108
|
-
```mdx
|
|
109
|
-
<Block>
|
|
110
|
-
### Module 1
|
|
111
|
-
|
|
112
|
-
Introduction to Docker
|
|
113
|
-
</Block>
|
|
114
|
-
|
|
115
|
-
<Block>
|
|
116
|
-
### Module 2
|
|
117
|
-
|
|
118
|
-
Container Management
|
|
119
|
-
</Block>
|
|
120
|
-
|
|
121
|
-
<Block>
|
|
122
|
-
### Module 3
|
|
123
|
-
|
|
124
|
-
Image Building
|
|
125
|
-
</Block>
|
|
126
|
-
```
|
package/templates/addon-resources/resources/frontpage-collection/components/CourseFeature.mdx
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import Tabs from "@theme/Tabs";
|
|
2
|
-
import TabItem from "@theme/TabItem";
|
|
3
|
-
import {
|
|
4
|
-
CourseFeature,
|
|
5
|
-
Included,
|
|
6
|
-
NotIncluded,
|
|
7
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
8
|
-
|
|
9
|
-
# Course Feature Section
|
|
10
|
-
|
|
11
|
-
A card-based component for displaying what's included and not included in your course.
|
|
12
|
-
|
|
13
|
-
<div className="preview">
|
|
14
|
-
<div className="container" style={{ width: '-webkit-fill-available'}}>
|
|
15
|
-
<CourseFeature>
|
|
16
|
-
<Included>
|
|
17
|
-
- **Core Concepts**: Learn the fundamentals
|
|
18
|
-
- **Hands-on Labs**: Practice with real examples
|
|
19
|
-
- **Certificate**: Earn a completion certificate
|
|
20
|
-
</Included>
|
|
21
|
-
<NotIncluded>
|
|
22
|
-
- **Advanced Topics**: Covered in advanced course
|
|
23
|
-
- **1-on-1 Mentoring**: Available as add-on
|
|
24
|
-
</NotIncluded>
|
|
25
|
-
</CourseFeature>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
## Features
|
|
30
|
-
|
|
31
|
-
- Side-by-side included/not included cards
|
|
32
|
-
- Built-in success/danger colored icons
|
|
33
|
-
- Hover animations on cards and icons
|
|
34
|
-
- Support for custom icons
|
|
35
|
-
- Responsive layout
|
|
36
|
-
- Equal height cards
|
|
37
|
-
|
|
38
|
-
## Import
|
|
39
|
-
|
|
40
|
-
<Tabs>
|
|
41
|
-
<TabItem value="individual" label="Individual import" default>
|
|
42
|
-
```mdx
|
|
43
|
-
import {
|
|
44
|
-
CourseFeature,
|
|
45
|
-
Included,
|
|
46
|
-
NotIncluded,
|
|
47
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
48
|
-
```
|
|
49
|
-
</TabItem>
|
|
50
|
-
<TabItem value="default" label="Default import">
|
|
51
|
-
```mdx
|
|
52
|
-
import CourseFeature, { Included, NotIncluded } from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/CourseFeature";
|
|
53
|
-
```
|
|
54
|
-
</TabItem>
|
|
55
|
-
</Tabs>
|
|
56
|
-
|
|
57
|
-
## Basic Usage
|
|
58
|
-
|
|
59
|
-
```mdx
|
|
60
|
-
<CourseFeature>
|
|
61
|
-
<Included>
|
|
62
|
-
- **Docker Fundamentals**: Core concepts and architecture
|
|
63
|
-
- **Container Management**: Creating and managing containers
|
|
64
|
-
- **Image Building**: Building custom images
|
|
65
|
-
</Included>
|
|
66
|
-
<NotIncluded>
|
|
67
|
-
- **Kubernetes**: Covered in advanced course
|
|
68
|
-
- **CI/CD Pipelines**: Separate course available
|
|
69
|
-
</NotIncluded>
|
|
70
|
-
</CourseFeature>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Props
|
|
74
|
-
|
|
75
|
-
### CourseFeature
|
|
76
|
-
|
|
77
|
-
| Prop | Type | Default | Description |
|
|
78
|
-
| -------------------------- | ---------------------- | ---------- | ------------------------------------------------- |
|
|
79
|
-
| `children` | `ReactNode` | required | Included/NotIncluded components or direct content |
|
|
80
|
-
| `iconifyIncluded` | `IconifyConfig\|string`| Check icon | Iconify icon for included section |
|
|
81
|
-
| `customSvgIncluded` | `CustomSvgConfig` | - | Custom SVG file for included section (supports color override) |
|
|
82
|
-
| `customImageIncluded` | `CustomImageConfig` | - | Custom image file (PNG/JPEG) for included section |
|
|
83
|
-
| `iconifyNotIncluded` | `IconifyConfig\|string`| Cross icon | Iconify icon for not included section |
|
|
84
|
-
| `customSvgNotIncluded` | `CustomSvgConfig` | - | Custom SVG file for not included section (supports color override) |
|
|
85
|
-
| `customImageNotIncluded` | `CustomImageConfig` | - | Custom image file (PNG/JPEG) for not included section |
|
|
86
|
-
| `included` | `boolean` | `true` | Legacy prop for single card mode |
|
|
87
|
-
|
|
88
|
-
### Included / NotIncluded
|
|
89
|
-
|
|
90
|
-
| Prop | Type | Description |
|
|
91
|
-
| ---------- | ----------- | ---------------- |
|
|
92
|
-
| `children` | `ReactNode` | Markdown content |
|
|
93
|
-
|
|
94
|
-
## Examples
|
|
95
|
-
|
|
96
|
-
### Standard Usage
|
|
97
|
-
|
|
98
|
-
```mdx
|
|
99
|
-
<CourseFeature>
|
|
100
|
-
<Included>
|
|
101
|
-
- **Core Concepts**: Fundamentals
|
|
102
|
-
- **Hands-on Labs**: Practical exercises
|
|
103
|
-
- **Real Examples**: Production code
|
|
104
|
-
</Included>
|
|
105
|
-
<NotIncluded>
|
|
106
|
-
- **Advanced Topics**: In advanced course
|
|
107
|
-
- **Certification**: Available separately
|
|
108
|
-
</NotIncluded>
|
|
109
|
-
</CourseFeature>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### With Custom Icons
|
|
113
|
-
|
|
114
|
-
```mdx
|
|
115
|
-
<CourseFeature
|
|
116
|
-
iconifyIncluded="mdi:check-circle"
|
|
117
|
-
iconifyNotIncluded="mdi:close-circle"
|
|
118
|
-
>
|
|
119
|
-
<Included>
|
|
120
|
-
Content...
|
|
121
|
-
</Included>
|
|
122
|
-
<NotIncluded>
|
|
123
|
-
Not included...
|
|
124
|
-
</NotIncluded>
|
|
125
|
-
</CourseFeature>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Only Included
|
|
129
|
-
|
|
130
|
-
```mdx
|
|
131
|
-
<CourseFeature>
|
|
132
|
-
<Included>
|
|
133
|
-
- Everything you need
|
|
134
|
-
- Lifetime access
|
|
135
|
-
- Free updates
|
|
136
|
-
</Included>
|
|
137
|
-
</CourseFeature>
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Default Icons
|
|
141
|
-
|
|
142
|
-
The component uses inline SVG icons with CSS variable colors:
|
|
143
|
-
|
|
144
|
-
- **Included**: Green check circle (`var(--ifm-color-success)`)
|
|
145
|
-
- **Not Included**: Red cross circle (`var(--ifm-color-danger)`)
|
|
146
|
-
|
|
147
|
-
These automatically adapt to your Docusaurus theme colors.
|