mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
25 lines
817 B
Plaintext
25 lines
817 B
Plaintext
<%
|
|
const isExternalLink = note.hasLabel('shareExternalLink');
|
|
const linkHref = isExternalLink ? note.getLabelValue('shareExternalLink') : `./${note.shareId}`;
|
|
const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : '';
|
|
%>
|
|
<p>
|
|
<% const titleWithPrefix = (branch.prefix ? `${branch.prefix} - ` : '') + note.title; %>
|
|
|
|
<% if (activeNote.noteId === note.noteId) { %>
|
|
<strong><%= titleWithPrefix %></strong>
|
|
<% } else { %>
|
|
<a class="type-<%= note.type %>" href="<%= linkHref %>"<%= target %>><%= titleWithPrefix %></a>
|
|
<% } %>
|
|
</p>
|
|
|
|
<% if (note.hasChildren()) { %>
|
|
<ul>
|
|
<% note.getVisibleChildBranches().forEach(function (branch) { %>
|
|
<li>
|
|
<%- include('tree_item', {branch: branch, note: branch.getNote()}) %>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
<% } %>
|