mirror of
https://github.com/zadam/trilium.git
synced 2025-02-01 12:00:17 +08:00
update styles, fix share view
This commit is contained in:
parent
6bdaf050c5
commit
4e4010e15e
3 changed files with 18 additions and 20 deletions
|
@ -99,13 +99,15 @@ const TPL = `
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
.note-book-content.type-image img {
|
||||
.note-book-content.type-image img, .note-book-content.type-canvas-note svg {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.note-book-card.type-image .note-book-content img, .note-book-card.type-text .note-book-content img {
|
||||
.note-book-card.type-image .note-book-content img,
|
||||
.note-book-card.type-text .note-book-content img,
|
||||
.note-book-card.type-canvas-note .note-book-content img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const TPL = `
|
|||
<div class="canvas-note-widget note-detail-canvas-note note-detail-printable note-detail">
|
||||
<style type="text/css">
|
||||
.excalidraw .App-menu_top .buttonList {
|
||||
/*display: flex;*/
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.excalidraw-wrapper {
|
||||
|
|
|
@ -90,32 +90,28 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
header += `<script src="../../node_modules/react-dom/umd/react-dom.production.min.js"></script>`;
|
||||
header += `<script src="../../node_modules/@excalidraw/excalidraw/dist/excalidraw.production.min.js"></script>`;
|
||||
header += `<style type="text/css">
|
||||
.excalidraw .App-menu_top .buttonList {
|
||||
/*display: flex;*/
|
||||
}
|
||||
|
||||
.excalidraw-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:root[dir="ltr"]
|
||||
.excalidraw
|
||||
.layer-ui__wrapper
|
||||
.zen-mode-transition.App-menu_bottom--transition-left {
|
||||
transform: none;
|
||||
}
|
||||
.excalidraw-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:root[dir="ltr"]
|
||||
.excalidraw
|
||||
.layer-ui__wrapper
|
||||
.zen-mode-transition.App-menu_bottom--transition-left {
|
||||
transform: none;
|
||||
}
|
||||
</style>`;
|
||||
|
||||
content = `
|
||||
content = `<div>
|
||||
<script>
|
||||
const {elements, appState, files} = JSON.parse(${JSON.stringify(content)});
|
||||
window.triliumExcalidraw = {elements, appState, files}
|
||||
</script>
|
||||
<div id="excalidraw-app"/>
|
||||
<div id="excalidraw-app">
|
||||
</div>
|
||||
<script src="../../libraries/excalidraw/canvas_note_share.js"></script>
|
||||
`;
|
||||
|
||||
</div>`;
|
||||
}
|
||||
else {
|
||||
content = '<p>This note type cannot be displayed.</p>';
|
||||
|
|
Loading…
Reference in a new issue