@t8/docsgen 0.4.7 → 0.4.9
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/dist/bin.js +2 -2
- package/dist/css/section.css +21 -5
- package/package.json +1 -1
- package/src/bin/content/getSectionContent.ts +2 -2
- package/src/css/section.css +21 -5
package/dist/bin.js
CHANGED
|
@@ -833,7 +833,7 @@ async function getSectionContent(ctx, index) {
|
|
|
833
833
|
let plainTitle = await getPlainTitle(ctx);
|
|
834
834
|
return toFileContent(`
|
|
835
835
|
<!DOCTYPE html>
|
|
836
|
-
<html lang="en" data-layout="section">
|
|
836
|
+
<html lang="en" data-layout="section" data-section="${index}">
|
|
837
837
|
<head>
|
|
838
838
|
${getInjectedContent(ctx, "section", "head", "prepend")}
|
|
839
839
|
<meta charset="utf-8">
|
|
@@ -850,7 +850,7 @@ async function getSectionContent(ctx, index) {
|
|
|
850
850
|
<body>
|
|
851
851
|
${getInjectedContent(ctx, "section", "body", "prepend")}
|
|
852
852
|
<div class="layout">
|
|
853
|
-
<header
|
|
853
|
+
<header>
|
|
854
854
|
<h1>${mainTitle}</h1>
|
|
855
855
|
<div class="description">
|
|
856
856
|
<p>${descriptionContent}</p>
|
package/dist/css/section.css
CHANGED
|
@@ -11,11 +11,12 @@ footer {
|
|
|
11
11
|
header {
|
|
12
12
|
display: none;
|
|
13
13
|
text-align: center;
|
|
14
|
-
|
|
15
|
-
padding
|
|
14
|
+
border-bottom: 0.15rem solid;
|
|
15
|
+
padding: 1.5em 0;
|
|
16
|
+
margin: 0 var(--content-padding-x) 1em;
|
|
16
17
|
}
|
|
17
18
|
header h1 {
|
|
18
|
-
font-size: 1.
|
|
19
|
+
font-size: 1.5em;
|
|
19
20
|
font-weight: 900;
|
|
20
21
|
color: var(--aux-emphatic-color);
|
|
21
22
|
margin: 0;
|
|
@@ -35,11 +36,26 @@ header .description {
|
|
|
35
36
|
max-width: 36em;
|
|
36
37
|
font-size: 0.8em;
|
|
37
38
|
line-height: 1.2;
|
|
38
|
-
margin: 0.
|
|
39
|
+
margin: 0.5em auto 0;
|
|
39
40
|
}
|
|
40
41
|
header .description p {
|
|
41
42
|
margin: 0;
|
|
42
43
|
}
|
|
44
|
+
html:not([data-section="0"]) header {
|
|
45
|
+
text-align: start;
|
|
46
|
+
border-bottom: 0.1rem solid;
|
|
47
|
+
padding: 0.65em 0 0.35em;
|
|
48
|
+
margin-bottom: 0.5em;
|
|
49
|
+
}
|
|
50
|
+
html:not([data-section="0"]) header h1 {
|
|
51
|
+
font-size: 0.85em;
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
}
|
|
54
|
+
html:not([data-section="0"]) header .description {
|
|
55
|
+
max-width: none;
|
|
56
|
+
font-size: 0.65em;
|
|
57
|
+
margin-top: 0.35em;
|
|
58
|
+
}
|
|
43
59
|
|
|
44
60
|
.body {
|
|
45
61
|
min-height: 100vh;
|
|
@@ -283,7 +299,7 @@ main h2:first-child {
|
|
|
283
299
|
gap: 1em;
|
|
284
300
|
line-height: 1.25;
|
|
285
301
|
border-top: var(--sep-line);
|
|
286
|
-
padding: 0.6em 0
|
|
302
|
+
padding: 0.6em 0;
|
|
287
303
|
margin: 1.5em 0 0;
|
|
288
304
|
}
|
|
289
305
|
@media (max-width: 840px) {
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ export async function getSectionContent(ctx: Context, index: number) {
|
|
|
34
34
|
|
|
35
35
|
return toFileContent(`
|
|
36
36
|
<!DOCTYPE html>
|
|
37
|
-
<html lang="en" data-layout="section">
|
|
37
|
+
<html lang="en" data-layout="section" data-section="${index}">
|
|
38
38
|
<head>
|
|
39
39
|
${getInjectedContent(ctx, "section", "head", "prepend")}
|
|
40
40
|
<meta charset="utf-8">
|
|
@@ -51,7 +51,7 @@ export async function getSectionContent(ctx: Context, index: number) {
|
|
|
51
51
|
<body>
|
|
52
52
|
${getInjectedContent(ctx, "section", "body", "prepend")}
|
|
53
53
|
<div class="layout">
|
|
54
|
-
<header
|
|
54
|
+
<header>
|
|
55
55
|
<h1>${mainTitle}</h1>
|
|
56
56
|
<div class="description">
|
|
57
57
|
<p>${descriptionContent}</p>
|
package/src/css/section.css
CHANGED
|
@@ -11,11 +11,12 @@ footer {
|
|
|
11
11
|
header {
|
|
12
12
|
display: none;
|
|
13
13
|
text-align: center;
|
|
14
|
-
|
|
15
|
-
padding
|
|
14
|
+
border-bottom: 0.15rem solid;
|
|
15
|
+
padding: 1.5em 0;
|
|
16
|
+
margin: 0 var(--content-padding-x) 1em;
|
|
16
17
|
}
|
|
17
18
|
header h1 {
|
|
18
|
-
font-size: 1.
|
|
19
|
+
font-size: 1.5em;
|
|
19
20
|
font-weight: 900;
|
|
20
21
|
color: var(--aux-emphatic-color);
|
|
21
22
|
margin: 0;
|
|
@@ -35,11 +36,26 @@ header .description {
|
|
|
35
36
|
max-width: 36em;
|
|
36
37
|
font-size: 0.8em;
|
|
37
38
|
line-height: 1.2;
|
|
38
|
-
margin: 0.
|
|
39
|
+
margin: 0.5em auto 0;
|
|
39
40
|
}
|
|
40
41
|
header .description p {
|
|
41
42
|
margin: 0;
|
|
42
43
|
}
|
|
44
|
+
html:not([data-section="0"]) header {
|
|
45
|
+
text-align: start;
|
|
46
|
+
border-bottom: 0.1rem solid;
|
|
47
|
+
padding: 0.65em 0 0.35em;
|
|
48
|
+
margin-bottom: 0.5em;
|
|
49
|
+
}
|
|
50
|
+
html:not([data-section="0"]) header h1 {
|
|
51
|
+
font-size: 0.85em;
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
}
|
|
54
|
+
html:not([data-section="0"]) header .description {
|
|
55
|
+
max-width: none;
|
|
56
|
+
font-size: 0.65em;
|
|
57
|
+
margin-top: 0.35em;
|
|
58
|
+
}
|
|
43
59
|
|
|
44
60
|
.body {
|
|
45
61
|
min-height: 100vh;
|
|
@@ -283,7 +299,7 @@ main h2:first-child {
|
|
|
283
299
|
gap: 1em;
|
|
284
300
|
line-height: 1.25;
|
|
285
301
|
border-top: var(--sep-line);
|
|
286
|
-
padding: 0.6em 0
|
|
302
|
+
padding: 0.6em 0;
|
|
287
303
|
margin: 1.5em 0 0;
|
|
288
304
|
}
|
|
289
305
|
@media (max-width: 840px) {
|