@t8/docsgen 0.4.12 → 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 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="0; URL=${root}${contentDir}/${nav[0]?.id}">
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
@@ -96,23 +96,30 @@ a:hover,
96
96
  a:active {
97
97
  --color: var(--link-color);
98
98
  color: var(--color);
99
- text-decoration: none;
100
- border-bottom: 0.05em solid;
99
+ text-decoration-thickness: 0.02rem;
100
+ text-underline-offset: 0.18em;
101
101
  }
102
102
  h1 {
103
103
  font-size: 2.25em;
104
+ font-weight: 900;
104
105
  line-height: 1;
106
+ color: var(--emphatic-color);
105
107
  margin: 0;
106
108
  }
109
+ h1 sup {
110
+ font-size: 0.5em;
111
+ }
107
112
  h2,
108
113
  h3,
109
114
  h4 {
110
115
  line-height: 1.1;
116
+ color: var(--emphatic-color);
111
117
  padding-top: 0.3em;
112
118
  margin: 1em 0 0.65em 0;
113
119
  }
114
120
  h2 {
115
121
  font-size: 1.3em;
122
+ font-weight: 900;
116
123
  }
117
124
  h3 {
118
125
  font-size: 1.15em;
@@ -163,9 +170,12 @@ pre > code {
163
170
  padding: 1.25em;
164
171
  }
165
172
 
173
+ html.blank {
174
+ background: var(--aux-background);
175
+ }
166
176
  html.blank h1 {
167
- font-size: 10vmin;
168
- color: var(--secondary-color);
177
+ font-size: 5vmin;
178
+ color: var(--aux-color);
169
179
  }
170
180
  html.blank .layout {
171
181
  display: flex;
@@ -17,20 +17,8 @@ header {
17
17
  }
18
18
  header h1 {
19
19
  font-size: 1.5em;
20
- font-weight: 900;
21
20
  margin: 0;
22
21
  }
23
- header h1 > a,
24
- header h1 > a:link,
25
- header h1 > a:hover,
26
- header h1 > a:visited,
27
- header h1 > a:active {
28
- text-decoration: underline;
29
- border-bottom: none;
30
- }
31
- header h1 sup {
32
- font-size: 0.5em;
33
- }
34
22
  header .description {
35
23
  max-width: 36em;
36
24
  font-size: 0.8em;
@@ -117,21 +105,8 @@ aside > .header .installation code {
117
105
  }
118
106
  aside h1 {
119
107
  font-size: 1.3rem;
120
- font-weight: 900;
121
- color: var(--aux-emphatic-color);
122
108
  margin: 0;
123
109
  }
124
- aside h1 > a,
125
- aside h1 > a:link,
126
- aside h1 > a:hover,
127
- aside h1 > a:visited,
128
- aside h1 > a:active {
129
- text-decoration: underline;
130
- border-bottom: none;
131
- }
132
- aside h1 sup {
133
- font-size: 0.5em;
134
- }
135
110
  aside nav {
136
111
  font-size: 0.8rem;
137
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "type": "module",
@@ -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="0; URL=${root}${contentDir}/${nav[0]?.id}">
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>
@@ -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
@@ -96,23 +96,30 @@ a:hover,
96
96
  a:active {
97
97
  --color: var(--link-color);
98
98
  color: var(--color);
99
- text-decoration: none;
100
- border-bottom: 0.05em solid;
99
+ text-decoration-thickness: 0.02rem;
100
+ text-underline-offset: 0.18em;
101
101
  }
102
102
  h1 {
103
103
  font-size: 2.25em;
104
+ font-weight: 900;
104
105
  line-height: 1;
106
+ color: var(--emphatic-color);
105
107
  margin: 0;
106
108
  }
109
+ h1 sup {
110
+ font-size: 0.5em;
111
+ }
107
112
  h2,
108
113
  h3,
109
114
  h4 {
110
115
  line-height: 1.1;
116
+ color: var(--emphatic-color);
111
117
  padding-top: 0.3em;
112
118
  margin: 1em 0 0.65em 0;
113
119
  }
114
120
  h2 {
115
121
  font-size: 1.3em;
122
+ font-weight: 900;
116
123
  }
117
124
  h3 {
118
125
  font-size: 1.15em;
@@ -163,9 +170,12 @@ pre > code {
163
170
  padding: 1.25em;
164
171
  }
165
172
 
173
+ html.blank {
174
+ background: var(--aux-background);
175
+ }
166
176
  html.blank h1 {
167
- font-size: 10vmin;
168
- color: var(--secondary-color);
177
+ font-size: 5vmin;
178
+ color: var(--aux-color);
169
179
  }
170
180
  html.blank .layout {
171
181
  display: flex;
@@ -17,20 +17,8 @@ header {
17
17
  }
18
18
  header h1 {
19
19
  font-size: 1.5em;
20
- font-weight: 900;
21
20
  margin: 0;
22
21
  }
23
- header h1 > a,
24
- header h1 > a:link,
25
- header h1 > a:hover,
26
- header h1 > a:visited,
27
- header h1 > a:active {
28
- text-decoration: underline;
29
- border-bottom: none;
30
- }
31
- header h1 sup {
32
- font-size: 0.5em;
33
- }
34
22
  header .description {
35
23
  max-width: 36em;
36
24
  font-size: 0.8em;
@@ -117,21 +105,8 @@ aside > .header .installation code {
117
105
  }
118
106
  aside h1 {
119
107
  font-size: 1.3rem;
120
- font-weight: 900;
121
- color: var(--aux-emphatic-color);
122
108
  margin: 0;
123
109
  }
124
- aside h1 > a,
125
- aside h1 > a:link,
126
- aside h1 > a:hover,
127
- aside h1 > a:visited,
128
- aside h1 > a:active {
129
- text-decoration: underline;
130
- border-bottom: none;
131
- }
132
- aside h1 sup {
133
- font-size: 0.5em;
134
- }
135
110
  aside nav {
136
111
  font-size: 0.8rem;
137
112
  }