mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
layout fixes
This commit is contained in:
parent
fb31acc8e0
commit
2220c4491b
@ -4,33 +4,33 @@ import froca from "./froca.js";
|
||||
import attributeRenderer from "./attribute_renderer.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-list-widget">
|
||||
<div class="note-list">
|
||||
<style>
|
||||
.note-list-widget {
|
||||
.note-list {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.note-list-widget.grid-view .note-list-widget-container {
|
||||
.note-list.grid-view .note-list-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.note-list-widget.grid-view .note-book-card {
|
||||
.note-list.grid-view .note-book-card {
|
||||
flex-basis: 300px;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.note-list-widget.grid-view .note-expander {
|
||||
.note-list.grid-view .note-expander {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-list-widget.grid-view .note-book-card {
|
||||
.note-list.grid-view .note-book-card {
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.note-list-widget.grid-view .note-book-card:hover {
|
||||
.note-list.grid-view .note-book-card:hover {
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--main-border-color);
|
||||
background: var(--more-accented-background-color);
|
||||
@ -198,7 +198,7 @@ class NoteListRenderer {
|
||||
|
||||
this.$noteList.show();
|
||||
|
||||
const $container = this.$noteList.find('.note-list-widget-container').empty();
|
||||
const $container = this.$noteList.find('.note-list-container').empty();
|
||||
|
||||
const startIdx = (this.page - 1) * this.pageSize;
|
||||
const endIdx = startIdx + this.pageSize;
|
||||
|
@ -75,6 +75,7 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
|
||||
this.$widget.on("dragover", e => e.preventDefault());
|
||||
|
||||
|
@ -31,6 +31,7 @@ export default class NoteListWidget extends NoteContextAwareWidget {
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
this.$content = this.$widget.find('.note-list-widget-content');
|
||||
|
||||
const observer = new IntersectionObserver(entries => {
|
||||
|
@ -4,6 +4,12 @@ export default class TypeWidget extends NoteContextAwareWidget {
|
||||
// for overriding
|
||||
static getType() {}
|
||||
|
||||
doRender() {
|
||||
this.contentSized();
|
||||
|
||||
return super.doRender();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {NoteShort} note
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user