mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	title row spacing
This commit is contained in:
		
							parent
							
								
									368d0c55da
								
							
						
					
					
						commit
						d71763aedb
					
				@ -12,6 +12,8 @@ export default class FlexContainer extends BasicWidget {
 | 
			
		||||
            style: `display: flex; flex-direction: ${direction};`,
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        this.classes = [];
 | 
			
		||||
 | 
			
		||||
        this.children = [];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -20,6 +22,11 @@ export default class FlexContainer extends BasicWidget {
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    class(className) {
 | 
			
		||||
        this.classes.push(className);
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    css(name, value) {
 | 
			
		||||
        this.attrs.style += `${name}: ${value};`;
 | 
			
		||||
        return this;
 | 
			
		||||
@ -46,6 +53,10 @@ export default class FlexContainer extends BasicWidget {
 | 
			
		||||
            this.$widget.attr(key, this.attrs[key]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (const className of this.classes) {
 | 
			
		||||
            this.$widget.addClass(className);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (const widget of this.children) {
 | 
			
		||||
            this.$widget.append(widget.render());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,8 @@ export default class Layout {
 | 
			
		||||
                    .child(new NoteTreeWidget())
 | 
			
		||||
                )
 | 
			
		||||
                .child(new FlexContainer('column').id('center-pane')
 | 
			
		||||
                    .child(new FlexContainer('row')
 | 
			
		||||
                    .child(new FlexContainer('row').class('title-row')
 | 
			
		||||
                        .cssBlock('.title-row > * { margin: 5px; }')
 | 
			
		||||
                        .child(new TabCachingWidget(() => new NotePathsWidget()))
 | 
			
		||||
                        .child(new NoteTitleWidget())
 | 
			
		||||
                        .child(new RunScriptButtonsWidget())
 | 
			
		||||
 | 
			
		||||
@ -66,7 +66,8 @@ export default class StandardTopWidget extends BasicWidget {
 | 
			
		||||
    doRender() {
 | 
			
		||||
        this.$widget = $(TPL);
 | 
			
		||||
 | 
			
		||||
        const historyNavigationWidget = new HistoryNavigationWidget(this);
 | 
			
		||||
        const historyNavigationWidget = new HistoryNavigationWidget();
 | 
			
		||||
        this.child(historyNavigationWidget);
 | 
			
		||||
 | 
			
		||||
        this.$widget.prepend(historyNavigationWidget.render());
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user