@t8/docsgen 0.4.13 → 0.4.14
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 +4 -4
- package/dist/css/base.css +5 -2
- package/package.json +1 -1
- package/src/bin/content/getStartContent.ts +3 -3
- package/src/bin/setContent.ts +1 -1
- package/src/css/base.css +5 -2
package/dist/bin.js
CHANGED
|
@@ -892,7 +892,7 @@ ${getInjectedContent(ctx, "section", "body", "append")}
|
|
|
892
892
|
}
|
|
893
893
|
|
|
894
894
|
// src/bin/content/getStartContent.ts
|
|
895
|
-
async function getStartContent(ctx) {
|
|
895
|
+
async function getStartContent(ctx, delay = 0) {
|
|
896
896
|
let { root, contentDir = "" } = ctx;
|
|
897
897
|
let { nav } = await getParsedContent(ctx);
|
|
898
898
|
let plainTitle = await getPlainTitle(ctx);
|
|
@@ -903,11 +903,11 @@ async function getStartContent(ctx) {
|
|
|
903
903
|
${getInjectedContent(ctx, "start", "head", "prepend")}
|
|
904
904
|
<meta charset="utf-8">
|
|
905
905
|
<meta name="viewport" content="width=device-width">
|
|
906
|
-
<meta http-equiv="refresh" content="
|
|
906
|
+
<meta http-equiv="refresh" content="${delay}; URL=${root}${contentDir}/${nav[0]?.id}">
|
|
907
907
|
<title>${plainTitle}</title>
|
|
908
908
|
<link rel="stylesheet" href="${await getCSSRoot(ctx, "index")}/base.css">
|
|
909
909
|
${getIconTag(ctx)}
|
|
910
|
-
<script>window.location.replace("${root}${contentDir}/${nav[0]?.id}");</script>
|
|
910
|
+
<script>setTimeout(() => { window.location.replace("${root}${contentDir}/${nav[0]?.id}"); }, ${delay * 1e3});</script>
|
|
911
911
|
${getInjectedContent(ctx, "start", "head", "append")}
|
|
912
912
|
</head>
|
|
913
913
|
<body>
|
|
@@ -940,7 +940,7 @@ async function setContent(ctx) {
|
|
|
940
940
|
)
|
|
941
941
|
),
|
|
942
942
|
// writeFile(join(dir, "index.html"), await getIndexContent(ctx)),
|
|
943
|
-
writeFile2(join5(dir, "index.html"), await getStartContent(ctx)),
|
|
943
|
+
writeFile2(join5(dir, "index.html"), await getStartContent(ctx, 3)),
|
|
944
944
|
writeFile2(join5(dir, "start.html"), await getStartContent(ctx))
|
|
945
945
|
]);
|
|
946
946
|
}
|
package/dist/css/base.css
CHANGED
|
@@ -170,9 +170,12 @@ pre > code {
|
|
|
170
170
|
padding: 1.25em;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
html.blank {
|
|
174
|
+
background: var(--aux-background);
|
|
175
|
+
}
|
|
173
176
|
html.blank h1 {
|
|
174
|
-
font-size:
|
|
175
|
-
color: var(--
|
|
177
|
+
font-size: 5vmin;
|
|
178
|
+
color: var(--aux-color);
|
|
176
179
|
}
|
|
177
180
|
html.blank .layout {
|
|
178
181
|
display: flex;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { getInjectedContent } from "./getInjectedContent.ts";
|
|
|
7
7
|
import { getPlainTitle } from "./getPlainTitle.ts";
|
|
8
8
|
import { toFileContent } from "./toFileContent.ts";
|
|
9
9
|
|
|
10
|
-
export async function getStartContent(ctx: Context) {
|
|
10
|
+
export async function getStartContent(ctx: Context, delay = 0) {
|
|
11
11
|
let { root, contentDir = "" } = ctx;
|
|
12
12
|
let { nav } = await getParsedContent(ctx);
|
|
13
13
|
let plainTitle = await getPlainTitle(ctx);
|
|
@@ -19,11 +19,11 @@ export async function getStartContent(ctx: Context) {
|
|
|
19
19
|
${getInjectedContent(ctx, "start", "head", "prepend")}
|
|
20
20
|
<meta charset="utf-8">
|
|
21
21
|
<meta name="viewport" content="width=device-width">
|
|
22
|
-
<meta http-equiv="refresh" content="
|
|
22
|
+
<meta http-equiv="refresh" content="${delay}; URL=${root}${contentDir}/${nav[0]?.id}">
|
|
23
23
|
<title>${plainTitle}</title>
|
|
24
24
|
<link rel="stylesheet" href="${await getCSSRoot(ctx, "index")}/base.css">
|
|
25
25
|
${getIconTag(ctx)}
|
|
26
|
-
<script>window.location.replace("${root}${contentDir}/${nav[0]?.id}");</script>
|
|
26
|
+
<script>setTimeout(() => { window.location.replace("${root}${contentDir}/${nav[0]?.id}"); }, ${delay * 1000});</script>
|
|
27
27
|
${getInjectedContent(ctx, "start", "head", "append")}
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
package/src/bin/setContent.ts
CHANGED
|
@@ -28,7 +28,7 @@ export async function setContent(ctx: Context) {
|
|
|
28
28
|
),
|
|
29
29
|
),
|
|
30
30
|
// writeFile(join(dir, "index.html"), await getIndexContent(ctx)),
|
|
31
|
-
writeFile(join(dir, "index.html"), await getStartContent(ctx)),
|
|
31
|
+
writeFile(join(dir, "index.html"), await getStartContent(ctx, 3)),
|
|
32
32
|
writeFile(join(dir, "start.html"), await getStartContent(ctx)),
|
|
33
33
|
]);
|
|
34
34
|
}
|
package/src/css/base.css
CHANGED
|
@@ -170,9 +170,12 @@ pre > code {
|
|
|
170
170
|
padding: 1.25em;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
html.blank {
|
|
174
|
+
background: var(--aux-background);
|
|
175
|
+
}
|
|
173
176
|
html.blank h1 {
|
|
174
|
-
font-size:
|
|
175
|
-
color: var(--
|
|
177
|
+
font-size: 5vmin;
|
|
178
|
+
color: var(--aux-color);
|
|
176
179
|
}
|
|
177
180
|
html.blank .layout {
|
|
178
181
|
display: flex;
|