@t8/docsgen 0.2.14 → 0.2.15

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
@@ -405,21 +405,26 @@ async function getNav(ctx, navItems) {
405
405
  }
406
406
  }
407
407
  if ((!s || navItemCount < 2) && !navContent) return "";
408
- s = s.trim() ? `<section><ul>${s}
409
- </ul></section>` : "";
408
+ s = s.trim();
409
+ s = s ? `<p class="title">Contents</p>
410
+ <ul>${s}
411
+ </ul>
412
+ ` : "";
410
413
  let repoLink = getRepoLink(ctx);
411
- let refContent = "";
412
414
  if (repoLink || backstory)
413
- refContent = `
414
- <section class="ref">
415
- <ul>
416
- ${repoLink ? `<li>${repoLink}</li>` : ""}
417
- ${backstory ? `<li><a href="${backstory}">Backstory</a></li>` : ""}
418
- </ul>
419
- </section>
415
+ s += `
416
+ <p class="title">Resources</p>
417
+ <ul>
418
+ ${repoLink ? `<li>${repoLink}</li>` : ""}
419
+ ${backstory ? `<li><a href="${backstory}">Backstory</a></li>` : ""}
420
+ </ul>
420
421
  `;
422
+ s = s.trim();
423
+ s = s ? `<section>
424
+ ${s}
425
+ </section>` : "";
421
426
  return `<nav class="b1">
422
- ${s}${refContent}
427
+ ${s}
423
428
  ${navContent}
424
429
  </nav>`;
425
430
  }
@@ -47,9 +47,6 @@ footer {
47
47
  .body > nav section + section {
48
48
  border-top: 0.05rem solid;
49
49
  }
50
- .body > nav section.related {
51
- border-top: 0.15rem double;
52
- }
53
50
  .body > nav h2,
54
51
  .body > nav p.title {
55
52
  font-size: 0.7rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "bin": {
package/src/bin/getNav.ts CHANGED
@@ -64,20 +64,22 @@ export async function getNav(ctx: Context, navItems: NavItem[]) {
64
64
 
65
65
  if ((!s || navItemCount < 2) && !navContent) return "";
66
66
 
67
- s = s.trim() ? `<section><ul>${s}\n</ul></section>` : "";
67
+ s = s.trim();
68
+ s = s ? `<p class="title">Contents</p>\n<ul>${s}\n</ul>\n` : "";
68
69
 
69
70
  let repoLink = getRepoLink(ctx);
70
- let refContent = "";
71
71
 
72
72
  if (repoLink || backstory)
73
- refContent = `
74
- <section class="ref">
75
- <ul>
76
- ${repoLink ? `<li>${repoLink}</li>` : ""}
77
- ${backstory ? `<li><a href="${backstory}">Backstory</a></li>` : ""}
78
- </ul>
79
- </section>
73
+ s += `
74
+ <p class="title">Resources</p>
75
+ <ul>
76
+ ${repoLink ? `<li>${repoLink}</li>` : ""}
77
+ ${backstory ? `<li><a href="${backstory}">Backstory</a></li>` : ""}
78
+ </ul>
80
79
  `;
81
80
 
82
- return `<nav class="b1">\n${s}${refContent}\n${navContent}\n</nav>`;
81
+ s = s.trim();
82
+ s = s ? `<section>\n${s}\n</section>` : "";
83
+
84
+ return `<nav class="b1">\n${s}\n${navContent}\n</nav>`;
83
85
  }
@@ -47,9 +47,6 @@ footer {
47
47
  .body > nav section + section {
48
48
  border-top: 0.05rem solid;
49
49
  }
50
- .body > nav section.related {
51
- border-top: 0.15rem double;
52
- }
53
50
  .body > nav h2,
54
51
  .body > nav p.title {
55
52
  font-size: 0.7rem;