Skip to content

Build your personal knowledge base with Trilium Notes

migrated desktop CSS to the desktop layout

zadam03e0c9806649
diff --git a/src/public/javascripts/widgets/note_info.js b/src/public/javascripts/widgets/note_info.js
index cf0fa5dd0e..754d90cfc3 100644
--- a/src/public/javascripts/widgets/note_info.js
+++ b/src/public/javascripts/widgets/note_info.js
@@ -11,6 +11,13 @@ const TPL = `
.note-info-widget-table td, .note-info-widget-table th {
padding: 5px;
}
+
+ .note-info-mime {
+ max-width: 13em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
</style>
<tr>
diff --git a/src/public/javascripts/widgets/note_tree.js b/src/public/javascripts/widgets/note_tree.js
index e269b14959..c22854532f 100644
--- a/src/public/javascripts/widgets/note_tree.js
+++ b/src/public/javascripts/widgets/note_tree.js
@@ -28,6 +28,19 @@ const TPL = `
font-family: var(--tree-font-family);
font-size: var(--tree-font-size);
}
+
+ .refresh-search-button {
+ cursor: pointer;
+ position: relative;
+ top: -1px;
+ border: 1px solid transparent;
+ padding: 2px;
+ border-radius: 2px;
+ }
+
+ .refresh-search-button:hover {
+ border-color: var(--button-border-color);
+ }
</style>
</div>
`;
diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.css
deleted file mode 100644
index 9a17e219cc..0000000000
--- a/src/public/stylesheets/desktop.css
+++ /dev/null
@@ -1,171 +0,0 @@
-body {
- font-size: var(--main-font-size);
-}
-
-#container {
- margin: 0 auto; /* center */
- height: 100vh;
-
- display: flex;
- flex-direction: column;
-}
-
-#tab-pane {
- display: flex;
-}
-
-.hidden-by-zen-mode {
- display: none !important;
-}
-
-.gutter {
- background: linear-gradient(to bottom, transparent, var(--accented-background-color), transparent);
-}
-
-.gutter:hover {
- background: linear-gradient(to bottom, transparent, var(--main-border-color), transparent);
-}
-
-.gutter.gutter-horizontal {
- cursor: col-resize;
-}
-
-.gutter.gutter-vertical {
- cursor: row-resize;
-}
-
-#center-pane {
- display: flex;
- flex-direction: column;
-}
-
-#note-tab-container {
- min-height: 0;
- padding-left: 10px;
- width: 100%;
- height: 100%;
-}
-
-.dropdown-menu {
- font-size: inherit;
-}
-
-#context-menu-container {
- max-height: 100vh;
- /* !!! Cannot set overflow: auto, submenus will break !!! */
-}
-
-#context-menu-container, #context-menu-container .dropdown-menu {
- padding: 3px 0 0;
- z-index: 1111;
-}
-
-#context-menu-container .dropdown-item {
- padding: 0 7px 0 10px;
- cursor: pointer;
-}
-
-li.dropdown-submenu:hover > ul.dropdown-menu {
- display: block;
-}
-
-.dropdown-submenu {
- position:relative;
-}
-
-.dropdown-submenu > .dropdown-menu {
- top: 0;
- left: 100%;
- margin-top: -6px;
- min-width: 15rem;
-}
-
-/* rotate caret on hover */
-.dropdown-menu > li > a:hover:after {
- text-decoration: underline;
- transform: rotate(-90deg);
-}
-
-.fancytree-loading span.fancytree-expander {
- width: 16px;
- height: 16px;
- margin-left: 2px;
-}
-
-.fancytree-loading span.fancytree-expander:after {
- width: 12px;
- height: 12px;
- margin-top: 4px;
- margin-left: 1px;
- border-width: 1px;
- border-style: solid;
-}
-
-body {
- /* FF basic styling */
- scrollbar-color: var(--active-item-background-color) var(--main-background-color);
-}
-
-::-webkit-scrollbar {
- width: 12px;
-}
-
-::-webkit-scrollbar-thumb {
- border-radius: 3px;
- border: 1px solid var(--scrollbar-border-color);
-}
-
-::-webkit-scrollbar-corner {
- background-color: inherit;
-}
-
-#note-info-table td, #note-info-table th {
- padding: 15px;
-}
-
-[data-toggle="tooltip"] span {
- padding-bottom: 0;
- border-bottom: 1px dotted;
-}
-
-.refresh-search-button {
- cursor: pointer;
- position: relative;
- top: -1px;
- border: 1px solid transparent;
- padding: 2px;
- border-radius: 2px;
-}
-
-.refresh-search-button:hover {
- border-color: var(--button-border-color);
-}
-
-#widgets-configuration {
- margin: 0;
-}
-
-#widgets-configuration h5 {
- text-align: center;
-}
-
-#widgets-configuration .list-group-item {
- background: var(--accented-background-color);
- font-size: larger;
- display: flex;
- justify-content: space-between;
- padding-bottom: 2px;
- border-radius: 10px;
-}
-
-#widgets-configuration .handle {
- margin-right: 20px;
- display: inline-block;
-}
-
-.note-info-mime {
- max-width: 13em;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
\ No newline at end of file
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index cd5d63521b..e11f39d5c3 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -102,7 +102,7 @@ span.fancytree-node.muted { opacity: 0.6; }
/** we disable shield background when in zen mode because I couldn't get it to stay static
(it kept growing with content) */
-#container:not(.zen-mode) .note-tab-content.protected {
+#root-widget:not(.zen-mode) .note-tab-content.protected {
/* DON'T COLLAPSE THE RULES INTO SINGLE ONE, BACKGROUND WON'T DISPLAY */
background: url('../images/shield.svg') no-repeat;
background-size: contain;
@@ -761,4 +761,106 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
color: var(--main-text-color) !important;
background-color: var(--accented-background-color) !important;
border-color: var(--main-border-color) !important;
+}
+
+body {
+ font-size: var(--main-font-size);
+}
+
+.hidden-by-zen-mode {
+ display: none !important;
+}
+
+.gutter {
+ background: linear-gradient(to bottom, transparent, var(--accented-background-color), transparent);
+}
+
+.gutter:hover {
+ background: linear-gradient(to bottom, transparent, var(--main-border-color), transparent);
+}
+
+.gutter.gutter-horizontal {
+ cursor: col-resize;
+}
+
+.gutter.gutter-vertical {
+ cursor: row-resize;
+}
+
+.dropdown-menu {
+ font-size: inherit;
+}
+
+#context-menu-container {
+ max-height: 100vh;
+ /* !!! Cannot set overflow: auto, submenus will break !!! */
+}
+
+#context-menu-container, #context-menu-container .dropdown-menu {
+ padding: 3px 0 0;
+ z-index: 1111;
+}
+
+#context-menu-container .dropdown-item {
+ padding: 0 7px 0 10px;
+ cursor: pointer;
+}
+
+li.dropdown-submenu:hover > ul.dropdown-menu {
+ display: block;
+}
+
+.dropdown-submenu {
+ position:relative;
+}
+
+.dropdown-submenu > .dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -6px;
+ min-width: 15rem;
+}
+
+/* rotate caret on hover */
+.dropdown-menu > li > a:hover:after {
+ text-decoration: underline;
+ transform: rotate(-90deg);
+}
+
+.fancytree-loading span.fancytree-expander {
+ width: 16px;
+ height: 16px;
+ margin-left: 2px;
+}
+
+.fancytree-loading span.fancytree-expander:after {
+ width: 12px;
+ height: 12px;
+ margin-top: 4px;
+ margin-left: 1px;
+ border-width: 1px;
+ border-style: solid;
+}
+
+body {
+ /* FF basic styling */
+ scrollbar-color: var(--active-item-background-color) var(--main-background-color);
+}
+
+::-webkit-scrollbar {
+ width: 12px;
+}
+
+::-webkit-scrollbar-thumb {
+ border-radius: 3px;
+ border: 1px solid var(--scrollbar-border-color);
+}
+
+::-webkit-scrollbar-corner {
+ background-color: inherit;
+}
+
+[data-toggle="tooltip"] span {
+ padding-bottom: 0;
+ border-bottom: 1px dotted;
}
\ No newline at end of file
diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs
index d2ed242a5e..07aba8c160 100644
--- a/src/views/desktop.ejs
+++ b/src/views/desktop.ejs
@@ -74,7 +74,6 @@
<link href="stylesheets/themes.css" rel="stylesheet">
<link href="stylesheets/style.css" rel="stylesheet">
-<link href="stylesheets/desktop.css" rel="stylesheet">
<script src="javascripts/desktop.js" crossorigin type="module"></script>
diff --git a/src/views/dialogs/note_info.ejs b/src/views/dialogs/note_info.ejs
index df24338b9c..c39665339d 100644
--- a/src/views/dialogs/note_info.ejs
+++ b/src/views/dialogs/note_info.ejs
@@ -1,3 +1,9 @@
+<style>
+#note-info-table td, #note-info-table th {
+ padding: 15px;
+}
+</style>
+
<div id="note-info-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
diff --git a/src/views/dialogs/options.ejs b/src/views/dialogs/options.ejs
index 638220ef60..dfd51542ad 100644
--- a/src/views/dialogs/options.ejs
+++ b/src/views/dialogs/options.ejs
@@ -1,3 +1,27 @@
+<style>
+#widgets-configuration {
+ margin: 0;
+}
+
+#widgets-configuration h5 {
+ text-align: center;
+}
+
+#widgets-configuration .list-group-item {
+ background: var(--accented-background-color);
+ font-size: larger;
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 2px;
+ border-radius: 10px;
+}
+
+#widgets-configuration .handle {
+ margin-right: 20px;
+ display: inline-block;
+}
+</style>
+
<div id="options-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg modal-dialog-scrollable" style="min-width: 1000px;" role="document">
<div class="modal-content">