@t8/docsgen 0.1.67 → 0.1.69

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
@@ -531,6 +531,7 @@ async function getParsedContent(ctx) {
531
531
  let badges = [];
532
532
  let title = "";
533
533
  let description = [];
534
+ let descriptionNote = [];
534
535
  let intro = [];
535
536
  let features = [];
536
537
  let note = [];
@@ -583,10 +584,15 @@ async function getParsedContent(ctx) {
583
584
  description = [];
584
585
  }
585
586
  if (intro.at(-1) === "<hr>") intro.pop();
587
+ if (intro.length === 1) {
588
+ descriptionNote = intro;
589
+ intro = [];
590
+ }
586
591
  return {
587
592
  badges: postprocessBadges(joinLines(badges)),
588
593
  title,
589
594
  description: joinLines(description),
595
+ descriptionNote: joinLines(descriptionNote),
590
596
  intro: joinLines(intro),
591
597
  features: joinLines(features),
592
598
  note: joinLines(note),
@@ -678,7 +684,16 @@ ${getInjectedContent(ctx, "redirect", "body")}
678
684
  );
679
685
  return;
680
686
  }
681
- let { badges, description, intro, features, installation, sections, nav } = await getParsedContent(ctx);
687
+ let {
688
+ badges,
689
+ description,
690
+ descriptionNote,
691
+ intro,
692
+ features,
693
+ installation,
694
+ sections,
695
+ nav
696
+ } = await getParsedContent(ctx);
682
697
  let navContent = await getNav(ctx, nav);
683
698
  let dirs = [contentDir];
