@brillout/docpress 0.6.9 → 0.6.11
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/components/HorizontalLine.tsx +2 -1
- package/css/heading.css +23 -1
- package/package.json +2 -2
- package/types/Config.ts +1 -0
- package/types/Heading.ts +28 -30
|
@@ -10,7 +10,8 @@ function HorizontalLine({ primary }: { primary?: true }) {
|
|
|
10
10
|
display: 'inline-block',
|
|
11
11
|
margin: 0,
|
|
12
12
|
border: 0,
|
|
13
|
-
|
|
13
|
+
// Same as `.doc-page h2::after`
|
|
14
|
+
borderTop: '1px solid #eaeaea',
|
|
14
15
|
maxWidth: 500,
|
|
15
16
|
width: '80%',
|
|
16
17
|
}}
|
package/css/heading.css
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
.doc-page h1 {
|
|
2
|
+
margin-top: 20px;
|
|
3
|
+
margin-bottom: 20px;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.doc-page h2,
|
|
2
7
|
.doc-page h3 {
|
|
3
8
|
margin-bottom: 16px;
|
|
4
9
|
}
|
|
5
10
|
.doc-page h2 {
|
|
6
|
-
margin-top:
|
|
11
|
+
margin-top: 100px;
|
|
12
|
+
}
|
|
13
|
+
.doc-page h2::after {
|
|
14
|
+
content: '';
|
|
15
|
+
display: block;
|
|
16
|
+
position: absolute;
|
|
17
|
+
height: 1px;
|
|
18
|
+
top: -45px;
|
|
19
|
+
/* Same as <HorizontalLine> */
|
|
20
|
+
background-color: #eaeaea;
|
|
21
|
+
--width: min(80%, 500px);
|
|
22
|
+
width: var(--width);
|
|
23
|
+
left: calc((100% - var(--width)) / 2);
|
|
7
24
|
}
|
|
8
25
|
.doc-page h3 {
|
|
9
26
|
margin-top: 40px;
|
|
@@ -14,6 +31,11 @@
|
|
|
14
31
|
.doc-page h2 + h3 {
|
|
15
32
|
margin-top: 0;
|
|
16
33
|
}
|
|
34
|
+
.doc-page h1 + h2:after,
|
|
35
|
+
.doc-page h1 + h3:after,
|
|
36
|
+
.doc-page h2 + h3:after {
|
|
37
|
+
display: none !important;
|
|
38
|
+
}
|
|
17
39
|
|
|
18
40
|
.doc-page h4 {
|
|
19
41
|
margin-top: 32px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"// Build vite.config.ts and +config.ts": "",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@brillout/release-me": "^0.
|
|
73
|
+
"@brillout/release-me": "^0.3.8",
|
|
74
74
|
"@types/node": "^15.12.1",
|
|
75
75
|
"@types/react": "^17.0.44",
|
|
76
76
|
"@types/react-dom": "^17.0.6",
|
package/types/Config.ts
CHANGED
|
@@ -35,6 +35,7 @@ type Config = {
|
|
|
35
35
|
navHeaderMobileWrapperStyle?: React.CSSProperties
|
|
36
36
|
navHeader: React.ReactNode
|
|
37
37
|
navHeaderWrapperStyle?: React.CSSProperties
|
|
38
|
+
/** Sets `<meta name="description" content="${tagline}" />` */
|
|
38
39
|
tagline: string
|
|
39
40
|
websiteUrl: string
|
|
40
41
|
bannerUrl?: string
|
package/types/Heading.ts
CHANGED
|
@@ -5,49 +5,47 @@ export { HeadingDefinition }
|
|
|
5
5
|
|
|
6
6
|
import type { EmojiName } from '../utils/server'
|
|
7
7
|
|
|
8
|
-
type
|
|
9
|
-
|
|
|
10
|
-
| {
|
|
11
|
-
level: 3
|
|
12
|
-
url: null | string
|
|
13
|
-
}
|
|
14
|
-
type NaItemDefinitionLevel =
|
|
15
|
-
| ({ level: 1; titleEmoji: EmojiName } & IsNavCategory)
|
|
16
|
-
| ({ level: 4 } & IsNavCategory)
|
|
17
|
-
| {
|
|
18
|
-
level: 2
|
|
19
|
-
sectionTitles?: string[]
|
|
20
|
-
url: null | string
|
|
21
|
-
}
|
|
22
|
-
type IsNavCategory = {
|
|
23
|
-
url?: undefined
|
|
24
|
-
titleDocument?: undefined
|
|
25
|
-
titleInNav?: undefined
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type HeadingResolved = HeadingCommon & {
|
|
8
|
+
type HeadingResolved = {
|
|
9
|
+
url?: null | string
|
|
29
10
|
level: number
|
|
30
11
|
title: JSX.Element
|
|
31
12
|
titleInNav: JSX.Element
|
|
32
13
|
linkBreadcrumb: JSX.Element[]
|
|
33
|
-
|
|
14
|
+
sectionTitles?: string[]
|
|
15
|
+
} & Tmp
|
|
16
|
+
|
|
34
17
|
type HeadingDetachedResolved = Omit<HeadingResolved, 'level' | 'linkBreadcrumb'> & {
|
|
35
18
|
level: 2
|
|
36
19
|
linkBreadcrumb: null
|
|
37
20
|
}
|
|
21
|
+
|
|
38
22
|
type HeadingDetachedDefinition = {
|
|
39
23
|
url: string
|
|
40
24
|
title: string | JSX.Element
|
|
25
|
+
sectionTitles?: string[]
|
|
41
26
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
title: string
|
|
45
|
-
// TODO: rename to titleNav
|
|
46
|
-
titleInNav?: string
|
|
47
|
-
}
|
|
48
|
-
type HeadingCommon = {
|
|
27
|
+
|
|
28
|
+
type HeadingDefinition = {
|
|
49
29
|
url?: null | string
|
|
50
|
-
|
|
30
|
+
title: string
|
|
31
|
+
titleInNav?: string
|
|
32
|
+
} & HeadingDefinitionLevel &
|
|
33
|
+
Tmp
|
|
34
|
+
type IsCategory = {
|
|
35
|
+
url?: undefined
|
|
36
|
+
titleDocument?: undefined
|
|
37
|
+
titleInNav?: undefined
|
|
38
|
+
}
|
|
39
|
+
type HeadingDefinitionLevel =
|
|
40
|
+
| ({ level: 1; titleEmoji: EmojiName } & IsCategory)
|
|
41
|
+
| ({ level: 4 } & IsCategory)
|
|
42
|
+
| {
|
|
43
|
+
level: 2
|
|
44
|
+
sectionTitles?: string[]
|
|
45
|
+
url: null | string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type Tmp = {
|
|
51
49
|
// TODO: remove? Both Vike and Telefunc set it to the same value than docpress.config.js#projectInfo.projectName
|
|
52
50
|
titleDocument?: string
|
|
53
51
|
}
|