mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 02:59:03 +01:00
fix(export/share): favicon working only on top-level
This commit is contained in:
parent
2a1ecdbdca
commit
88d90fdedd
@ -81,6 +81,7 @@ export function renderNoteForExport(note: BNote, parentBranch: BBranch, basePath
|
||||
`${basePath}assets/scripts.js`
|
||||
],
|
||||
logoUrl: `${basePath}icon-color.svg`,
|
||||
faviconUrl: `${basePath}favicon.ico`,
|
||||
ancestors,
|
||||
isStatic: true
|
||||
});
|
||||
@ -128,7 +129,8 @@ export function renderNoteContent(note: SNote) {
|
||||
jsToLoad,
|
||||
logoUrl,
|
||||
ancestors,
|
||||
isStatic: false
|
||||
isStatic: false,
|
||||
faviconUrl: note.hasRelation("shareFavicon") ? `api/notes/${note.getRelationValue("shareFavicon")}/download` : `../favicon.ico`
|
||||
});
|
||||
}
|
||||
|
||||
@ -140,6 +142,7 @@ interface RenderArgs {
|
||||
logoUrl: string;
|
||||
ancestors: string[];
|
||||
isStatic: boolean;
|
||||
faviconUrl: string;
|
||||
}
|
||||
|
||||
function renderNoteContentInternal(note: SNote | BNote, renderArgs: RenderArgs) {
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="shortcut icon" href="<% if (note.hasRelation("shareFavicon")) { %>api/notes/<%= note.getRelation("shareFavicon").value %>/download<% } else { %>../favicon.ico<% } %>">
|
||||
<link rel="shortcut icon" href="<%= faviconUrl %>">
|
||||
<% for (const url of cssToLoad) { %>
|
||||
<link href="<%= url %>" rel="stylesheet">
|
||||
<% } %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user