Slightly adjust page template

This commit is contained in:
Zack Rauen 2023-09-27 22:54:13 -04:00
parent 1a40658345
commit a7edc5e03e
3 changed files with 29 additions and 14 deletions

View File

@ -33,7 +33,7 @@ async function sendTemplates() {
}
if (process.argv.includes("--only-templates")) {
sendTemplates().catch(console.error);
await sendTemplates();
process.exit(0);
}

View File

@ -24,7 +24,7 @@
document.addEventListener("DOMContentLoaded", function() {
SwaggerUIBundle({
url: `<%= note.getLabelValue("shareSwagger") %>`,
domNode: "#content"
dom_id: "#content"
});
});
</script>
@ -43,6 +43,23 @@
<% } %>
<%- header %>
<title><%= note.title %><% if (note.noteId !== subRoot.noteId) { %> - <%= subRoot.title %><% } %></title>
<!-- HTML Meta Tags -->
<meta name="description" content="A website for guides, reference, showcase, inspiration, and more, all for Trilium Notes! Not convinced? Come see for yourself just what Trilium can do."
><!-- Facebook Meta Tags -->
<meta property="og:url" content="https://trilium.rocks/">
<meta property="og:type" content="website">
<meta property="og:title" content="<%= note.title %><% if (note.noteId !== subRoot.noteId) { %> - <%= subRoot.title %><% } %>">
<meta property="og:description" content="<%= note.getLabelValue("shareDescription") %>">
<meta property="og:image" content="https://github.com/zadam/trilium/wiki/images/screenshot.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="trilium.rocks">
<meta property="twitter:url" content="https://trilium.rocks/">
<meta name="twitter:title" content="<%= note.title %><% if (note.noteId !== subRoot.noteId) { %> - <%= subRoot.title %><% } %>">
<meta name="twitter:description" content="<%= note.getLabelValue("shareDescription") %>">
<meta name="twitter:image" content="https://github.com/zadam/trilium/wiki/images/screenshot.png">
<!-- Meta Tags Generated via https://opengraph.dev -->
<meta name="theme-color" content="#4FA52B">
</head>
<%
const currentTheme = note.getLabel("shareTheme") === "light" ? "light" : "dark";
@ -97,12 +114,15 @@ const themeClass = currentTheme === "light" ? " theme-light" : " theme-dark";
<div id="noteClippedFrom">This note was originally clipped from <a href="<%= note.getLabelValue("pageUrl") %>"><%= note.getLabelValue("pageUrl") %></a></div>
<% } %>
<% if (!isEmpty) { %>
<div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %>">
<div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %><% if (isEmpty) { %> no-content<% } %>">
<h1 id="title"><%= note.title %></h1>
<% if (isEmpty && !note.hasVisibleChildren()) { %>
<p>This note has no content.</p>
<% } else { %>
<%- content %>
</div>
<% } %>
</div>
<% if (note.hasVisibleChildren()) { %>
<nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>">
@ -119,12 +139,7 @@ const themeClass = currentTheme === "light" ? " theme-light" : " theme-dark";
<% } %>
</ul>
</nav>
<% } else if (isEmpty) { %>
<div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %>">
<h1 id="title"><%= note.title %></h1>
<p>This note has no content.</p>
</div>
<% } %>
<% } else %>
</div>
</div>
</div>

View File

@ -7,7 +7,7 @@
"resolveJsonModule": true,
"strictNullChecks": true,
"moduleResolution": "Node16",
"target": "ES2021",
"target": "ES2022",
"rootDir": "src",
"outDir": "lib/cjs",
"module": "Node16"