From a7edc5e03ef99ffb2cc29904389266da2dc0b11d Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Wed, 27 Sep 2023 22:54:13 -0400 Subject: [PATCH] Slightly adjust page template --- scripts/build.ts | 2 +- src/templates/page.ejs | 39 +++++++++++++++++++++++++++------------ tsconfig.json | 2 +- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/scripts/build.ts b/scripts/build.ts index d8fea2d7a..a4f3c39b0 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -33,7 +33,7 @@ async function sendTemplates() { } if (process.argv.includes("--only-templates")) { - sendTemplates().catch(console.error); + await sendTemplates(); process.exit(0); } diff --git a/src/templates/page.ejs b/src/templates/page.ejs index 5abba1535..fcf619044 100644 --- a/src/templates/page.ejs +++ b/src/templates/page.ejs @@ -24,7 +24,7 @@ document.addEventListener("DOMContentLoaded", function() { SwaggerUIBundle({ url: `<%= note.getLabelValue("shareSwagger") %>`, - domNode: "#content" + dom_id: "#content" }); }); @@ -43,6 +43,23 @@ <% } %> <%- header %> <%= note.title %><% if (note.noteId !== subRoot.noteId) { %> - <%= subRoot.title %><% } %> + + + + + + "> + + + + + + + "> + + + <% const currentTheme = note.getLabel("shareTheme") === "light" ? "light" : "dark"; @@ -97,12 +114,15 @@ const themeClass = currentTheme === "light" ? " theme-light" : " theme-dark";
This note was originally clipped from "><%= note.getLabelValue("pageUrl") %>
<% } %> - <% if (!isEmpty) { %> -
-

<%= note.title %>

+ +
+

<%= note.title %>

+ <% if (isEmpty && !note.hasVisibleChildren()) { %> +

This note has no content.

+ <% } else { %> <%- content %> -
- <% } %> + <% } %> +
<% if (note.hasVisibleChildren()) { %> - <% } else if (isEmpty) { %> -
-

<%= note.title %>

-

This note has no content.

-
- <% } %> + <% } else %> diff --git a/tsconfig.json b/tsconfig.json index ef08e0c07..ac91e669c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "resolveJsonModule": true, "strictNullChecks": true, "moduleResolution": "Node16", - "target": "ES2021", + "target": "ES2022", "rootDir": "src", "outDir": "lib/cjs", "module": "Node16"