mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
Slightly adjust page template
This commit is contained in:
parent
1a40658345
commit
a7edc5e03e
@ -33,7 +33,7 @@ async function sendTemplates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process.argv.includes("--only-templates")) {
|
if (process.argv.includes("--only-templates")) {
|
||||||
sendTemplates().catch(console.error);
|
await sendTemplates();
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
SwaggerUIBundle({
|
SwaggerUIBundle({
|
||||||
url: `<%= note.getLabelValue("shareSwagger") %>`,
|
url: `<%= note.getLabelValue("shareSwagger") %>`,
|
||||||
domNode: "#content"
|
dom_id: "#content"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -43,6 +43,23 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<%- header %>
|
<%- header %>
|
||||||
<title><%= note.title %><% if (note.noteId !== subRoot.noteId) { %> - <%= subRoot.title %><% } %></title>
|
<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>
|
</head>
|
||||||
<%
|
<%
|
||||||
const currentTheme = note.getLabel("shareTheme") === "light" ? "light" : "dark";
|
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>
|
<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>
|
<h1 id="title"><%= note.title %></h1>
|
||||||
|
<% if (isEmpty && !note.hasVisibleChildren()) { %>
|
||||||
|
<p>This note has no content.</p>
|
||||||
|
<% } else { %>
|
||||||
<%- content %>
|
<%- content %>
|
||||||
</div>
|
<% } %>
|
||||||
<% } %>
|
</div>
|
||||||
|
|
||||||
<% if (note.hasVisibleChildren()) { %>
|
<% if (note.hasVisibleChildren()) { %>
|
||||||
<nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>">
|
<nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>">
|
||||||
@ -119,12 +139,7 @@ const themeClass = currentTheme === "light" ? " theme-light" : " theme-dark";
|
|||||||
<% } %>
|
<% } %>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<% } else if (isEmpty) { %>
|
<% } else %>
|
||||||
<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>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"moduleResolution": "Node16",
|
"moduleResolution": "Node16",
|
||||||
"target": "ES2021",
|
"target": "ES2022",
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "lib/cjs",
|
"outDir": "lib/cjs",
|
||||||
"module": "Node16"
|
"module": "Node16"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user