@sakura-ui/sakura-ui 0.2.0 β 0.4.1
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 +77 -6
- package/package.json +28 -21
- package/packages/core/package.json +30 -17
- package/packages/core/src/components/Button.tsx +33 -32
- package/packages/core/src/components/Card.tsx +37 -20
- package/packages/core/src/components/Code.tsx +6 -4
- package/packages/core/src/components/Faq.tsx +13 -7
- package/packages/core/src/components/Heading.tsx +42 -32
- package/packages/core/src/components/Icon.tsx +43 -13
- package/packages/core/src/components/IconButton.tsx +54 -43
- package/packages/core/src/components/LangSelector.tsx +135 -0
- package/packages/core/src/components/Link.tsx +37 -66
- package/packages/core/src/components/LinkCard.tsx +126 -0
- package/packages/core/src/components/List.tsx +14 -12
- package/packages/core/src/components/MenuButton.tsx +112 -0
- package/packages/core/src/components/NavigationItem.tsx +41 -0
- package/packages/core/src/components/NotificationBanner.tsx +20 -0
- package/packages/core/src/components/OverflowContainer.tsx +24 -0
- package/packages/core/src/components/PopoverMenu.tsx +82 -0
- package/packages/core/src/components/Pre.tsx +6 -4
- package/packages/core/src/components/Table.tsx +31 -25
- package/packages/core/src/components/buttonStyle.ts +43 -32
- package/packages/core/src/components/index.ts +13 -25
- package/packages/core/src/icons/Close.tsx +21 -0
- package/packages/core/src/icons/CloseMobile.tsx +43 -0
- package/packages/core/src/icons/KeyboardArrowDown.tsx +24 -0
- package/packages/core/src/icons/Language.tsx +25 -0
- package/packages/core/src/icons/LanguageMobile.tsx +40 -0
- package/packages/core/src/icons/Menu.tsx +24 -0
- package/packages/core/src/icons/MenuMobile.tsx +40 -0
- package/packages/core/src/icons/index.ts +8 -0
- package/packages/core/src/icons/props.ts +5 -0
- package/packages/core/src/index.ts +10 -28
- package/packages/core/src/type.d.ts +1 -0
- package/packages/core/tests/Button.test.tsx +20 -10
- package/packages/core/tests/Card.test.tsx +16 -11
- package/packages/core/tests/IconButton.test.tsx +57 -0
- package/packages/core/tests/Link.test.tsx +60 -0
- package/packages/core/tests/vitest.setup.ts +1 -0
- package/packages/core/tsconfig.node.json +3 -2
- package/packages/core/vite.config.ts +2 -1
- package/packages/forms/.turbo/turbo-build.log +12 -0
- package/packages/forms/dist/index.cjs.js +183 -131
- package/packages/forms/dist/index.es.js +750 -1062
- package/packages/forms/dist/types/components/Checkbox.d.ts +9 -4
- package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -1
- package/packages/forms/dist/types/components/FieldsetControl.d.ts +14 -9
- package/packages/forms/dist/types/components/FieldsetControl.d.ts.map +1 -1
- package/packages/forms/dist/types/components/FileInput.d.ts +10 -3
- package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Input.d.ts +9 -4
- package/packages/forms/dist/types/components/Input.d.ts.map +1 -1
- package/packages/forms/dist/types/components/LabelControl.d.ts +13 -8
- package/packages/forms/dist/types/components/LabelControl.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Radio.d.ts +9 -4
- package/packages/forms/dist/types/components/Radio.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Select.d.ts +9 -4
- package/packages/forms/dist/types/components/Select.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Textarea.d.ts +8 -3
- package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts +16 -11
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts +17 -12
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts.map +1 -1
- package/packages/forms/dist/types/components/index.d.ts +8 -8
- package/packages/forms/dist/types/components/index.d.ts.map +1 -1
- package/packages/forms/dist/types/components/inputStyle.d.ts +1 -1
- package/packages/forms/dist/types/components/inputStyle.d.ts.map +1 -1
- package/packages/forms/dist/types/index.d.ts +0 -1
- package/packages/forms/dist/types/index.d.ts.map +1 -1
- package/packages/forms/node_modules/.bin/autoprefixer +44 -6
- package/packages/forms/package.json +21 -16
- package/packages/forms/src/components/Checkbox.tsx +76 -80
- package/packages/forms/src/components/FieldsetControl.tsx +21 -28
- package/packages/forms/src/components/FileInput.tsx +92 -63
- package/packages/forms/src/components/Input.tsx +29 -31
- package/packages/forms/src/components/LabelControl.tsx +19 -25
- package/packages/forms/src/components/Radio.tsx +68 -69
- package/packages/forms/src/components/Select.tsx +65 -65
- package/packages/forms/src/components/Textarea.tsx +49 -54
- package/packages/forms/src/components/controlled/CheckboxGroup.tsx +15 -17
- package/packages/forms/src/components/controlled/RadioGroup.tsx +16 -18
- package/packages/forms/src/components/index.ts +8 -8
- package/packages/forms/src/components/inputStyle.ts +7 -8
- package/packages/forms/src/index.ts +0 -11
- package/packages/forms/tests/Checkbox.test.tsx +44 -0
- package/packages/forms/tests/FieldsetControl.test.tsx +68 -11
- package/packages/forms/tests/FileInput.test.tsx +25 -0
- package/packages/forms/tests/Input.test.tsx +12 -83
- package/packages/forms/tests/LabelControl.test.tsx +88 -20
- package/packages/forms/tests/Radio.test.tsx +23 -78
- package/packages/forms/tests/Select.test.tsx +30 -0
- package/packages/forms/tests/Textarea.test.tsx +25 -0
- package/packages/forms/tests/vitest.setup.ts +1 -0
- package/packages/forms/tsconfig.node.json +3 -2
- package/packages/forms/vite.config.ts +2 -1
- package/packages/helper/.turbo/turbo-build.log +12 -0
- package/packages/helper/dist/index.cjs.js +76 -0
- package/packages/helper/dist/index.es.js +119 -0
- package/packages/helper/dist/types/calc.d.ts +2 -0
- package/packages/helper/dist/types/calc.d.ts.map +1 -0
- package/packages/{forms/dist/types/utils/class.d.ts β helper/dist/types/cx.d.ts} +1 -1
- package/packages/helper/dist/types/cx.d.ts.map +1 -0
- package/packages/helper/dist/types/index.d.ts +6 -0
- package/packages/helper/dist/types/index.d.ts.map +1 -0
- package/packages/helper/dist/types/querySelector.d.ts +2 -0
- package/packages/helper/dist/types/querySelector.d.ts.map +1 -0
- package/packages/helper/dist/types/styles.d.ts +22 -0
- package/packages/helper/dist/types/styles.d.ts.map +1 -0
- package/packages/helper/dist/types/treefy.d.ts +8 -0
- package/packages/helper/dist/types/treefy.d.ts.map +1 -0
- package/packages/helper/node_modules/.bin/vitest +55 -0
- package/packages/helper/package.json +50 -0
- package/packages/helper/src/calc.ts +1 -0
- package/packages/helper/src/cx.ts +2 -0
- package/packages/helper/src/index.ts +5 -0
- package/packages/helper/src/querySelector.ts +20 -0
- package/packages/helper/src/styles.ts +114 -0
- package/packages/helper/src/treefy.ts +24 -0
- package/packages/helper/tests/calc.test.ts +22 -0
- package/packages/helper/tests/cx.test.ts +30 -0
- package/packages/helper/tests/querySelector.test.ts +24 -0
- package/packages/helper/tests/treefy.test.ts +111 -0
- package/packages/helper/tests/vitest.setup.ts +2 -0
- package/packages/helper/tsconfig.json +13 -0
- package/packages/helper/tsconfig.node.json +6 -0
- package/packages/helper/vite.config.ts +26 -0
- package/packages/markdown/.turbo/turbo-build.log +12 -0
- package/packages/markdown/README.md +129 -0
- package/packages/markdown/dist/index.cjs.js +149 -0
- package/packages/markdown/dist/index.es.js +16960 -0
- package/packages/markdown/dist/types/components/Markdown.d.ts +15 -0
- package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -0
- package/packages/markdown/dist/types/components/index.d.ts +2 -0
- package/packages/markdown/dist/types/components/index.d.ts.map +1 -0
- package/packages/markdown/dist/types/index.d.ts +2 -0
- package/packages/markdown/dist/types/index.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/attr.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/attr.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/card.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/card.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/cell.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/cell.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/faq.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/faq.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/grid.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/grid.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/headings.d.ts +11 -0
- package/packages/markdown/dist/types/plugins/headings.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/helper.d.ts +9 -0
- package/packages/markdown/dist/types/plugins/helper.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/index.d.ts +9 -0
- package/packages/markdown/dist/types/plugins/index.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/linkButton.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/linkButton.d.ts.map +1 -0
- package/packages/markdown/dist/types/plugins/youtube.d.ts +3 -0
- package/packages/markdown/dist/types/plugins/youtube.d.ts.map +1 -0
- package/packages/markdown/node_modules/.bin/autoprefixer +55 -0
- package/packages/markdown/package.json +84 -0
- package/packages/markdown/src/components/Markdown.tsx +365 -0
- package/packages/markdown/src/components/index.ts +1 -0
- package/packages/markdown/src/global.d.ts +9 -0
- package/packages/markdown/src/index.ts +1 -0
- package/packages/markdown/src/plugins/attr.ts +19 -0
- package/packages/markdown/src/plugins/card.ts +57 -0
- package/packages/markdown/src/plugins/cell.ts +47 -0
- package/packages/markdown/src/plugins/faq.ts +40 -0
- package/packages/markdown/src/plugins/grid.ts +54 -0
- package/packages/markdown/src/plugins/headings.ts +38 -0
- package/packages/markdown/src/plugins/helper.ts +27 -0
- package/packages/markdown/src/plugins/index.ts +8 -0
- package/packages/markdown/src/plugins/linkButton.ts +26 -0
- package/packages/markdown/src/plugins/youtube.ts +49 -0
- package/packages/markdown/tsconfig.json +13 -0
- package/packages/markdown/tsconfig.node.json +7 -0
- package/packages/markdown/vite.config.ts +30 -0
- package/packages/tailwind-theme-plugin/#package.json# +51 -0
- package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +12 -0
- package/packages/tailwind-theme-plugin/dist/index.cjs.js +1 -1
- package/packages/tailwind-theme-plugin/dist/index.es.js +4970 -6093
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts +1 -4
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts.map +1 -1
- package/packages/tailwind-theme-plugin/node_modules/.bin/autoprefixer +44 -6
- package/packages/tailwind-theme-plugin/package.json +11 -9
- package/packages/tailwind-theme-plugin/src/index.ts +241 -349
- package/packages/tailwind-theme-plugin/vite.config.ts +2 -0
- package/packages/core/src/libs/cx.ts +0 -2
- package/packages/core/src/libs/forward-ref.ts +0 -44
- package/packages/core/src/types/component.ts +0 -83
- package/packages/forms/dist/types/utils/class.d.ts.map +0 -1
- package/packages/forms/node_modules/.bin/acorn +0 -17
- package/packages/forms/node_modules/.bin/browserslist +0 -17
- package/packages/forms/node_modules/.bin/eslint +0 -17
- package/packages/forms/node_modules/.bin/tailwind +0 -17
- package/packages/forms/node_modules/.bin/tailwindcss +0 -17
- package/packages/forms/node_modules/.bin/ts-node +0 -17
- package/packages/forms/node_modules/.bin/ts-node-cwd +0 -17
- package/packages/forms/node_modules/.bin/ts-node-esm +0 -17
- package/packages/forms/node_modules/.bin/ts-node-script +0 -17
- package/packages/forms/node_modules/.bin/ts-node-transpile-only +0 -17
- package/packages/forms/node_modules/.bin/ts-script +0 -17
- package/packages/forms/node_modules/.bin/vitest +0 -17
- package/packages/forms/src/utils/class.ts +0 -2
- package/packages/tailwind-theme-plugin/node_modules/.bin/browserslist +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwind +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwindcss +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-cwd +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-esm +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-script +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-transpile-only +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-script +0 -17
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { treefy } from '../src/treefy'
|
|
3
|
+
|
|
4
|
+
describe('treefy', () => {
|
|
5
|
+
it('should return an empty array for empty input', () => {
|
|
6
|
+
expect(treefy([])).toEqual([])
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
it('should keep flat items at the root level when all depths are the same', () => {
|
|
10
|
+
const input = [
|
|
11
|
+
{ depth: 1, name: 'a' },
|
|
12
|
+
{ depth: 1, name: 'b' },
|
|
13
|
+
{ depth: 1, name: 'c' }
|
|
14
|
+
]
|
|
15
|
+
expect(treefy(input)).toEqual([
|
|
16
|
+
{ depth: 1, name: 'a' },
|
|
17
|
+
{ depth: 1, name: 'b' },
|
|
18
|
+
{ depth: 1, name: 'c' }
|
|
19
|
+
])
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('should nest children under their parent', () => {
|
|
23
|
+
const input = [
|
|
24
|
+
{ depth: 1, name: 'parent' },
|
|
25
|
+
{ depth: 2, name: 'child1' },
|
|
26
|
+
{ depth: 2, name: 'child2' }
|
|
27
|
+
]
|
|
28
|
+
expect(treefy(input)).toEqual([
|
|
29
|
+
{
|
|
30
|
+
depth: 1,
|
|
31
|
+
name: 'parent',
|
|
32
|
+
children: [
|
|
33
|
+
{ depth: 2, name: 'child1' },
|
|
34
|
+
{ depth: 2, name: 'child2' }
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
])
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('should nest deeply (depth 1 -> 2 -> 3)', () => {
|
|
41
|
+
const input = [
|
|
42
|
+
{ depth: 1, name: 'root' },
|
|
43
|
+
{ depth: 2, name: 'child' },
|
|
44
|
+
{ depth: 3, name: 'grandchild' }
|
|
45
|
+
]
|
|
46
|
+
expect(treefy(input)).toEqual([
|
|
47
|
+
{
|
|
48
|
+
depth: 1,
|
|
49
|
+
name: 'root',
|
|
50
|
+
children: [
|
|
51
|
+
{
|
|
52
|
+
depth: 2,
|
|
53
|
+
name: 'child',
|
|
54
|
+
children: [{ depth: 3, name: 'grandchild' }]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
])
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it('should handle multiple root nodes with children', () => {
|
|
62
|
+
const input = [
|
|
63
|
+
{ depth: 1, name: 'h1-first' },
|
|
64
|
+
{ depth: 2, name: 'h2-under-first' },
|
|
65
|
+
{ depth: 1, name: 'h1-second' },
|
|
66
|
+
{ depth: 2, name: 'h2-under-second' }
|
|
67
|
+
]
|
|
68
|
+
expect(treefy(input)).toEqual([
|
|
69
|
+
{
|
|
70
|
+
depth: 1,
|
|
71
|
+
name: 'h1-first',
|
|
72
|
+
children: [{ depth: 2, name: 'h2-under-first' }]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
depth: 1,
|
|
76
|
+
name: 'h1-second',
|
|
77
|
+
children: [{ depth: 2, name: 'h2-under-second' }]
|
|
78
|
+
}
|
|
79
|
+
])
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
it('should strip existing children property from input items', () => {
|
|
83
|
+
const input = [
|
|
84
|
+
{ depth: 1, name: 'parent', children: 'should be removed' },
|
|
85
|
+
{ depth: 2, name: 'child', children: null }
|
|
86
|
+
]
|
|
87
|
+
expect(treefy(input)).toEqual([
|
|
88
|
+
{
|
|
89
|
+
depth: 1,
|
|
90
|
+
name: 'parent',
|
|
91
|
+
children: [{ depth: 2, name: 'child' }]
|
|
92
|
+
}
|
|
93
|
+
])
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
// PR #21: treefy bug fix - children were not properly attached to parent nodes
|
|
97
|
+
it('should correctly attach children to parent (regression test for PR #21)', () => {
|
|
98
|
+
const input = [
|
|
99
|
+
{ depth: 2, name: 'hogehoge1' },
|
|
100
|
+
{ depth: 3, name: 'fugafuga' },
|
|
101
|
+
{ depth: 2, name: 'hogehoge2' }
|
|
102
|
+
]
|
|
103
|
+
const result = treefy(input)
|
|
104
|
+
|
|
105
|
+
// hogehoge1 should have fugafuga as a child
|
|
106
|
+
expect(result[0].children).toEqual([{ depth: 3, name: 'fugafuga' }])
|
|
107
|
+
// hogehoge2 should be a separate root node, not nested under hogehoge1
|
|
108
|
+
expect(result).toHaveLength(2)
|
|
109
|
+
expect(result[1]).toEqual({ depth: 2, name: 'hogehoge2' })
|
|
110
|
+
})
|
|
111
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declarationDir": "./dist/types",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": ["src/*"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"include": ["src"],
|
|
12
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { defineConfig } from 'vite'
|
|
4
|
+
import react from '@vitejs/plugin-react-swc'
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [react()],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'@': resolve(__dirname, 'src')
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
build: {
|
|
15
|
+
lib: {
|
|
16
|
+
entry: resolve(__dirname, 'src', 'index.ts'),
|
|
17
|
+
formats: ['es', 'cjs'],
|
|
18
|
+
fileName: (ext: string) => `index.${ext}.js`
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
test: {
|
|
22
|
+
globals: true,
|
|
23
|
+
environment: 'happy-dom',
|
|
24
|
+
setupFiles: 'tests/vitest.setup.ts'
|
|
25
|
+
}
|
|
26
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
$ rimraf dist
|
|
2
|
+
$ run-p build:*
|
|
3
|
+
$ vite build
|
|
4
|
+
[36mvite v7.3.6 [32mbuilding client environment for production...[36m[39m
|
|
5
|
+
transforming...
|
|
6
|
+
$ tsc && tsc-alias
|
|
7
|
+
[32mβ[39m 365 modules transformed.
|
|
8
|
+
rendering chunks...
|
|
9
|
+
computing gzip size...
|
|
10
|
+
[2mdist/[22m[36mindex.es.js [39m[1m[33m554.27 kB[39m[22m[2m β gzip: 141.23 kB[22m
|
|
11
|
+
[2mdist/[22m[36mindex.cjs.js [39m[1m[2m377.84 kB[22m[1m[22m[2m β gzip: 117.18 kB[22m
|
|
12
|
+
[32mβ built in 4.49s[39m
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Sakura UI markdown extension
|
|
2
|
+
Sakura UI markdown extension is a markdown extension library that utilizes the Directive syntax of markdown.
|
|
3
|
+
|
|
4
|
+
For details on markdown directives, please refer to the following page.
|
|
5
|
+
- [remark-directive](https://github.com/remarkjs/remark-directive)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
```
|
|
9
|
+
$ npm install @sakura-ui/markdown
|
|
10
|
+
```
|
|
11
|
+
or
|
|
12
|
+
```
|
|
13
|
+
$ yarn add @sakura-ui/markdown
|
|
14
|
+
```
|
|
15
|
+
or
|
|
16
|
+
```
|
|
17
|
+
$ pnpm add @sakura-ui/markdown
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
When using libraries such as Gatsby or Next.js, please use them in combination with React Suspense.
|
|
22
|
+
```ts
|
|
23
|
+
import React, { lazy, Suspense } from 'react'
|
|
24
|
+
|
|
25
|
+
const Markdown = lazy(() =>
|
|
26
|
+
import('@sakura-ui/markdown').then((module) => ({ default: module.Markdown }))
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
export const MyPage = () => {
|
|
30
|
+
const text = `
|
|
31
|
+
# Page title
|
|
32
|
+
I really like using Markdown.
|
|
33
|
+
|
|
34
|
+
- First item
|
|
35
|
+
- Second item
|
|
36
|
+
- Third item
|
|
37
|
+
`
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div>
|
|
41
|
+
<Suspense fallback={<div />}>
|
|
42
|
+
<Markdown>{text}</Markdown>
|
|
43
|
+
</Suspense>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Syntax
|
|
50
|
+
### LinkButton
|
|
51
|
+
```
|
|
52
|
+
:link-button[Services and applications]{href=/services}
|
|
53
|
+
```
|
|
54
|
+
<img width="288" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2024-07-26 23 44 39" src="https://github.com/user-attachments/assets/997ccf27-4d83-4fb5-b173-ae94cd7d76cb">
|
|
55
|
+
|
|
56
|
+
### YouTube
|
|
57
|
+
```
|
|
58
|
+
::youtube[title]{id=yXdbvBzxeb8}
|
|
59
|
+
```
|
|
60
|
+
<img width="494" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2024-07-26 23 48 18" src="https://github.com/user-attachments/assets/a724cf27-a1af-4633-b9a8-27b25b04e3ae">
|
|
61
|
+
|
|
62
|
+
### Multi column layout
|
|
63
|
+
```
|
|
64
|
+
::::grid-cols-3
|
|
65
|
+
:::cell
|
|
66
|
+

|
|
67
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
68
|
+
:::
|
|
69
|
+
:::cell
|
|
70
|
+

|
|
71
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
72
|
+
:::
|
|
73
|
+
:::cell
|
|
74
|
+

|
|
75
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
76
|
+
:::
|
|
77
|
+
::::
|
|
78
|
+
```
|
|
79
|
+
<img width="1143" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2024-07-26 23 51 46" src="https://github.com/user-attachments/assets/60b813b4-3a8c-451d-99b2-58c1e5b3a3b4">
|
|
80
|
+
|
|
81
|
+
### Multi column layout with card
|
|
82
|
+
```
|
|
83
|
+
::::grid-cols-3
|
|
84
|
+
:::card
|
|
85
|
+
::card-img{alt=alternative_text src=https://dummyimage.com/600x400/000/fff}
|
|
86
|
+
::card-title[Card title]
|
|
87
|
+
::card-description[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]
|
|
88
|
+
:::
|
|
89
|
+
:::card
|
|
90
|
+
::card-img{alt=alternative_text src=https://dummyimage.com/600x400/000/fff}
|
|
91
|
+
::card-title[Card title]
|
|
92
|
+
::card-description[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]
|
|
93
|
+
:::
|
|
94
|
+
:::card
|
|
95
|
+
::card-img{alt=alternative_text src=https://dummyimage.com/600x400/000/fff}
|
|
96
|
+
::card-title[Card title]
|
|
97
|
+
::card-description[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]
|
|
98
|
+
:::
|
|
99
|
+
::::
|
|
100
|
+
```
|
|
101
|
+
<img width="1133" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2024-07-26 23 55 37" src="https://github.com/user-attachments/assets/9a6dff6f-7115-451a-9d15-f953ddad78b7">
|
|
102
|
+
|
|
103
|
+
### FAQ
|
|
104
|
+
```
|
|
105
|
+
:::faq
|
|
106
|
+
::faq-q[Why you need an FAQ page]
|
|
107
|
+
::faq-a[Here are the benefits of having an FAQ page.]
|
|
108
|
+
::faq-q[Whom to contact?]
|
|
109
|
+
::faq-a[You can contact the apprenticeship office through our official phone hotline above, or with the web-form below. We generally respond to written requests within 7-10 days.]
|
|
110
|
+
:::
|
|
111
|
+
```
|
|
112
|
+
or
|
|
113
|
+
```
|
|
114
|
+
::::faq
|
|
115
|
+
:::faq-q
|
|
116
|
+
Why you need an FAQ page
|
|
117
|
+
:::
|
|
118
|
+
:::faq-a
|
|
119
|
+
Here are the benefits of having an FAQ page.
|
|
120
|
+
:::
|
|
121
|
+
:::faq-q
|
|
122
|
+
Whom to contact?
|
|
123
|
+
:::
|
|
124
|
+
:::faq-a
|
|
125
|
+
You can contact the apprenticeship office through our official phone hotline above, or with the web-form below. We generally respond to written requests within 7-10 days.
|
|
126
|
+
:::
|
|
127
|
+
::::
|
|
128
|
+
```
|
|
129
|
+
<img width="1133" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2024-07-26 23 59 50" src="https://github.com/user-attachments/assets/0f6b51fb-068e-4173-8011-f782c1b894f6">
|