mirror of https://github.com/TriliumNext/Notes
show/hide switcher for the sidebar
parent
d29c5c4758
commit
15aaead7b9
@ -0,0 +1,28 @@
|
|||||||
|
let instance;
|
||||||
|
|
||||||
|
function setupSplitWithSidebar() {
|
||||||
|
if (instance) {
|
||||||
|
instance.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
instance = Split(['#left-pane', '#center-pane', '#right-pane'], {
|
||||||
|
sizes: [25, 50, 25],
|
||||||
|
gutterSize: 5
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupSplitWithoutSidebar() {
|
||||||
|
if (instance) {
|
||||||
|
instance.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
instance = Split(['#left-pane', '#center-pane'], {
|
||||||
|
sizes: [25, 75],
|
||||||
|
gutterSize: 5
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setupSplitWithSidebar,
|
||||||
|
setupSplitWithoutSidebar
|
||||||
|
};
|
||||||
@ -1,8 +1,6 @@
|
|||||||
<div id="right-pane" class="hide-in-zen-mode">
|
<button id="hide-sidebar-button" class="btn btn-sm icon-button bx bx-chevrons-right" title="Hide sidebar"></button>
|
||||||
<div style="text-align: center; margin-bottom: 5px;">
|
<button id="show-sidebar-button" class="btn btn-sm icon-button bx bx-chevrons-left" title="Show sidebar"></button>
|
||||||
<button class="hide-sidebar-button">hide sidebar <span class="bx bx-chevrons-right"></span></button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sidebar-container">
|
<div id="right-pane" class="hide-in-zen-mode">
|
||||||
</div>
|
<div id="sidebar-container"></div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue