@t8/docsgen 0.1.61 → 0.1.63
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 +18 -15
- package/dist/css/base.css +1 -0
- package/dist/css/index.css +23 -10
- package/package.json +1 -1
- package/src/bin/getParsedContent.ts +2 -0
- package/src/bin/setContent.ts +17 -15
- package/src/css/base.css +1 -0
- package/src/css/index.css +23 -10
package/dist/bin.js
CHANGED
|
@@ -582,6 +582,7 @@ async function getParsedContent(ctx) {
|
|
|
582
582
|
intro.unshift(description[0]);
|
|
583
583
|
description = [];
|
|
584
584
|
}
|
|
585
|
+
if (intro.at(-1) === "<hr>") intro.pop();
|
|
585
586
|
return {
|
|
586
587
|
badges: postprocessBadges(joinLines(badges)),
|
|
587
588
|
title,
|
|
@@ -764,31 +765,33 @@ ${getInjectedContent(ctx, "section", "body")}
|
|
|
764
765
|
<div class="layout">
|
|
765
766
|
<main>
|
|
766
767
|
<section class="intro-title">
|
|
767
|
-
<div class="
|
|
768
|
-
|
|
768
|
+
<div class="section-content">
|
|
769
|
+
<div class="badges">
|
|
770
|
+
${badges}
|
|
771
|
+
</div>
|
|
772
|
+
<h1>${getTitle(ctx, { cover: true })}</h1>
|
|
773
|
+
<div class="description">
|
|
774
|
+
${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
|
|
775
|
+
</div>
|
|
776
|
+
<p class="actions">
|
|
777
|
+
<a href="${root}start" class="primary button">Docs</a>
|
|
778
|
+
<span class="sep"> \u2022 </span>
|
|
779
|
+
${getRepoLink(ctx, "button")}
|
|
780
|
+
</p>
|
|
781
|
+
${backstory ? `<p class="ref"><a href="${backstory}">Backstory</a></p>` : ""}
|
|
782
|
+
<p class="installation"><code>${installation}</code></p>
|
|
769
783
|
</div>
|
|
770
|
-
<h1>${getTitle(ctx, { cover: true })}</h1>
|
|
771
|
-
<div class="description">
|
|
772
|
-
${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
|
|
773
|
-
</div>
|
|
774
|
-
<p class="actions">
|
|
775
|
-
<a href="${root}start" class="primary button">Docs</a>
|
|
776
|
-
<span class="sep"> \u2022 </span>
|
|
777
|
-
${getRepoLink(ctx, "button")}
|
|
778
|
-
</p>
|
|
779
|
-
${backstory ? `<p class="ref"><a href="${backstory}">Backstory</a></p>` : ""}
|
|
780
|
-
<p class="installation"><code>${installation}</code></p>
|
|
781
784
|
<script>document.querySelectorAll(".badges img").forEach(img=>{let c=img.closest(".badge");if(c){if(img.complete)c.classList.add("loaded");else{img.onload=()=>{c.classList.add("loaded");};img.onerror=()=>{c.classList.add("failed");};}}});</script>
|
|
782
785
|
</section>
|
|
783
786
|
${intro || features ? `
|
|
784
787
|
<section class="intro">
|
|
785
788
|
${intro ? `
|
|
786
|
-
<div class="
|
|
789
|
+
<div class="section-content">
|
|
787
790
|
${intro}
|
|
788
791
|
</div>
|
|
789
792
|
` : ""}
|
|
790
793
|
${features ? `
|
|
791
|
-
<div class="features">
|
|
794
|
+
<div class="features section-content">
|
|
792
795
|
<h2>Features</h2>
|
|
793
796
|
${features}
|
|
794
797
|
</div>
|
package/dist/css/base.css
CHANGED
package/dist/css/index.css
CHANGED
|
@@ -38,7 +38,7 @@ body {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
main {
|
|
41
|
-
--max-content-width:
|
|
41
|
+
--max-content-width: 36em;
|
|
42
42
|
--line-color: color(from var(--c0) srgb r g b / 0.1);
|
|
43
43
|
|
|
44
44
|
display: flex;
|
|
@@ -46,7 +46,7 @@ main {
|
|
|
46
46
|
align-items: flex-start;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
padding: 0;
|
|
49
|
-
margin:
|
|
49
|
+
margin: 0;
|
|
50
50
|
box-sizing: border-box;
|
|
51
51
|
}
|
|
52
52
|
@media (max-width: 840px) {
|
|
@@ -128,29 +128,42 @@ header {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
section {
|
|
131
|
+
width: 50%;
|
|
132
|
+
align-self: stretch;
|
|
133
|
+
padding: 0;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
}
|
|
136
|
+
section .section-content {
|
|
131
137
|
max-width: var(--max-content-width);
|
|
132
|
-
padding:
|
|
138
|
+
padding: 1em 3.5vw;
|
|
133
139
|
box-sizing: border-box;
|
|
134
140
|
}
|
|
135
|
-
section
|
|
141
|
+
section.intro-title {
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
section.intro-title .section-content {
|
|
136
145
|
display: flex;
|
|
137
146
|
flex-direction: column;
|
|
138
|
-
align-self: stretch;
|
|
139
147
|
justify-content: center;
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
section.intro-title {
|
|
143
|
-
text-align: center;
|
|
148
|
+
min-height: 95vh;
|
|
144
149
|
padding-top: 4em;
|
|
145
150
|
padding-bottom: 4em;
|
|
146
151
|
}
|
|
152
|
+
section.intro {
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
}
|
|
157
|
+
section.intro .section-content {
|
|
158
|
+
width: 100%;
|
|
159
|
+
}
|
|
147
160
|
@media (max-width: 840px) {
|
|
148
161
|
section {
|
|
149
162
|
width: auto;
|
|
150
163
|
max-width: 100%;
|
|
151
164
|
padding: var(--content-padding-y) var(--content-padding-x);
|
|
152
165
|
}
|
|
153
|
-
section
|
|
166
|
+
section.intro {
|
|
154
167
|
align-items: center;
|
|
155
168
|
border-left: none;
|
|
156
169
|
}
|
package/package.json
CHANGED
package/src/bin/setContent.ts
CHANGED
|
@@ -185,20 +185,22 @@ ${getInjectedContent(ctx, "section", "body")}
|
|
|
185
185
|
<div class="layout">
|
|
186
186
|
<main>
|
|
187
187
|
<section class="intro-title">
|
|
188
|
-
<div class="
|
|
189
|
-
|
|
188
|
+
<div class="section-content">
|
|
189
|
+
<div class="badges">
|
|
190
|
+
${badges}
|
|
191
|
+
</div>
|
|
192
|
+
<h1>${getTitle(ctx, { cover: true })}</h1>
|
|
193
|
+
<div class="description">
|
|
194
|
+
${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
|
|
195
|
+
</div>
|
|
196
|
+
<p class="actions">
|
|
197
|
+
<a href="${root}start" class="primary button">Docs</a>
|
|
198
|
+
<span class="sep"> • </span>
|
|
199
|
+
${getRepoLink(ctx, "button")}
|
|
200
|
+
</p>
|
|
201
|
+
${backstory ? `<p class="ref"><a href="${backstory}">Backstory</a></p>` : ""}
|
|
202
|
+
<p class="installation"><code>${installation}</code></p>
|
|
190
203
|
</div>
|
|
191
|
-
<h1>${getTitle(ctx, { cover: true })}</h1>
|
|
192
|
-
<div class="description">
|
|
193
|
-
${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
|
|
194
|
-
</div>
|
|
195
|
-
<p class="actions">
|
|
196
|
-
<a href="${root}start" class="primary button">Docs</a>
|
|
197
|
-
<span class="sep"> • </span>
|
|
198
|
-
${getRepoLink(ctx, "button")}
|
|
199
|
-
</p>
|
|
200
|
-
${backstory ? `<p class="ref"><a href="${backstory}">Backstory</a></p>` : ""}
|
|
201
|
-
<p class="installation"><code>${installation}</code></p>
|
|
202
204
|
<script>document.querySelectorAll(".badges img").forEach(img=>{let c=img.closest(".badge");if(c){if(img.complete)c.classList.add("loaded");else{img.onload=()=>{c.classList.add("loaded");};img.onerror=()=>{c.classList.add("failed");};}}});</script>
|
|
203
205
|
</section>
|
|
204
206
|
${
|
|
@@ -208,7 +210,7 @@ ${
|
|
|
208
210
|
${
|
|
209
211
|
intro
|
|
210
212
|
? `
|
|
211
|
-
<div class="
|
|
213
|
+
<div class="section-content">
|
|
212
214
|
${intro}
|
|
213
215
|
</div>
|
|
214
216
|
`
|
|
@@ -217,7 +219,7 @@ ${
|
|
|
217
219
|
${
|
|
218
220
|
features
|
|
219
221
|
? `
|
|
220
|
-
<div class="features">
|
|
222
|
+
<div class="features section-content">
|
|
221
223
|
<h2>Features</h2>
|
|
222
224
|
${features}
|
|
223
225
|
</div>
|
package/src/css/base.css
CHANGED
package/src/css/index.css
CHANGED
|
@@ -38,7 +38,7 @@ body {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
main {
|
|
41
|
-
--max-content-width:
|
|
41
|
+
--max-content-width: 36em;
|
|
42
42
|
--line-color: color(from var(--c0) srgb r g b / 0.1);
|
|
43
43
|
|
|
44
44
|
display: flex;
|
|
@@ -46,7 +46,7 @@ main {
|
|
|
46
46
|
align-items: flex-start;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
padding: 0;
|
|
49
|
-
margin:
|
|
49
|
+
margin: 0;
|
|
50
50
|
box-sizing: border-box;
|
|
51
51
|
}
|
|
52
52
|
@media (max-width: 840px) {
|
|
@@ -128,29 +128,42 @@ header {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
section {
|
|
131
|
+
width: 50%;
|
|
132
|
+
align-self: stretch;
|
|
133
|
+
padding: 0;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
}
|
|
136
|
+
section .section-content {
|
|
131
137
|
max-width: var(--max-content-width);
|
|
132
|
-
padding:
|
|
138
|
+
padding: 1em 3.5vw;
|
|
133
139
|
box-sizing: border-box;
|
|
134
140
|
}
|
|
135
|
-
section
|
|
141
|
+
section.intro-title {
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
section.intro-title .section-content {
|
|
136
145
|
display: flex;
|
|
137
146
|
flex-direction: column;
|
|
138
|
-
align-self: stretch;
|
|
139
147
|
justify-content: center;
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
section.intro-title {
|
|
143
|
-
text-align: center;
|
|
148
|
+
min-height: 95vh;
|
|
144
149
|
padding-top: 4em;
|
|
145
150
|
padding-bottom: 4em;
|
|
146
151
|
}
|
|
152
|
+
section.intro {
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
}
|
|
157
|
+
section.intro .section-content {
|
|
158
|
+
width: 100%;
|
|
159
|
+
}
|
|
147
160
|
@media (max-width: 840px) {
|
|
148
161
|
section {
|
|
149
162
|
width: auto;
|
|
150
163
|
max-width: 100%;
|
|
151
164
|
padding: var(--content-padding-y) var(--content-padding-x);
|
|
152
165
|
}
|
|
153
|
-
section
|
|
166
|
+
section.intro {
|
|
154
167
|
align-items: center;
|
|
155
168
|
border-left: none;
|
|
156
169
|
}
|