mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00

* Add clientside mermaid chart rendering Merry Christmas :) * Add katex math rendering client-side * Update page.ejs * Revert (wrong branch) * Add children nodes to all notes under hr * Add parent note button * Add note type in child note info * Fix parent, relative paths * Add code rendering, fix space in HTML class
53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="shortcut icon" href="../favicon.ico">
|
|
<% if (!note.hasLabel("shareOmitDefaultCss")) { %>
|
|
<link href="../libraries/normalize.min.css" rel="stylesheet">
|
|
<link href="../stylesheets/share.css" rel="stylesheet">
|
|
<% } %>
|
|
<% if (note.type === 'text' || note.type === 'book') { %>
|
|
<link href="../libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
|
|
<% } %>
|
|
<% for (const cssRelation of note.getRelations("shareCss")) { %>
|
|
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
|
|
<% } %>
|
|
<title><%= note.title %></title>
|
|
</head>
|
|
<body>
|
|
<div id="layout">
|
|
<div id="main">
|
|
<br>
|
|
<% if (note.parents[0].noteId !== 'share' && note.parents.length != 0) { %>
|
|
<nav class="parent-link">
|
|
<a href="<%= note.parents[0].noteId %>">< Parent note (<%= note.parents[0].title %>)</a>
|
|
</nav>
|
|
<% } %>
|
|
<h1 id="title"><%= note.title %></h1>
|
|
|
|
<div id="content" class="note-<%= note.type %><% if (note.type === 'text') { %>ck-content<% } %>">
|
|
<%- content %>
|
|
</div>
|
|
</div>
|
|
|
|
<% if (subRoot.hasChildren()) { %>
|
|
<button id="menuButton"></button>
|
|
|
|
<nav id="menu">
|
|
<%- include('tree_item', {note: subRoot, activeNote: note}) %>
|
|
</nav>
|
|
<% } %>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
const menuButton = document.getElementById('menuButton');
|
|
const layout = document.getElementById('layout');
|
|
|
|
menuButton.addEventListener('click', () => layout.classList.toggle('navMenu'));
|
|
}());
|
|
</script>
|
|
</body>
|
|
</html>
|