@sp-days-framework/create-sp-days 1.0.2 → 1.0.4
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/package.json +1 -1
- package/sp-days-framework-create-sp-days-1.0.3.tgz +0 -0
- package/templates/addon-resources/resources/interactive-tasks/creating-tasks.mdx +136 -174
- package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx +124 -1
- package/templates/addon-resources/resources/interactive-tasks/setup/index.mdx +1 -55
- package/templates/addon-slidev/package.json +4 -4
- package/templates/page-course/docusaurus.config.ts +16 -4
- package/templates/page-course/package.json +2 -2
- 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
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import Tabs from "@theme/Tabs";
|
|
2
|
-
import TabItem from "@theme/TabItem";
|
|
3
|
-
import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
4
|
-
|
|
5
|
-
# Iconify
|
|
6
|
-
|
|
7
|
-
A simple component for adding Iconify icons to your MDX pages and documentation with theme-aware colors and flexible sizing.
|
|
8
|
-
|
|
9
|
-
<div className="preview">
|
|
10
|
-
<div className="container">
|
|
11
|
-
<Iconify icon="mdi:tools" />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
## Features
|
|
16
|
-
|
|
17
|
-
- **Theme-Aware Colors** - Automatic light/dark mode support
|
|
18
|
-
- **Flexible Sizing** - Control width, or let it default to 200px
|
|
19
|
-
- **Alignment Control** - Left, center, or right alignment on the page
|
|
20
|
-
- **Aspect Ratio** - Always maintains proper icon proportions
|
|
21
|
-
|
|
22
|
-
## Import
|
|
23
|
-
|
|
24
|
-
<Tabs>
|
|
25
|
-
<TabItem value="individual" label="Individual import" default>
|
|
26
|
-
```mdx
|
|
27
|
-
import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
28
|
-
```
|
|
29
|
-
</TabItem>
|
|
30
|
-
<TabItem value="default" label="Default import">
|
|
31
|
-
```mdx
|
|
32
|
-
import Iconify from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/Iconify";
|
|
33
|
-
```
|
|
34
|
-
</TabItem>
|
|
35
|
-
</Tabs>
|
|
36
|
-
|
|
37
|
-
## Basic Usage
|
|
38
|
-
|
|
39
|
-
```mdx
|
|
40
|
-
<Iconify icon="mdi:tools" />
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Props
|
|
44
|
-
|
|
45
|
-
| Prop | Type | Default | Description |
|
|
46
|
-
| ------------ | ----------------------------- | ---------- | ---------------------------------------------- |
|
|
47
|
-
| `icon` | `string` | required | Iconify icon name (e.g., "mdi:tools") |
|
|
48
|
-
| `width` | `string` | `"200px"` | Icon width (e.g., "300px", "10rem") |
|
|
49
|
-
| `alignment` | `'left' \| 'center' \| 'right'` | `'center'` | Alignment of icon on the page |
|
|
50
|
-
| `iconColors` | `IconifyImageColorConfig` | primary | Color configuration for light/dark themes |
|
|
51
|
-
| `className` | `string` | - | Additional CSS class |
|
|
52
|
-
| `style` | `CSSProperties` | - | Additional inline styles |
|
|
53
|
-
|
|
54
|
-
### IconifyImageColorConfig
|
|
55
|
-
|
|
56
|
-
| Property | Type | Description |
|
|
57
|
-
| -------- | -------- | ----------------------------------------------------- |
|
|
58
|
-
| `light` | `string` | Icon color in light mode (default: --ifm-color-primary) |
|
|
59
|
-
| `dark` | `string` | Icon color in dark mode (default: --ifm-color-primary) |
|
|
60
|
-
|
|
61
|
-
:::tip
|
|
62
|
-
If only `light` is specified, `dark` will default to `--ifm-color-primary`. If only `dark` is specified, `light` will default to `--ifm-color-primary`.
|
|
63
|
-
:::
|
|
64
|
-
|
|
65
|
-
## Examples
|
|
66
|
-
|
|
67
|
-
### Default Settings
|
|
68
|
-
|
|
69
|
-
Default size (200px x 200px) and center alignment:
|
|
70
|
-
|
|
71
|
-
```mdx
|
|
72
|
-
<Iconify icon="mdi:docker" />
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
<Iconify icon="mdi:docker" />
|
|
76
|
-
|
|
77
|
-
### Custom Size
|
|
78
|
-
|
|
79
|
-
Control the size with `width`. The icon maintains aspect ratio:
|
|
80
|
-
|
|
81
|
-
```mdx
|
|
82
|
-
<Iconify icon="mdi:kubernetes" width="300px" />
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
<Iconify icon="mdi:kubernetes" width="300px" />
|
|
86
|
-
|
|
87
|
-
### Custom Alignment
|
|
88
|
-
|
|
89
|
-
Control where the icon appears on the page:
|
|
90
|
-
|
|
91
|
-
```mdx
|
|
92
|
-
<Iconify icon="mdi:git" alignment="left" width="150px" />
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
<Iconify icon="mdi:git" alignment="left" width="150px" />
|
|
96
|
-
|
|
97
|
-
```mdx
|
|
98
|
-
<Iconify icon="mdi:github" alignment="right" width="150px" />
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
<Iconify icon="mdi:github" alignment="right" width="150px" />
|
|
102
|
-
|
|
103
|
-
### Custom Colors
|
|
104
|
-
|
|
105
|
-
Specify different colors for light and dark themes:
|
|
106
|
-
|
|
107
|
-
```mdx
|
|
108
|
-
<Iconify
|
|
109
|
-
icon="mdi:docker"
|
|
110
|
-
iconColors={{
|
|
111
|
-
light: "#2496ED",
|
|
112
|
-
dark: "#2496ED"
|
|
113
|
-
}}
|
|
114
|
-
width="250px"
|
|
115
|
-
/>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
<Iconify
|
|
119
|
-
icon="mdi:docker"
|
|
120
|
-
iconColors={{
|
|
121
|
-
light: "#2496ED",
|
|
122
|
-
dark: "#2496ED"
|
|
123
|
-
}}
|
|
124
|
-
width="250px"
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
```mdx
|
|
128
|
-
<Iconify
|
|
129
|
-
icon="mdi:kubernetes"
|
|
130
|
-
iconColors={{
|
|
131
|
-
light: "#326CE5",
|
|
132
|
-
dark: "#76A9FA"
|
|
133
|
-
}}
|
|
134
|
-
width="250px"
|
|
135
|
-
/>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
<Iconify
|
|
139
|
-
icon="mdi:kubernetes"
|
|
140
|
-
iconColors={{
|
|
141
|
-
light: "#326CE5",
|
|
142
|
-
dark: "#76A9FA"
|
|
143
|
-
}}
|
|
144
|
-
width="250px"
|
|
145
|
-
/>
|
|
146
|
-
|
|
147
|
-
### Only Specify One Color
|
|
148
|
-
|
|
149
|
-
If you only specify `light`, the dark mode defaults to primary color:
|
|
150
|
-
|
|
151
|
-
```mdx
|
|
152
|
-
<Iconify
|
|
153
|
-
icon="mdi:react"
|
|
154
|
-
iconColors={{
|
|
155
|
-
light: "#61DAFB"
|
|
156
|
-
}}
|
|
157
|
-
width="200px"
|
|
158
|
-
/>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
<Iconify
|
|
162
|
-
icon="mdi:react"
|
|
163
|
-
iconColors={{
|
|
164
|
-
light: "#61DAFB"
|
|
165
|
-
}}
|
|
166
|
-
width="200px"
|
|
167
|
-
/>
|
|
168
|
-
|
|
169
|
-
## Finding Icons
|
|
170
|
-
|
|
171
|
-
Browse the full Iconify icon collection at [Iconify Icon Sets](https://icon-sets.iconify.design/).
|
|
172
|
-
|
|
173
|
-
Popular icon sets include:
|
|
174
|
-
- **Material Design Icons** - `mdi:icon-name`
|
|
175
|
-
- **Font Awesome** - `fa:icon-name` or `fa-brands:icon-name`
|
|
176
|
-
- **Simple Icons** - `simple-icons:brand-name`
|
|
177
|
-
- **Heroicons** - `heroicons:icon-name`
|
|
178
|
-
- **Lucide** - `lucide:icon-name`
|
|
179
|
-
|
|
180
|
-
## Use Cases
|
|
181
|
-
|
|
182
|
-
### In Documentation
|
|
183
|
-
|
|
184
|
-
Add visual elements to your documentation:
|
|
185
|
-
|
|
186
|
-
```mdx
|
|
187
|
-
## Prerequisites
|
|
188
|
-
|
|
189
|
-
Before starting, you'll need:
|
|
190
|
-
|
|
191
|
-
<Iconify icon="mdi:docker" width="100px" />
|
|
192
|
-
|
|
193
|
-
Docker installed on your system.
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### In Landing Pages
|
|
197
|
-
|
|
198
|
-
Create visual interest on landing pages:
|
|
199
|
-
|
|
200
|
-
```mdx
|
|
201
|
-
---
|
|
202
|
-
title: Course Overview
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
# Welcome to Our Course
|
|
206
|
-
|
|
207
|
-
<Iconify icon="mdi:school" width="300px" />
|
|
208
|
-
|
|
209
|
-
Learn the fundamentals with hands-on examples.
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Multiple Icons in a Row
|
|
213
|
-
|
|
214
|
-
Place multiple icons side-by-side using markdown or HTML:
|
|
215
|
-
|
|
216
|
-
```mdx
|
|
217
|
-
<div style={{ display: 'flex', justifyContent: 'center', gap: '2rem' }}>
|
|
218
|
-
<Iconify icon="mdi:docker" width="150px" alignment="center" />
|
|
219
|
-
<Iconify icon="mdi:kubernetes" width="150px" alignment="center" />
|
|
220
|
-
<Iconify icon="mdi:git" width="150px" alignment="center" />
|
|
221
|
-
</div>
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
<div style={{ display: 'flex', justifyContent: 'center', gap: '2rem' }}>
|
|
225
|
-
<Iconify icon="mdi:docker" width="150px" alignment="center" />
|
|
226
|
-
<Iconify icon="mdi:kubernetes" width="150px" alignment="center" />
|
|
227
|
-
<Iconify icon="mdi:git" width="150px" alignment="center" />
|
|
228
|
-
</div>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Frontpage Collection
|
|
3
|
-
sidebar_class_name: sidebar-logo-docusaurus
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
7
|
-
|
|
8
|
-
<div align="center">
|
|
9
|
-
<div className="resourceLandingPage">
|
|
10
|
-
<Iconify icon="logos:docusaurus" width="105px"/>
|
|
11
|
-
</div>
|
|
12
|
-
<div align="center">
|
|
13
|
-
# Frontpage Collection
|
|
14
|
-
</div>
|
|
15
|
-
<div align="center">
|
|
16
|
-
<p>
|
|
17
|
-
*Collection of React components for Docusaurus.
|
|
18
|
-
<br/> Designed for creating landing pages using the `.mdx` file format.*
|
|
19
|
-
</p>
|
|
20
|
-
<h4>
|
|
21
|
-
[Setup](./setup/index.mdx)
|
|
22
|
-
·
|
|
23
|
-
[NPM Package](https://www.npmjs.com/package/@sp-days-framework/docusaurus-frontpage-collection)
|
|
24
|
-
·
|
|
25
|
-
[Source Code](https://github.com/helse-sorost/sp-days-framework)
|
|
26
|
-
</h4>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Features
|
|
33
|
-
|
|
34
|
-
- **Pre-built Components** - Professional React components ready to use
|
|
35
|
-
- **Icon System** - Support for Iconify icons and custom images
|
|
36
|
-
- **Theme-Aware** - Automatic light/dark mode support with customizable colors
|
|
37
|
-
- **Responsive Design** - Mobile-friendly layouts that adapt to all screen sizes
|
|
38
|
-
- **MDX Integration** - Works seamlessly with Docusaurus MDX pages
|
|
39
|
-
|
|
40
|
-
## Getting Started
|
|
41
|
-
|
|
42
|
-
Import and use components in your MDX pages:
|
|
43
|
-
|
|
44
|
-
```mdx title="src/pages/index.mdx"
|
|
45
|
-
---
|
|
46
|
-
title: Course Homepage
|
|
47
|
-
hide_table_of_contents: true
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
import {
|
|
51
|
-
HeroBanner,
|
|
52
|
-
CourseFeature,
|
|
53
|
-
Included,
|
|
54
|
-
NotIncluded
|
|
55
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
56
|
-
|
|
57
|
-
<HeroBanner
|
|
58
|
-
bannerText="Learn Docker with our hands-on course"
|
|
59
|
-
iconify="mdi:docker"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<CourseFeature>
|
|
63
|
-
<Included>
|
|
64
|
-
- Hands-on exercises
|
|
65
|
-
- Real-world examples
|
|
66
|
-
</Included>
|
|
67
|
-
<NotIncluded>
|
|
68
|
-
- Prerequisites knowledge
|
|
69
|
-
- Development environment
|
|
70
|
-
</NotIncluded>
|
|
71
|
-
</CourseFeature>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
See [Setup](./setup/index.mdx) for installation and configuration.
|
|
75
|
-
|
|
76
|
-
## Available Components
|
|
77
|
-
|
|
78
|
-
- **[Block](./components/ContentBlock.mdx)** - Simple styled content block
|
|
79
|
-
- **[Columns](./components/Columns.mdx)** - Two-column responsive layout
|
|
80
|
-
- **[CourseFeature](./components/CourseFeature.mdx)** - Display course features with included/not included sections
|
|
81
|
-
- **[FancyHeader](./components/FancyHeader.mdx)** - Header with decorative underline
|
|
82
|
-
- **[GetStarted](./components/GetStarted.mdx)** - Call-to-action section with explore items
|
|
83
|
-
- **[HeroBanner](./components/HeroBanner.mdx)** - Full-width banner with title and icon
|
|
84
|
-
- **[IconContainersSection](./components/IconContainer.mdx)** - Display icon containers in a grid
|
|
85
|
-
- **[Iconify](./components/Iconify.mdx)** - Add Iconify icons to pages with theme-aware colors
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
import Tabs from "@theme/Tabs";
|
|
6
|
-
import TabItem from "@theme/TabItem";
|
|
7
|
-
|
|
8
|
-
# Setup
|
|
9
|
-
|
|
10
|
-
:::tip[Already Included]
|
|
11
|
-
If you're using `@sp-days-framework/create-sp-days`, the Frontpage Collection is already installed and configured. You can start using components right away!
|
|
12
|
-
:::
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
Install the package using your preferred package manager:
|
|
17
|
-
|
|
18
|
-
<Tabs>
|
|
19
|
-
<TabItem value="npm" label="npm" default>
|
|
20
|
-
```bash
|
|
21
|
-
npm install @sp-days-framework/docusaurus-frontpage-collection
|
|
22
|
-
```
|
|
23
|
-
</TabItem>
|
|
24
|
-
<TabItem value="yarn" label="Yarn">
|
|
25
|
-
```bash
|
|
26
|
-
yarn add @sp-days-framework/docusaurus-frontpage-collection
|
|
27
|
-
```
|
|
28
|
-
</TabItem>
|
|
29
|
-
</Tabs>
|
|
30
|
-
|
|
31
|
-
Unlike plugins, the Frontpage Collection works immediately after installation. No changes to `docusaurus.config.js` are needed.
|
|
32
|
-
|
|
33
|
-
## Configuration
|
|
34
|
-
|
|
35
|
-
### Import Methods
|
|
36
|
-
|
|
37
|
-
You can import components in several ways depending on your needs.
|
|
38
|
-
|
|
39
|
-
<Tabs>
|
|
40
|
-
<TabItem value="individual" label="Individual Imports (Recommended)" default>
|
|
41
|
-
Import only the components you need for optimal bundle size:
|
|
42
|
-
|
|
43
|
-
```mdx title="src/pages/index.mdx"
|
|
44
|
-
import {
|
|
45
|
-
HeroBanner,
|
|
46
|
-
IconContainersSection,
|
|
47
|
-
IconContainerBlock,
|
|
48
|
-
} from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
49
|
-
|
|
50
|
-
<HeroBanner
|
|
51
|
-
bannerText="Welcome to Our Course"
|
|
52
|
-
iconify="mdi:school"
|
|
53
|
-
/>
|
|
54
|
-
|
|
55
|
-
<IconContainersSection>
|
|
56
|
-
<IconContainerBlock
|
|
57
|
-
title="Getting Started"
|
|
58
|
-
iconify="mdi:rocket-launch"
|
|
59
|
-
link="/docs/intro"
|
|
60
|
-
/>
|
|
61
|
-
</IconContainersSection>
|
|
62
|
-
```
|
|
63
|
-
</TabItem>
|
|
64
|
-
<TabItem value="default" label="Default Imports">
|
|
65
|
-
Import specific components directly from their source:
|
|
66
|
-
|
|
67
|
-
```mdx title="src/pages/index.mdx"
|
|
68
|
-
import HeroBanner from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/HeroBanner";
|
|
69
|
-
import IconContainersSection, { IconContainerBlock } from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/IconContainer";
|
|
70
|
-
|
|
71
|
-
<HeroBanner bannerText="Welcome" iconify="mdi:school" />
|
|
72
|
-
|
|
73
|
-
<IconContainersSection>
|
|
74
|
-
<IconContainerBlock title="Start" iconify="mdi:rocket-launch" link="/docs/intro" />
|
|
75
|
-
</IconContainersSection>
|
|
76
|
-
```
|
|
77
|
-
</TabItem>
|
|
78
|
-
<TabItem value="wildcard" label="Wildcard">
|
|
79
|
-
:::warning[Not Recommended]
|
|
80
|
-
Wildcard imports may increase bundle size as they import the entire library. Use individual imports instead.
|
|
81
|
-
:::
|
|
82
|
-
|
|
83
|
-
```mdx title="src/pages/index.mdx"
|
|
84
|
-
import * as Components from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
85
|
-
|
|
86
|
-
<Components.HeroBanner bannerText="Welcome" iconify="mdi:school" />
|
|
87
|
-
```
|
|
88
|
-
</TabItem>
|
|
89
|
-
</Tabs>
|
|
90
|
-
|
|
91
|
-
### Where to Use
|
|
92
|
-
|
|
93
|
-
The components are designed for creating landing pages in MDX format. Place your landing pages in the `/src/pages/` directory:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
src/pages/
|
|
97
|
-
├── index.mdx # Homepage
|
|
98
|
-
├── courses.mdx # Courses overview
|
|
99
|
-
└── workshops/
|
|
100
|
-
└── index.mdx # Workshop landing page
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Files in `/src/pages/` automatically map to URLs:
|
|
104
|
-
|
|
105
|
-
- `src/pages/index.mdx` → `/`
|
|
106
|
-
- `src/pages/courses.mdx` → `/courses`
|
|
107
|
-
- `src/pages/workshops/index.mdx` → `/workshops/`
|
|
108
|
-
|
|
109
|
-
### Page Configuration
|
|
110
|
-
|
|
111
|
-
Use frontmatter to configure your landing pages:
|
|
112
|
-
|
|
113
|
-
```mdx title="src/pages/index.mdx"
|
|
114
|
-
---
|
|
115
|
-
title: Course Homepage
|
|
116
|
-
description: Learn with our comprehensive course
|
|
117
|
-
hide_table_of_contents: true
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
import { HeroBanner, CourseFeature } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
121
|
-
|
|
122
|
-
<HeroBanner
|
|
123
|
-
bannerText="Learn with our hands-on course"
|
|
124
|
-
iconify="mdi:school"
|
|
125
|
-
/>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
:::tip
|
|
129
|
-
Set `hide_table_of_contents: true` in frontmatter for cleaner landing pages.
|
|
130
|
-
:::
|
|
131
|
-
|
|
132
|
-
### Icon Configuration
|
|
133
|
-
|
|
134
|
-
All components support flexible icon configuration.
|
|
135
|
-
|
|
136
|
-
**Using Iconify Icons:**
|
|
137
|
-
|
|
138
|
-
Browse icons at [Iconify](https://icon-sets.iconify.design/) and use the icon name:
|
|
139
|
-
|
|
140
|
-
```mdx
|
|
141
|
-
<HeroBanner
|
|
142
|
-
iconify="mdi:docker"
|
|
143
|
-
iconColors={{
|
|
144
|
-
light: "#2496ED",
|
|
145
|
-
dark: "#2496ED"
|
|
146
|
-
}}
|
|
147
|
-
/>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Using Custom Images:**
|
|
151
|
-
|
|
152
|
-
Provide custom SVG or PNG images with theme variants:
|
|
153
|
-
|
|
154
|
-
```mdx
|
|
155
|
-
<HeroBanner
|
|
156
|
-
customSvg={{
|
|
157
|
-
light: "img/logo-light.svg",
|
|
158
|
-
dark: "img/logo-dark.svg",
|
|
159
|
-
}}
|
|
160
|
-
/>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Place custom images in the `/static/img/` directory.
|
|
164
|
-
|
|
165
|
-
### Usage with React Pages
|
|
166
|
-
|
|
167
|
-
:::note
|
|
168
|
-
While the components are compatible with React (`.jsx`, `.tsx`) pages, we recommend using them in MDX pages for the best experience.
|
|
169
|
-
:::
|
|
170
|
-
|
|
171
|
-
If using in React pages, import as standard React components:
|
|
172
|
-
|
|
173
|
-
```tsx title="src/pages/index.tsx"
|
|
174
|
-
import React from 'react';
|
|
175
|
-
import { HeroBanner } from '@sp-days-framework/docusaurus-frontpage-collection';
|
|
176
|
-
|
|
177
|
-
export default function Home() {
|
|
178
|
-
return (
|
|
179
|
-
<HeroBanner
|
|
180
|
-
bannerText="Welcome to Our Course"
|
|
181
|
-
iconify="mdi:school"
|
|
182
|
-
/>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
```
|