mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
less hacky way to implement distraction free mode which also fixes scrollbar
This commit is contained in:
parent
7880cf62fe
commit
3035a948b9
@ -85,12 +85,7 @@ function registerEntrypoints() {
|
|||||||
|
|
||||||
utils.bindShortcut('alt+m', e => {
|
utils.bindShortcut('alt+m', e => {
|
||||||
$(".hide-toggle").toggle();
|
$(".hide-toggle").toggle();
|
||||||
|
$("#container").toggleClass("distraction-free-mode");
|
||||||
const $container = $("#container");
|
|
||||||
// when hiding switch display to block, otherwise grid still tries to display columns which shows
|
|
||||||
// left empty column
|
|
||||||
$container.css("display", $container.css("display") === "grid" ? "block" : "grid");
|
|
||||||
$container.toggleClass("distraction-free-mode");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// hide (toggle) everything except for the note content for distraction free writing
|
// hide (toggle) everything except for the note content for distraction free writing
|
||||||
|
@ -18,6 +18,16 @@ body {
|
|||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#container.distraction-free-mode {
|
||||||
|
grid-template-areas:
|
||||||
|
"title"
|
||||||
|
"note-detail" !important;
|
||||||
|
grid-template-rows: auto
|
||||||
|
auto
|
||||||
|
!important;
|
||||||
|
grid-template-columns: 1fr !important;
|
||||||
|
}
|
||||||
|
|
||||||
#search-box {
|
#search-box {
|
||||||
display: none;
|
display: none;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -450,20 +450,6 @@ div.ui-tooltip {
|
|||||||
border: 1px solid var(--main-border-color);
|
border: 1px solid var(--main-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* .electron-in-page-search-window is a class specified to default
|
|
||||||
* <webview> element for search window.
|
|
||||||
*/
|
|
||||||
.electron-in-page-search-window {
|
|
||||||
position: fixed;
|
|
||||||
top: 45px;
|
|
||||||
right: 10px;
|
|
||||||
width: 360px;
|
|
||||||
height: 55px;
|
|
||||||
display: none;
|
|
||||||
z-index: 1001;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* .search-inactive is added to search window <webview> when the window
|
* .search-inactive is added to search window <webview> when the window
|
||||||
* is inactive.
|
* is inactive.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user