diff --git a/CHANGELOG.md b/CHANGELOG.md index 6653491..ec57053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,17 @@ - [highlight/mark viewer](https://chrome.google.com/webstore/detail/notion%2B-mark-manager/hipgmnlpnimedfepbfbfiaobohhffcfc) - [advanced math editor](https://github.com/Manueloccorso/NotionMathEditor_BrowserExtension) -### v0.10.1 (wip) +### v0.11.0 (wip) +- improved: use an svg for the scroll-to-top button. +- improved: use a better-matching icon and add transitions to the property layout toggle. - bugfix: disable fadein of selected block halo with snappy transitions. +- bugfix: increase contrast of `--theme_dark--interactive_hover` in dark+ and dracula. +- extension: "topbar icons" = replaces the topbar buttons with icons. +- extension: "code line numbers" = adds line numbers to code blocks. +- tweak: vertical indentation/relationship lines for bullet points. +- tweak: scroll database toolbars horizontally if partially hidden. +- tweak: condense bullet points (decrease line spacing). ### v0.10.0 (2020-11-02) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index d47411c..92dc62a 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -15,16 +15,17 @@ for support, join the [discord server](https://discord.gg/sFWPXtA). _to understand best how notion's app works, check out [the electron docs](https://www.electronjs.org/docs/),_ _explore the contents of your local extracted `app.asar`, and navigate the html structure with the devtools web inspector._ -_look through [the existing modules](https://github.com/dragonwocky/notion-enhancer/tree/HEAD/mods/)_ +_look through [the existing modules](mods)_ _for examples of the stuff described below in action._ _at the moment, for ease of development and use (and security assurance), there's no way for users_ _to install their own modules. this means that testing modules requires_ -_[running a dev build of the enhancer](https://github.com/dragonwocky/notion-enhancer/blob/master/CONTRIBUTING.md#testing). a better system is in the works._ +_[running a dev build of the enhancer](CONTRIBUTING.md#testing). a better system is in the works._ _once your mod is working, open a pull request to add it to the enhancer!_ -each directory in the `mods` folder is considered a module, with the file entry points `mod.js` and `styles.css`. +each directory in the `mods` folder is considered a module, with the file entry points `mod.js`, +`variables.css`, `app.css`, `tabs.css` and `menu.css`. | file | description | | ------------ | --------------------------------------------------------------------- | @@ -60,7 +61,6 @@ module.exports = { linux?: Boolean or Array or String or Number or null, } }>, - fonts: Array of font_urls, hacks?: { [k: 'insert-point' (e.g. 'main/createWindow.js')]: function ( store, // used for configuration and persisting of data (explanation below). @@ -79,7 +79,6 @@ module.exports = { | version | **required:** semver (e.g. `'0.3.7'`) | _string_ | | author | **required:** see below: original extension creator | _string_ or \ | | options | **optional:** see below: options made available in the enhancer menu (accessible from the tray) | _array\_ | -| fonts | **optional:** a list of any font imports - should be `https://` or [`enhancement://`](#the-enhancement-protocol) urls | _array\_ | | hacks | **optional:** see below: code inserted at various points | _object_ | > a module that with the primary function of being a hack should be tagged as an extension, @@ -108,7 +107,7 @@ if you'd rather customise this, pass this object: | type | **required:** input type (see below) | _string_ | | extensions | **optional:** allowed file extensions (only use with a file option), e.g. `['js', 'ts']` | _array\_ | | value | **optional:** default or possible value/s for option | see below | -| platformOverwrite | **optional:** remove the option from the menu and force a value on a specific platform | __ as shown above | +| platformOverwrite | **optional:** remove the option from the menu and force a value on a specific platform | _\_ as shown above | | type | value | | ------ | -------------------- | @@ -165,7 +164,10 @@ any files within the `mods` folder can be loaded with the `enhancement://` proto for example, inserting an image from the core mod: ``. -## styles.css + +## `variables.css` + +**inserted into all windows.** the enhancer has been designed with theming in mind, so as much of notion's colours and typography as possible and some basic spacing (both for the light and dark themes) have been mapped out @@ -173,34 +175,42 @@ using css variables. this set of variables is 100% mandatory to use if you wish to use or change anything they handle (particularly colours). this is necessary to keep all themes consistently working -(e.g. styling the menu and responding properly to light/dark theme changes), -and it makes theming a lot easier - notion's html structure needs some complex selectors to properly modify it, -and it means theme authors don't have to worry separately updating their theme every time something changes. +(e.g. responding properly to light/dark theme changes), and it makes theming a lot easier - +notion's html structure needs some complex selectors to properly modify it, +and it means theme authors don't have to worry about separately updating their theme every time something changes. the full/up-to-date list of variables and their default values can be found in the -[`variables.css` file](mods/core/css/variables.css). each variable is named something along the lines of +[`variables.css` source file](mods/core/css/variables.css). each variable is named something along the lines of `--theme_mode--target_name-property`. still not sure what a variable does? try changing it and seeing what happens. these are all made possible by the core module. if you believe this set of variables is buggy or lacking in any way, consider opening a pull request to fix those issues - please do not try and reinvent the wheel unnecessarily. -**want to import an external font or import an included font file? do that in the `mod.js` file, otherwise it** -**won't be used for the enhancements menu.** +> ### using variables +> +> variables should be defined per-mode, but used without specifying. for example: +> +> ```css +> :root { +> --theme_dark--main: rgb(5, 5, 5); +> } +> .demo-element { +> background: var(--theme--main); +> } +> ``` +> +> this to simplify styling and make it possible for things like the "night shift" module to work, +> by leaving the choice of light/dark theme up to the user and then directing the right values to +> the relevant variables. -### using variables +## `app.css` -variables should be used without specifying which mode they are relevant to. for example: +**inserted into the notion app window.** -```css -:root { - --theme_dark--main: rgb(5, 5, 5); -} +## `tabs.css` -.demo-element { - background: var(--theme--main); -} -``` +**inserted into the notion app container for styling tabs.** -this to simplify styling and make it possible for things like the "night shift" module to work, -by leaving the choice of light/dark theme up to the user and then directing the right values to -the relevant variables. +## `menu.css` + +**inserted into the enhancements menu.** \ No newline at end of file diff --git a/mods/bracketed-links/styles.css b/mods/bracketed-links/app.css similarity index 100% rename from mods/bracketed-links/styles.css rename to mods/bracketed-links/app.css diff --git a/mods/bypass-preview/styles.css b/mods/bypass-preview/app.css similarity index 100% rename from mods/bypass-preview/styles.css rename to mods/bypass-preview/app.css diff --git a/mods/calendar-scroll/styles.css b/mods/calendar-scroll/app.css similarity index 100% rename from mods/calendar-scroll/styles.css rename to mods/calendar-scroll/app.css diff --git a/mods/cherrycola/styles.css b/mods/cherrycola/app.css similarity index 100% rename from mods/cherrycola/styles.css rename to mods/cherrycola/app.css diff --git a/mods/code-line-numbers/styles.css b/mods/code-line-numbers/app.css similarity index 100% rename from mods/code-line-numbers/styles.css rename to mods/code-line-numbers/app.css diff --git a/mods/core/styles.css b/mods/core/app.css similarity index 100% rename from mods/core/styles.css rename to mods/core/app.css diff --git a/mods/core/render.js b/mods/core/render.js index fe22bb7..d2ea1fe 100644 --- a/mods/core/render.js +++ b/mods/core/render.js @@ -1096,4 +1096,4 @@ module.exports = (store, __exports) => { } }; } -}; +}; \ No newline at end of file diff --git a/mods/dark+/styles.css b/mods/dark+/app.css similarity index 100% rename from mods/dark+/styles.css rename to mods/dark+/app.css diff --git a/mods/dracula/styles.css b/mods/dracula/app.css similarity index 100% rename from mods/dracula/styles.css rename to mods/dracula/app.css diff --git a/mods/focus-mode/styles.css b/mods/focus-mode/app.css similarity index 100% rename from mods/focus-mode/styles.css rename to mods/focus-mode/app.css diff --git a/mods/gameish/styles.css b/mods/gameish/app.css similarity index 100% rename from mods/gameish/styles.css rename to mods/gameish/app.css diff --git a/mods/littilepig-dark/styles.css b/mods/littilepig-dark/app.css similarity index 100% rename from mods/littilepig-dark/styles.css rename to mods/littilepig-dark/app.css diff --git a/mods/littlepig-light/styles.css b/mods/littlepig-light/app.css similarity index 100% rename from mods/littlepig-light/styles.css rename to mods/littlepig-light/app.css diff --git a/mods/material-ocean/styles.css b/mods/material-ocean/app.css similarity index 100% rename from mods/material-ocean/styles.css rename to mods/material-ocean/app.css diff --git a/mods/neutral/styles.css b/mods/neutral/app.css similarity index 100% rename from mods/neutral/styles.css rename to mods/neutral/app.css diff --git a/mods/pastel-dark/styles.css b/mods/pastel-dark/app.css similarity index 100% rename from mods/pastel-dark/styles.css rename to mods/pastel-dark/app.css diff --git a/mods/property-layout/styles.css b/mods/property-layout/app.css similarity index 100% rename from mods/property-layout/styles.css rename to mods/property-layout/app.css diff --git a/mods/scroll-to-top/styles.css b/mods/scroll-to-top/app.css similarity index 100% rename from mods/scroll-to-top/styles.css rename to mods/scroll-to-top/app.css diff --git a/mods/topbar-icons/styles.css b/mods/topbar-icons/app.css similarity index 100% rename from mods/topbar-icons/styles.css rename to mods/topbar-icons/app.css diff --git a/mods/tweaks/styles.css b/mods/tweaks/app.css similarity index 100% rename from mods/tweaks/styles.css rename to mods/tweaks/app.css diff --git a/mods/word-counter/styles.css b/mods/word-counter/app.css similarity index 100% rename from mods/word-counter/styles.css rename to mods/word-counter/app.css diff --git a/notion-enhancer v0.10.0 banner.jpg b/notion-enhancer v0.10.0 banner.jpg new file mode 100644 index 0000000..10695e6 Binary files /dev/null and b/notion-enhancer v0.10.0 banner.jpg differ diff --git a/pkg/helpers.js b/pkg/helpers.js index b3d4872..eb2d37e 100644 --- a/pkg/helpers.js +++ b/pkg/helpers.js @@ -63,7 +63,7 @@ const is_wsl = .trim()}/Programs/Notion/resources`; } else { for (let loc of [ - '/usr/lib/notion-desktop/resources', // https://github.com/davidbailey00/notion-deb-builder/ + '/usr/lib/notion-desktop/resources', // https://github.com/haydn/notion-deb-builder/ '/opt/notion-app', // https://aur.archlinux.org/packages/notion-app/ '/opt/notion', // https://github.com/jaredallard/notion-app ]) { diff --git a/pkg/loader.js b/pkg/loader.js index 7cc5729..da72bfd 100644 --- a/pkg/loader.js +++ b/pkg/loader.js @@ -67,11 +67,11 @@ module.exports = function (__file, __exports) { (mod.alwaysActive || store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled) && fs.pathExistsSync( - path.resolve(`${__dirname}/../mods/${mod.dir}/styles.css`) + path.resolve(`${__dirname}/../mods/${mod.dir}/app.css`) ) ) { for (let rules of [ - `enhancement://${mod.dir}/styles.css`, + `enhancement://${mod.dir}/app.css`, ...(mod.fonts || []), ]) { document.head.appendChild(