684
699
  await Promise.all(
@@ -772,6 +787,7 @@ ${getInjectedContent(ctx, "section", "body")}
772
787
  <h1>${getTitle(ctx, { cover: true })}</h1>
773
788
  <div class="description">
774
789
  ${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
790
+ ${descriptionNote}
775
791
  </div>
776
792
  <p class="actions">
777
793
  <a href="${root}start" class="primary button">Docs</a>
package/dist/css/base.css CHANGED
@@ -167,9 +167,6 @@ footer {
167
167
  main {
168
168
  box-sizing: border-box;
169
169
  }
170
- main h2:first-child {
171
- margin-top: 0;
172
- }
173
170
  main ul {
174
171
  padding: 0;
175
172
  padding-inline-start: 1.5em;
@@ -171,21 +171,23 @@ section.intro .section-content {
171
171
  }
172
172
  section .section-content {
173
173
  max-width: auto;
174
- padding: var(--content-padding-y) var(--content-padding-x);
174
+ padding: 1rem 1.35rem;
175
+ }
176
+ section.intro-title .section-content {
177
+ min-height: 60vh;
178
+ padding-top: 2rem;
179
+ padding-bottom: 1.5rem;
180
+ }
181
+ section.intro-title:last-child .section-content {
182
+ padding-bottom: 2.5rem;
175
183
  }
176
184
  section.intro {
177
185
  flex: auto;
178
186
  justify-content: flex-start;
179
187
  align-items: center;
180
- padding-top: 0.5em;
181
- }
182
- section.intro-title .section-content {
183
- min-height: auto;
184
- padding-top: 2em;
185
- padding-bottom: 0;
186
188
  }
187
- section.intro-title:last-child .section-content {
188
- padding-bottom: 2.5em;
189
+ section.intro .section-content {
190
+ padding-top: 0.5rem;
189
191
  }
190
192
  }
191
193
  .features {
@@ -218,10 +220,6 @@ section.intro .section-content {
218
220
  border-top: 0.15em solid var(--line-color);
219
221
  }
220
222
  @media (max-width: 840px) {
221
- .features {
222
- padding: 0 0.5em;
223
- margin: 0;
224
- }
225
223
  .features h2 {
226
224
  text-align: center;
227
225
  }
@@ -142,6 +142,9 @@ main h2 {
142
142
  border-bottom: var(--hr-border);
143
143
  padding-bottom: 0.1em;
144
144
  }
145
+ main h2:first-child {
146
+ margin-top: 0;
147
+ }
145
148
 
146
149
  .pagenav {
147
150
  --icon-width: 1.25em;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "bin": {
@@ -132,6 +132,7 @@ export async function getParsedContent(ctx: Context) {
132
132
  let badges: string[] = [];
133
133
  let title = "";
134
134
  let description: string[] = [];
135
+ let descriptionNote: string[] = [];
135
136
  let intro: string[] = [];
136
137
  let features: string[] = [];
137
138
  let note: string[] = [];
@@ -203,10 +204,16 @@ export async function getParsedContent(ctx: Context) {
203
204
 
204
205
  if (intro.at(-1) === "<hr>") intro.pop();
205
206
 
207
+ if (intro.length === 1) {
208
+ descriptionNote = intro;
209
+ intro = [];
210
+ }
211
+
206
212
  return {
207
213
  badges: postprocessBadges(joinLines(badges)),
208
214
  title,
209
215
  description: joinLines(description),
216
+ descriptionNote: joinLines(descriptionNote),
210
217
  intro: joinLines(intro),
211
218
  features: joinLines(features),
212
219
  note: joinLines(note),
@@ -89,8 +89,16 @@ ${getInjectedContent(ctx, "redirect", "body")}
89
89
  return;
90
90
  }
91
91
 
92
- let { badges, description, intro, features, installation, sections, nav } =
93
- await getParsedContent(ctx);
92
+ let {
93
+ badges,
94
+ description,
95
+ descriptionNote,
96
+ intro,
97
+ features,
98
+ installation,
99
+ sections,
100
+ nav,
101
+ } = await getParsedContent(ctx);
94
102
 
95
103
  let navContent = await getNav(ctx, nav);
96
104
  let dirs = [contentDir];
@@ -192,6 +200,7 @@ ${getInjectedContent(ctx, "section", "body")}
192
200
  <h1>${getTitle(ctx, { cover: true })}</h1>
193
201
  <div class="description">
194
202
  ${description || (escapedPackageDescription ? `<p><em>${escapedPackageDescription}</em><p>` : "")}
203
+ ${descriptionNote}
195
204
  </div>
196
205
  <p class="actions">
197
206
  <a href="${root}start" class="primary button">Docs</a>
package/src/css/base.css CHANGED
@@ -167,9 +167,6 @@ footer {
167
167
  main {
168
168
  box-sizing: border-box;
169
169
  }
170
- main h2:first-child {
171
- margin-top: 0;
172
- }
173
170
  main ul {
174
171
  padding: 0;
175
172
  padding-inline-start: 1.5em;
package/src/css/index.css CHANGED
@@ -171,21 +171,23 @@ section.intro .section-content {
171
171
  }
172
172
  section .section-content {
173
173
  max-width: auto;
174
- padding: var(--content-padding-y) var(--content-padding-x);
174
+ padding: 1rem 1.35rem;
175
+ }
176
+ section.intro-title .section-content {
177
+ min-height: 60vh;
178
+ padding-top: 2rem;
179
+ padding-bottom: 1.5rem;
180
+ }
181
+ section.intro-title:last-child .section-content {
182
+ padding-bottom: 2.5rem;
175
183
  }
176
184
  section.intro {
177
185
  flex: auto;
178
186
  justify-content: flex-start;
179
187
  align-items: center;
180
- padding-top: 0.5em;
181
- }
182
- section.intro-title .section-content {
183
- min-height: auto;
184
- padding-top: 2em;
185
- padding-bottom: 0;
186
188
  }
187
- section.intro-title:last-child .section-content {
188
- padding-bottom: 2.5em;
189
+ section.intro .section-content {
190
+ padding-top: 0.5rem;
189
191
  }
190
192
  }
191
193
  .features {
@@ -218,10 +220,6 @@ section.intro .section-content {
218
220
  border-top: 0.15em solid var(--line-color);
219
221
  }
220
222
  @media (max-width: 840px) {
221
- .features {
222
- padding: 0 0.5em;
223
- margin: 0;
224
- }
225
223
  .features h2 {
226
224
  text-align: center;
227
225
  }
@@ -142,6 +142,9 @@ main h2 {
142
142
  border-bottom: var(--hr-border);
143
143
  padding-bottom: 0.1em;
144
144
  }
145
+ main h2:first-child {
146
+ margin-top: 0;
147
+ }
145
148
 
146
149
  .pagenav {
147
150
  --icon-width: 1.25em;