Skip to content

Commit 6e9f87b

Browse files
committed
patch absolute positioned topbar buttons
1 parent 466d5bf commit 6e9f87b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- mods/focus-mode/app.css 2021-09-07 20:37:12.828940400 +1000
2+
+++ mods/focus-mode/app.css 2021-09-07 20:37:37.171937900 +1000
3+
@@ -5,11 +5,15 @@
4+
* under the MIT license
5+
*/
6+
7+
-.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar {
8+
+.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar,
9+
+.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar-action-buttons {
10+
opacity: 0 !important;
11+
transition: opacity 200ms ease-in-out !important;
12+
}
13+
-.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar:hover {
14+
+.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar:hover,
15+
+.notion-sidebar-container[style*='width: 0px;']
16+
+ + .notion-frame
17+
+ .notion-topbar-action-buttons:hover {
18+
opacity: 1 !important;
19+
}
20+
/* add space at the bottom of the main frame when sidebar is hidden
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- mods/core/css/titlebar.css 2021-09-07 20:34:47.094524100 +1000
2+
+++ mods/core/css/titlebar.css 2021-09-07 20:35:04.895701600 +1000
3+
@@ -46,3 +46,8 @@
4+
justify-content: flex-end;
5+
}
6+
}
7+
+
8+
+body[data-has-window-buttons] .notion-topbar-action-buttons {
9+
+ top: 17px !important;
10+
+ right: 109px !important;
11+
+}
12+
--- mods/core/client.js 2021-08-29 01:19:23.871537300 +1000
13+
+++ mods/core/client.js 2021-09-07 20:50:27.283396400 +1000
14+
@@ -125,6 +125,7 @@
15+
document
16+
.querySelector('.notion-topbar > div[style*="display: flex"]')
17+
.appendChild(buttons.element);
18+
+ document.body.dataset.hasWindowButtons = true;
19+
}
20+
document
21+
.querySelector('.notion-history-back-button')

0 commit comments

Comments
 (0)