2021-10-19 22:48:38 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
2022-08-17 15:18:34 -04:00
<% if (note.hasLabel("shareDescription")) { %>
<meta name="description" content="<%= note.getLabelValue("shareDescription") %>">
<% } %>
2022-04-16 00:02:24 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1">
2022-01-01 13:23:09 +01:00
<% if (note.hasRelation("shareFavicon")) { %>
<link rel="shortcut icon" href="api/notes/<%= note.getRelation("shareFavicon").value %>/download">
<% } else { %>
2021-10-19 22:48:38 +02:00
<link rel="shortcut icon" href="../favicon.ico">
2022-01-01 13:23:09 +01:00
<% } %>
2022-10-26 23:50:54 +02:00
<script src="../<%= assetPath %>/app/share.js"></script>
2021-12-22 11:43:21 +01:00
<% if (!note.hasLabel("shareOmitDefaultCss")) { %>
2022-10-26 23:50:54 +02:00
<link href="../<%= assetPath %>/libraries/normalize.min.css" rel="stylesheet">
<link href="../<%= assetPath %>/stylesheets/share.css" rel="stylesheet">
2021-12-22 11:43:21 +01:00
<% } %>
2021-10-19 22:48:38 +02:00
<% if (note.type === 'text' || note.type === 'book') { %>
2022-10-26 23:50:54 +02:00
<link href="../<%= assetPath %>/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
2021-10-19 22:48:38 +02:00
<% } %>
2021-12-22 09:36:38 +01:00
<% for (const cssRelation of note.getRelations("shareCss")) { %>
2021-12-27 20:48:14 +01:00
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
2021-12-22 09:36:38 +01:00
<% } %>
2022-01-01 13:23:09 +01:00
<% for (const jsRelation of note.getRelations("shareJs")) { %>
2022-01-01 22:32:38 +01:00
<script type="module" src="api/notes/<%= jsRelation.value %>/download"></script>
2022-01-01 13:23:09 +01:00
<% } %>
2022-03-22 23:17:47 +01:00
<% if (note.hasLabel('shareDisallowRobotIndexing')) { %>
<meta name="robots" content="noindex,follow" />
<% } %>
2021-12-27 20:48:14 +01:00
<%- header %>
2021-10-19 22:48:38 +02:00
<title><%= note.title %></title>
</head>
2022-01-01 13:23:09 +01:00
<body data-note-id="<%= note.noteId %>">
2021-12-27 20:48:14 +01:00
<div id="layout">
<div id="main">
2022-12-21 16:11:00 +01:00
<% if (note.parents[0].noteId !== '_share' && note.parents.length !== 0) { %>
2021-12-28 13:57:37 +01:00
<nav id="parentLink">
2022-01-09 09:04:21 +01:00
parent: <a href="<%= note.parents[0].shareId %>"
2022-01-01 13:23:09 +01:00
class="type-<%= note.parents[0].type %>"><%= note.parents[0].title %></a>
2021-12-27 12:27:00 +00:00
</nav>
2021-12-27 20:48:14 +01:00
<% } %>
2021-12-28 13:40:51 +01:00
2021-12-27 20:48:14 +01:00
<h1 id="title"><%= note.title %></h1>
2021-10-19 22:48:38 +02:00
2022-01-02 22:43:00 +01:00
<% if (note.hasLabel("pageUrl")) { %>
<div id="noteClippedFrom">This note was originally clipped from <a href="<%= note.getLabelValue("pageUrl") %>"><%= note.getLabelValue("pageUrl") %></a></div>
<% } %>
2022-01-09 09:12:21 +01:00
<% if (!isEmpty) { %>
2021-12-28 13:40:51 +01:00
<div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %>">
2021-12-21 22:01:06 +01:00
<%- content %>
2021-10-19 22:48:38 +02:00
</div>
2021-12-27 20:48:14 +01:00
<% } %>
2022-02-16 22:16:15 +01:00
<% if (note.hasVisibleChildren()) { %>
2021-12-28 13:57:37 +01:00
<nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>">
2021-12-27 20:48:14 +01:00
<% if (!isEmpty) { %>
2022-01-09 09:12:21 +01:00
<hr>
2021-12-27 20:48:14 +01:00
<span>Child notes: </span>
<% } %>
2022-01-09 09:12:21 +01:00
<ul>
2022-02-16 22:16:15 +01:00
<% for (const childNote of note.getVisibleChildNotes()) { %>
2022-01-09 09:12:21 +01:00
<li>
<a href="<%= childNote.shareId %>"
class="type-<%= childNote.type %>"><%= childNote.title %></a>
</li>
<% } %>
</ul>
2021-12-27 20:48:14 +01:00
</nav>
2022-01-09 09:12:21 +01:00
<% } else if (isEmpty) { %>
<p>This note has no content.</p>
2021-12-27 20:48:14 +01:00
<% } %>
</div>
2021-12-21 22:01:06 +01:00
2022-02-16 22:16:15 +01:00
<% if (subRoot.hasVisibleChildren()) { %>
2021-12-28 13:57:37 +01:00
<button id="toggleMenuButton"></button>
2021-12-21 22:01:06 +01:00
2021-12-22 11:43:21 +01:00
<nav id="menu">
<%- include('tree_item', {note: subRoot, activeNote: note}) %>
</nav>
2021-12-27 20:48:14 +01:00
<% } %>
</div>
2021-10-19 22:48:38 +02:00
</body>
</html>