diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5768c..94a8738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,17 +16,29 @@ a flexibility update. variables can be modified.) - new: in-page columns disabled/wrapped and wider pages when the window is narrower than 600px for improved responsiveness. +- new: relaunch button in tray menu. - improved: a core mod option to make transitions snappy/0s. +- improved: menu will now respect integrated titlebar setting. +- improved: use keyup listeners instead of a globalShortcut for the enhancements menu toggle. - bugfix: removed messenger emoji set as the provider no longer supports it. - bugfix: remove shadow around light mode board headers \+ minor text colour fixes for night shift theming. -- bugfix: properly detect/respond to `EACCES` errors. +- bugfix: properly detect/respond to `EACCES`/`EBUSY` errors. - bugfix: night shift checks every interaction, will respond to system changes without any manual changes. - bugfix: toc blocks can have text colours. - bugfix: bypass preview extension works with the back/forward keyboard shortcuts. +- bugfix: (maybe) fix csp issues under proxy. +- bugfix: remove focus mode footer from neutral theme. +- bugfix: improvements to the colour theming, particularly to make real- and fake-light/dark + modes (as applied by the night shift extension) look consistent. - tweak: sticky table/list rows. -- extension: "material ocean" = an oceanic colour palette. +- theme: "material ocean" = an oceanic colour palette. +- theme: "dracula" = a theme based on the popular dracula color palette + originally by zeno rocha and friends. +- extension: "tabs" = have multiple notion pages open in a single window. + +a fork of notion-deb-builder that does generate an app.asar has been created and is once again supported. ### v0.9.1 (2020-09-26) diff --git a/README.md b/README.md index 080124b..bd7aa25 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ for support, join the [discord server](https://discord.gg/sFWPXtA). - the [official windows/mac releases](https://notion.so/desktop). - the arch linux AUR [notion-app](https://aur.archlinux.org/packages/notion-app/) package. - the linux [notion-app](https://github.com/jaredallard/notion-app) installer. +- [@haydn-jones](https://github.com/haydn-jones/)'s fork of the + linux [notion-deb-builder](https://github.com/haydn-jones/notion-deb-builder). (it can also be run from the wsl to apply enhancements to the windows app.) @@ -31,10 +33,22 @@ a chrome extension may be coming soon for web client support. during installation/removal, make sure no notion processes are running! (check your task manager.) -**win10, macOS** +**win10** -1. [install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here._) -2. execute `npm i -g notion-enhancer` in the terminal/command prompt. +[install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here_), +then execute `npm i -g notion-enhancer` in the command prompt. + +**macOS** + +[install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here_), +then execute the following lines in the terminal: + +``` +sudo chmod -R a+wr /usr/local/lib/node_modules +sudo chmod -R a+wr /usr/local/bin +sudo chmod -R a+wr /Applications/Notion/Contents/Resources +npm i -g notion-enhancer +``` **debian/ubuntu, chromeOS, WSL (to modify the win10 app)** @@ -81,6 +95,14 @@ Options: -v, --version : display version number ``` +### faq + +**the themes aren't working?** + +if you pick a dark theme it will only be applied if notion is in dark mode, +and if you pick a light theme it will only work if notion is in light mode. +do `CMD/CTRL+SHIFT+L` to toggle between them. + **is this against notion's terms of service? can i get in trouble for using it?** definitely not! i contacted their support team to check, and the response was awesome: @@ -92,7 +114,7 @@ team to take to heart for future improvements." ## features once applied, modules can be configured via the graphical menu, which is opened from -the tray/menubar icon or with `ALT+E`. +the tray/menubar icon or with `OPTION/ALT+E`. ![](https://user-images.githubusercontent.com/16874139/93692603-954fd980-fb38-11ea-9d52-82ac53449d33.png) diff --git a/mods/core/buttons.js b/mods/core/buttons.js index e93dddd..e50de06 100644 --- a/mods/core/buttons.js +++ b/mods/core/buttons.js @@ -88,7 +88,7 @@ module.exports = (store) => { ]()}`; } for (let btn of buttons.insert) { - document.querySelector(`.window-button#btn-${btn}`).onclick = + buttons.element.querySelector(`.window-button#btn-${btn}`).onclick = buttons.actions[btn]; } if (store().frameless && !store().tiling_mode && !is_mac) { diff --git a/mods/core/client.js b/mods/core/client.js index 592a2ce..4d683ca 100644 --- a/mods/core/client.js +++ b/mods/core/client.js @@ -13,11 +13,18 @@ module.exports = (store, __exports) => { notionIpc = require(`${helpers.__notion.replace( /\\/g, '/' - )}/app/helpers/notionIpc.js`); + )}/app/helpers/notionIpc.js`), + { toKeyEvent } = require('keyboardevent-from-electron-accelerator'); // additional hotkeys document.defaultView.addEventListener('keyup', (event) => { if (event.code === 'F5') location.reload(); + // open menu on hotkey toggle + const hotkey = toKeyEvent(store().menu_toggle); + let triggered = true; + for (let prop in hotkey) + if (hotkey[prop] !== event[prop]) triggered = false; + if (triggered) electron.ipcRenderer.send('enhancer:open-menu'); }); const attempt_interval = setInterval(enhance, 500); @@ -36,13 +43,12 @@ module.exports = (store, __exports) => { document.body.classList.add('snappy-transitions'); // frameless - if (store().frameless && !store().tiling_mode) { + if (store().frameless && !store().tiling_mode && !store().tabs) { document.body.classList.add('frameless'); // draggable area - const dragarea = helpers.createElement( - '
' - ); - document.querySelector('.notion-topbar').prepend(dragarea); + document + .querySelector('.notion-topbar') + .prepend(helpers.createElement('
')); document.documentElement.style.setProperty( '--configured--dragarea_height', `${store().dragarea_height + 2}px` @@ -50,10 +56,12 @@ module.exports = (store, __exports) => { } // window buttons - const buttons = require('./buttons.js')(store); - document - .querySelector('.notion-topbar > div[style*="display: flex"]') - .appendChild(buttons.element); + if (!store().tabs) { + const buttons = require('./buttons.js')(store); + document + .querySelector('.notion-topbar > div[style*="display: flex"]') + .appendChild(buttons.element); + } document .querySelector('.notion-history-back-button') .parentElement.nextElementSibling.classList.add( @@ -68,7 +76,7 @@ module.exports = (store, __exports) => { document.querySelector('.notion-app-inner') ).getPropertyValue(prop); - // ctrl+f theming + // external theming document.defaultView.addEventListener('keydown', (event) => { if ((event.ctrlKey || event.metaKey) && event.key === 'f') { notionIpc.sendNotionToIndex('search:set-theme', { @@ -97,10 +105,9 @@ module.exports = (store, __exports) => { } }); - // enhancer menu function setThemeVars() { electron.ipcRenderer.send( - 'enhancer:set-theme-vars', + 'enhancer:set-menu-theme', [ '--theme--main', '--theme--sidebar', @@ -135,40 +142,71 @@ module.exports = (store, __exports) => { '--theme--select_red', '--theme--line_text', '--theme--line_yellow', + '--theme--line_yellow-text', '--theme--line_green', + '--theme--line_green-text', '--theme--line_blue', + '--theme--line_blue-text', '--theme--line_red', + '--theme--line_red-text', '--theme--code_inline-text', '--theme--code_inline-background', ].map((rule) => [rule, getStyle(rule)]) ); - } - setThemeVars(); - const theme_observer = new MutationObserver(setThemeVars); - theme_observer.observe(document.querySelector('.notion-app-inner'), { - attributes: true, - }); - electron.ipcRenderer.on('enhancer:get-theme-vars', setThemeVars); - - const sidebar_observer = new MutationObserver(setSidebarWidth); - sidebar_observer.observe(document.querySelector('.notion-sidebar'), { - attributes: true, - }); - let sidebar_width; - function setSidebarWidth(list) { - if (!store().frameless && store().tiling_mode) return; - const new_sidebar_width = - list[0].target.style.height === 'auto' - ? '0px' - : list[0].target.style.width; - if (new_sidebar_width !== sidebar_width) { - sidebar_width = new_sidebar_width; + if (store().tabs) { electron.ipcRenderer.sendToHost( - 'enhancer:sidebar-width', - sidebar_width + 'enhancer:set-tab-theme', + [ + '--theme--main', + '--theme--dragarea', + '--theme--font_sans', + '--theme--table-border', + '--theme--interactive_hover', + '--theme--interactive_hover-border', + '--theme--button_close', + '--theme--button_close-fill', + '--theme--option_active-background', + '--theme--selected', + '--theme--text', + ].map((rule) => [rule, getStyle(rule)]) ); } } - setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]); + setThemeVars(); + new MutationObserver(setThemeVars).observe( + document.querySelector('.notion-app-inner'), + { attributes: true } + ); + electron.ipcRenderer.on('enhancer:get-menu-theme', setThemeVars); + + if (store().tabs) { + let tab_title = ''; + __electronApi.setWindowTitle = (title) => { + if (tab_title !== title) { + tab_title = title; + electron.ipcRenderer.sendToHost('enhancer:set-tab-title', title); + } + }; + } else if (store().frameless && !store().tiling_mode) { + let sidebar_width; + function setSidebarWidth(list) { + const new_sidebar_width = + list[0].target.style.height === 'auto' + ? '0px' + : list[0].target.style.width; + if (new_sidebar_width !== sidebar_width) { + sidebar_width = new_sidebar_width; + electron.ipcRenderer.sendToHost( + 'enhancer:sidebar-width', + sidebar_width + ); + } + } + new MutationObserver(setSidebarWidth).observe( + document.querySelector('.notion-sidebar'), + { attributes: true } + ); + setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]); + } } }; diff --git a/mods/core/create.js b/mods/core/create.js index fb37b5a..58437c8 100644 --- a/mods/core/create.js +++ b/mods/core/create.js @@ -52,6 +52,18 @@ module.exports = (store, __exports) => { }, ...rect, }); + electron.session + .fromPartition('persist:notion') + .webRequest.onHeadersReceived((details, callback) => { + callback({ + responseHeaders: { + ...details.responseHeaders, + 'Content-Security-Policy': [ + "script-src 'self' 'unsafe-inline' 'unsafe-eval' enhancement: https://gist.github.com https://apis.google.com https://api.amplitude.com https://widget.intercom.io https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so https://checkout.stripe.com https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com https://cdn.syndication.twimg.com; connect-src 'self' https://msgstore.www.notion.so wss://msgstore.www.notion.so https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io; font-src 'self' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src 'self' data: blob: https: https://platform.twitter.com https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com; style-src 'self' 'unsafe-inline' enhancement: https://cdnjs.cloudflare.com https://github.githubassets.com https://platform.twitter.com https://ton.twimg.com; frame-src https: http:; media-src https: http:", + ], + }, + }); + }); window.once('ready-to-show', function () { if ( !store().openhidden || diff --git a/mods/core/css/menu.css b/mods/core/css/menu.css index 17992b8..1f36cf7 100644 --- a/mods/core/css/menu.css +++ b/mods/core/css/menu.css @@ -50,11 +50,11 @@ body:not([style]) > * { body:not([style])::after { content: ''; position: absolute; - left: 44vw; - top: calc(50% - 7.5vw); - width: 10vw; - height: 10vw; - border: 4px solid rgb(34, 34, 34); + left: calc(50% - 13px); + top: calc(50% + 10px); + width: 18px; + height: 18px; + border: 4px solid rgb(34, 34, 34, 0.5); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; @@ -93,7 +93,7 @@ s { /* titlebar */ -#menu-titlebar::before { +#titlebar::before { content: ''; position: absolute; width: 100%; @@ -103,20 +103,18 @@ s { height: 2px; } -#menu-titlebar { +#titlebar { display: flex; -webkit-app-region: drag; -} -#menu-titlebar button { - -webkit-app-region: no-drag; -} -#menu-titlebar { background: var(--theme--dragarea); } -#menu-titlebar > .window-buttons-area { +#titlebar button { + -webkit-app-region: no-drag; +} +#titlebar .window-buttons-area { margin: 0.4em 0.4em 0.4em auto; } -#menu-titlebar > .window-buttons-area:empty { +#titlebar .window-buttons-area:empty { display: none; } @@ -148,6 +146,7 @@ s { color: var(--theme--select_red); } #alerts .error { + color: var(--theme--line_red-text); background: var(--theme--line_red); border-color: var(--theme--select_red); } @@ -155,6 +154,7 @@ s { color: var(--theme--select_yellow); } #alerts .warning { + color: var(--theme--line_yellow-text); background: var(--theme--line_yellow); border-color: var(--theme--select_yellow); } @@ -162,6 +162,7 @@ s { color: var(--theme--select_blue); } #alerts .info { + color: var(--theme--line_blue-text); background: var(--theme--line_blue); border-color: var(--theme--select_blue); } @@ -170,6 +171,7 @@ s { color: var(--theme--select_green); } #alerts .success { + color: var(--theme--line_green-text); background: var(--theme--line_green); border-color: var(--theme--select_green); } diff --git a/mods/core/css/scrollbars.css b/mods/core/css/scrollbars.css index 2525fb5..2286f9a 100644 --- a/mods/core/css/scrollbars.css +++ b/mods/core/css/scrollbars.css @@ -11,6 +11,7 @@ .smooth-scrollbars ::-webkit-scrollbar { width: 8px; /* vertical */ height: 8px; /* horizontal */ + -webkit-app-region: no-drag; } .smooth-scrollbars ::-webkit-scrollbar-corner { background-color: transparent; /* overlap */ diff --git a/mods/core/css/tabs.css b/mods/core/css/tabs.css new file mode 100644 index 0000000..250a01b --- /dev/null +++ b/mods/core/css/tabs.css @@ -0,0 +1,178 @@ +/* + * notion-enhancer + * (c) 2020 dragonwocky (https://dragonwocky.me/) + * under the MIT license + */ + +@import './buttons.css'; + +* { + box-sizing: border-box; + word-break: break-word; + text-decoration: none; + text-size-adjust: 100%; + font-family: var(--theme--font_sans) !important; + outline-color: var(--theme--table-border); +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} +@keyframes tabSlideIn { + from { + width: 0; + } + to { + width: 8.5em; + } +} + +body:not([style*='--theme']):not(.error) > * { + opacity: 0; +} +body:not([style*='--theme']):not(.error)::after { + content: ''; + position: absolute; + left: calc(50% - 15px); + top: calc(50% + 10px); + width: 18px; + height: 18px; + border: 4px solid rgb(34, 34, 34, 0.5); + border-top-color: transparent; + border-radius: 50%; + animation: spin 0.8s linear infinite; +} +body[style*='--theme']::after { + z-index: 1; + content: ''; + position: absolute; + left: calc(50% - 15px); + top: calc(50% + 10px); + width: 18px; + height: 18px; + opacity: 0.5; + border: 4px solid var(--theme--text); + border-top-color: transparent; + border-radius: 50%; + animation: spin 0.8s linear infinite; +} + +html, +body, +#root { + background: var(--theme--main) !important; + position: relative; + height: 100%; + margin: 0; +} +#root { + display: flex; + flex-direction: column; +} + +#titlebar::before { + content: ''; + position: absolute; + width: 100%; + -webkit-app-region: no-drag; + top: 0; + left: 0; + height: 2px; +} +#titlebar { + display: flex; + flex-shrink: 1; + user-select: none; + -webkit-app-region: drag; + background: var(--theme--dragarea); +} +#titlebar button { + color: var(--theme--text); + -webkit-app-region: no-drag; + border: none; + background-color: transparent; +} +#titlebar .window-buttons-area { + margin: 0.5em 0.55em 0.5em auto; +} +#titlebar .window-buttons-area:empty { + display: none; +} + +#open-enhancer-menu::before { + content: ''; + height: 1.25em; + width: 1.25em; + display: inline-block; + margin: auto 1em -0.25em 1em; + background-size: contain; + background-image: url('enhancement://core/icons/mac+linux.png'); + background-repeat: no-repeat; +} +#tabs { + margin-top: auto; +} +#tabs .tab { + display: inline-flex; + background: var(--theme--main); + border: none; + font-size: 1.15em; + padding: 0.2em 0.4em; + text-align: left; + border-bottom: 4px solid var(--theme--table-border); + opacity: 0.8; +} +#tabs .tab:first-child { + margin-top: 0.5em; +} +#tabs .tab:not(.new) span:not(.close) { + width: 8.5em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +#tabs .tab.slideIn span:not(.close) { + animation: tabSlideIn 100ms ease-in-out; +} +#tabs .tab .close { + padding: 0 0.35em 0.1em 0.3em; + margin-left: auto; + font-weight: bold; +} +#tabs .tab.current { + opacity: 1; + background: var(--theme--selected); + border-bottom: 4px solid var(--theme--option_active-background); +} +#tabs .tab.new { + background: none; + border: none; + margin-left: -0.1em; +} +#tabs .tab.new span { + padding: 0 0.35em 0.1em 0.3em; + font-weight: bold; +} +#tabs .tab:hover { + opacity: 1; +} +#tabs .tab .close:hover, +#tabs .tab.new span:hover { + background: var(--theme--table-border); + border-radius: 5px; +} +#tabs .tab.dragged-over { + box-shadow: inset 4px 0 0 0 var(--theme--selected); +} + +.notion { + z-index: 2; + width: 100%; + height: 100%; + display: none; +} diff --git a/mods/core/css/theme.css b/mods/core/css/theme.css index 7778954..faeac8f 100644 --- a/mods/core/css/theme.css +++ b/mods/core/css/theme.css @@ -9,20 +9,25 @@ /** app **/ +.notion-body, +.notion-body.dark [style*='background: rgb(47, 52, 55)'], +.notion-body.dark [style*='background-color: rgb(47, 52, 55)'], +.notion-body:not(.dark) + .notion-light-theme + [style*='background: white']:not(.notion-help-button), +.notion-body:not(.dark) + .notion-dark-theme + [style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']), +.notion-body:not(.dark) [style*='background-color: white'] { + background: var(--theme--main) !important; +} +.notion-sidebar > div, .notion-body.dark [style*='background: rgb(55, 60, 63)'], .notion-body.dark [style*='background: rgb(120, 123, 123)'], .notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'], .notion-body:not(.dark) [style*='background: rgb(223, 223, 222)'] { background: var(--theme--sidebar) !important; } -.notion-body, -.notion-body.dark [style*='background: rgb(47, 52, 55)'], -.notion-body.dark [style*='background-color: rgb(47, 52, 55)'], -.notion-body:not(.dark) - [style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']), -.notion-body:not(.dark) [style*='background-color: white'] { - background: var(--theme--main) !important; -} [style*='background: rgba(15, 15, 15, 0.6)'] { background: var(--theme--overlay) !important; } @@ -147,7 +152,8 @@ [style*='SFMono-Regular'] { font-family: var(--theme--font_code) !important; } -.notion-frame .notion-page-block div[placeholder='Untitled'] { +.notion-frame .notion-page-block div[placeholder='Untitled'], +.notion-overlay-container .notion-page-block div[placeholder='Untitled']{ font-size: calc( var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em) ) !important; @@ -167,15 +173,16 @@ var(--theme--font_body-size) * (var(--theme--font_heading3-size) / 1em) ) !important; } -.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'] { +.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'], +.notion-overlay-container .notion-scroller.vertical [style*='font-size: 14px']{ font-size: var(--theme--font_label-size) !important; } -.notion-frame .notion-scroller.vertical.horizontal .notion-page-content { +.notion-frame .notion-scroller.vertical.horizontal .notion-page-content, +.notion-overlay-container .notion-scroller.vertical .notion-page-content { font-size: var(--theme--font_body-size) !important; } -.notion-frame - .notion-scroller.vertical.horizontal - .notion-page-content[style*='font-size: 14px'] { +.notion-frame .notion-scroller.vertical.horizontal .notion-page-content[style*='font-size: 14px'], +.notion-overlay-container .notion-scroller.vertical .notion-page-content[style*='font-size: 14px'] { font-size: var(--theme--font_body-size_small) !important; } .notion-code-block [placeholder=' '] { @@ -195,7 +202,8 @@ > a[style*='background: white'], .notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'], .notion-body:not(.dark) - [style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] { + .notion-dark-theme + [style*='background: white'][style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] { background: var(--theme--card) !important; } .notion-body.dark @@ -206,19 +214,36 @@ [style*='background: rgba(55, 53, 47, 0.024)'] { background: var(--theme--gallery) !important; } +.notion-body.dark .notion-scroller > [style*='rgb(55, 60, 63)'], +.notion-body:not(.dark) [style*='background: rgba(242, 241, 238, 0.6)'] { + background: var(--theme--select_input) !important; +} .notion-body.dark - [style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'], + [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px -1px inset;'], .notion-body:not(.dark) - .notion-dark-theme - [style*='box-shadow: white -3px 0px 0px'] { - box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, - rgba(15, 15, 15, 0.1) 0px 2px 4px !important; + [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px -1px 0px inset'] { + box-shadow: rgba(55, 53, 47, 0.16) 0px -1px inset !important; +} + +.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px 1px 0px'], +.notion-body:not(.dark) + [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px 1px 0px'] { + box-shadow: var(--theme--ui-border) 0px 1px 0px !important; +} +.notion-body.dark + [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'], +.notion-body:not(.dark) + [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] { + box-shadow: var(--theme--table-border) 0px 1px 0px inset !important; } .notion-body.dark [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px'] { box-shadow: var(--theme--main) -3px 0px 0px !important; } +.notion-body:not(.dark) [style*='box-shadow: white -3px 0px 0px;'] { + box-shadow: none !important; +} .notion-body.dark [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px, rgba(255, 255, 255, 0.14) 0px 1px 0px'], .notion-body:not(.dark) @@ -226,7 +251,7 @@ .notion-body:not(.dark) [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'] { box-shadow: var(--theme--main) -3px 0px 0px, - var(--theme--table-border) 0px 1px 0px !important; + var(--theme--ui-border) 0px 1px 0px !important; } .notion-body.dark [style*='border-top: 1px solid rgba(255, 255, 255,'], @@ -254,7 +279,7 @@ .notion-body.dark [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'], .notion-body:not(.dark) [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'] { - box-shadow: var(--theme--table-border) 0px -1px 0px !important; + box-shadow: var(--theme--ui-border) 0px -1px 0px !important; } .notion-body.dark [style*='border-left: 1px solid rgba(255, 255, 255,'], .notion-body.dark @@ -263,12 +288,6 @@ .notion-body:not(.dark) [style*='border-left: 1px solid rgba(55, 53, 47,'] { border-left: 1px solid var(--theme--table-border) !important; } -.notion-body.dark - [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] { - box-shadow: var(--theme--table-border) 0px 1px 0px inset !important; -} .notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.14) 1px 0px 0px inset'], .notion-body:not(.dark) @@ -296,6 +315,7 @@ .notion-body.dark [style*='background: rgb(71, 76, 80)'], .notion-body.dark [style*='background: rgb(80, 85, 88)'], .notion-body.dark [style*='background: rgb(98, 102, 104)'], +.notion-body.dark [style*='height: 1px; background: rgba(255, 255, 255, 0.07)'], .notion-body:not(.dark) [style*='background: rgba(55, 53, 47,'], .notion-body:not(.dark) [style*='background: rgb(239, 239, 238)'], .notion-body:not(.dark) [style*='background: rgba(206, 205, 202, 0.5)'] { @@ -395,6 +415,19 @@ background: var(--theme--primary_indicator) !important; } +.notion-body.dark + [style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px'], +.notion-body:not(.dark) + [style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px'] { + box-shadow: var(--theme--box-shadow_strong) !important; +} +.notion-body.dark + [style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'], +.notion-body:not(.dark) + [style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px'] { + box-shadow: var(--theme--box-shadow) !important; +} + .notion-to_do-block > div [role='button']:hover, .notion-to_do-block > div [role='button']:hover .checkboxSquare, .notion-to_do-block > div [role='button']:hover .check { @@ -444,18 +477,38 @@ .notion-body:not(.dark) [style*='color: rgba(25, 23, 17, 0.6)'] { color: var(--theme--text_ui) !important; } +::placeholder { + opacity: 1 !important; +} +::placeholder, +[style*='-webkit-text-fill-color:'], .notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)'], -.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'] { +.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)']::before, +.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'], +.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)']::before { color: var(--theme--text_ui_info) !important; + -webkit-text-fill-color: var(--theme--text_ui_info) !important; } .notion-body.dark [style*='fill: rgb(202, 204, 206)'] { fill: var(--theme--text) !important; } -.notion-body.dark [style*='fill: rgba(202, 204, 206,'], + +.notion-body.dark [style*='fill: rgba(255, 255, 255, 0.6)'], .notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47,'] { +.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.6)'], +.notion-body:not(.dark) [style*='fill: rgba(25, 23, 17, 0.6)'] { fill: var(--theme--text_ui) !important; } +.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.6)'], +.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.4)'], +.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.4)'], +.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.3)'] { + fill: var(--theme--text_ui_info) !important; +} +.notion-body.dark [style*='border-color:rgba(255,255,255,0.4);opacity:0.7'], +.notion-body:not(.dark) [style*='border-color:rgba(55,53,47,0.4);opacity:0.7'] { + border-color: var(--theme--text_ui_info) !important; +} .notion-body.dark [style*='caret-color: rgba(255, 255, 255, 0.9)'], .notion-body:not(.dark) [style*='caret-color: rgb(55, 53, 47)'] { caret-color: var(--theme--text) !important; diff --git a/mods/core/css/variables.css b/mods/core/css/variables.css index 76e4bbd..d394665 100644 --- a/mods/core/css/variables.css +++ b/mods/core/css/variables.css @@ -14,6 +14,10 @@ --theme_dark--sidebar: rgb(55, 60, 63); --theme_dark--overlay: rgba(15, 15, 15, 0.6); --theme_dark--dragarea: #272d2f; + --theme_dark--box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, + rgba(15, 15, 15, 0.2) 0px 2px 4px; + --theme_dark--box-shadow_strong: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, + rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px; --theme_dark--page_normal-width: 900px; --theme_dark--page_full-width: 100%; --theme_dark--page-padding: calc(96px + env(safe-area-inset-left)); @@ -48,7 +52,9 @@ --theme_dark--card: rgb(63, 68, 71); --theme_dark--gallery: rgba(255, 255, 255, 0.05); + --theme_dark--select_input: rgb(55, 60, 63); --theme_dark--table-border: rgba(255, 255, 255, 0.1); + --theme_dark--ui-border: rgba(255, 255, 255, 0.07); --theme_dark--interactive_hover: rgb(71, 76, 80); --theme_dark--interactive_hover-border: transparent; --theme_dark--button_close: #e81123; @@ -189,6 +195,10 @@ --theme_light--sidebar: rgb(247, 246, 243); --theme_light--overlay: rgba(15, 15, 15, 0.6); --theme_light--dragarea: rgba(55, 53, 47, 0.04); + --theme_light--box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, + rgba(15, 15, 15, 0.1) 0px 2px 4px; + --theme_light--box-shadow_strong: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, + rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px; --theme_light--page_normal-width: 900px; --theme_light--page_full-width: 100%; --theme_light--page-padding: calc(96px + env(safe-area-inset-left)); @@ -223,7 +233,9 @@ --theme_light--card: rgb(247, 247, 247); --theme_light--gallery: rgba(55, 53, 47, 0.024); + --theme_light--select_input: rgba(242, 241, 238, 0.6); --theme_light--table-border: rgba(55, 53, 47, 0.16); + --theme_light--ui-border: rgba(55, 53, 47, 0.09); --theme_light--interactive_hover: rgb(239, 239, 239); --theme_light--interactive_hover-border: transparent; --theme_light--button_close: #e81123; @@ -247,6 +259,7 @@ --theme_light--text: rgb(55, 53, 47); --theme_light--text_ui: rgba(55, 53, 47, 0.6); + --theme_light--text_ui: rgba(55, 53, 47, 0.6); --theme_light--text_ui_info: rgba(55, 53, 47, 0.4); --theme_light--text_gray: rgb(155, 154, 151); @@ -364,6 +377,8 @@ --theme--sidebar: var(--theme_dark--sidebar); --theme--overlay: var(--theme_dark--overlay); --theme--dragarea: var(--theme_dark--dragarea); + --theme--box-shadow: var(--theme_dark--box-shadow); + --theme--box-shadow_strong: var(--theme_dark--box-shadow_strong); --theme--page_normal-width: var(--theme_dark--page_normal-width); --theme--page_full-width: var(--theme_dark--page_full-width); --theme--page-padding: var(--theme_dark--page-padding); @@ -389,7 +404,9 @@ --theme--scrollbar_hover: var(--theme_dark--scrollbar_hover); --theme--card: var(--theme_dark--card); --theme--gallery: var(--theme_dark--gallery); + --theme--select_input: var(--theme_dark--select_input); --theme--table-border: var(--theme_dark--table-border); + --theme--ui-border: var(--theme_dark--ui-border); --theme--interactive_hover: var(--theme_dark--interactive_hover); --theme--interactive_hover-border: var( --theme_dark--interactive_hover-border @@ -524,6 +541,8 @@ --theme--sidebar: var(--theme_light--sidebar); --theme--overlay: var(--theme_light--overlay); --theme--dragarea: var(--theme_light--dragarea); + --theme--box-shadow: var(--theme_light--box-shadow); + --theme--box-shadow_strong: var(--theme_light--box-shadow_strong); --theme--page_normal-width: var(--theme_light--page_normal-width); --theme--page_full-width: var(--theme_light--page_full-width); --theme--page-padding: var(--theme_light--page-padding); @@ -549,7 +568,9 @@ --theme--scrollbar_hover: var(--theme_light--scrollbar_hover); --theme--card: var(--theme_light--card); --theme--gallery: var(--theme_light--gallery); + --theme--select_input: var(--theme_light--select_input); --theme--table-border: var(--theme_light--table-border); + --theme--ui-border: var(--theme_light--ui-border); --theme--interactive_hover: var(--theme_light--interactive_hover); --theme--interactive_hover-border: var( --theme_light--interactive_hover-border diff --git a/mods/core/icons/alwaysontop_off.svg b/mods/core/icons/alwaysontop_off.svg index 9fa0fb5..96afcf0 100644 --- a/mods/core/icons/alwaysontop_off.svg +++ b/mods/core/icons/alwaysontop_off.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mods/core/icons/alwaysontop_on.svg b/mods/core/icons/alwaysontop_on.svg index 1c344f8..3fec5d5 100644 --- a/mods/core/icons/alwaysontop_on.svg +++ b/mods/core/icons/alwaysontop_on.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mods/core/icons/maximize_off.svg b/mods/core/icons/maximize_off.svg index 7241f63..0bf56b0 100644 --- a/mods/core/icons/maximize_off.svg +++ b/mods/core/icons/maximize_off.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mods/core/icons/maximize_on.svg b/mods/core/icons/maximize_on.svg index 681fdc9..af77a3e 100644 --- a/mods/core/icons/maximize_on.svg +++ b/mods/core/icons/maximize_on.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mods/core/icons/minimize.svg b/mods/core/icons/minimize.svg index abcebb7..d179e14 100644 --- a/mods/core/icons/minimize.svg +++ b/mods/core/icons/minimize.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mods/core/menu.html b/mods/core/menu.html index 3b3f91a..56da84e 100644 --- a/mods/core/menu.html +++ b/mods/core/menu.html @@ -9,7 +9,7 @@ - +