Skip to content

Commit

Permalink
fix notion-enhancer#59 + clarity improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonwocky committed Aug 28, 2020
1 parent b94c8e7 commit ab7771c
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 169 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ download:
```sh
git clone https://github.com/dragonwocky/notion-enhancer
cd notion-enhancer
git checkout js
npm link
```

Expand Down
2 changes: 1 addition & 1 deletion DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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/js/mods/)_
_look through [the existing modules](https://github.com/dragonwocky/notion-enhancer/tree/HEAD/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_
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,25 @@ for support, join the [discord server](https://discord.gg/sFWPXtA).
**coming from <= v0.7.0? things are a bit different - have a read of [the update guide](UPDATING.md)**
**before following these instructions.**

1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install).
on arch linux? use the aur package:
[https://aur.archlinux.org/packages/notion-enhancer](https://aur.archlinux.org/packages/notion-enhancer)

otherwise:

1. install node.js: [windows/macOS](https://nodejs.org/en/download/), linux/WSL:
```bash
curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs
```
_a computer restart may be required here._
2. install the enhancer globally: run `npm i -g notion-enhancer` in the terminal/command prompt.
3. make sure no notion processes are running (check the task manager!), and apply the hack:
run `notion-enhancer apply` in the terminal/command prompt.
2. make sure no notion processes are running (check the task manager!), and install the enhancer globally: run `npm i -g notion-enhancer` in the terminal/command prompt.

### command-line interface

the enhancements should be automatically applied on installation
and automatically removed on uninstallation.
if you want to do things yourself, though, you can.

```
Usage:
$ notion-enhancer <command> [options]
Expand Down
2 changes: 1 addition & 1 deletion UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rewrite and overhaul: now this is a program that makes use of a number of module

## installation dependencies

previously, python and the node.js `asar` package were both required.
previously, python and the node.js `asar` package both had to be manually installed.
node.js is the only current requirement of the enhancer.

- python is no longer a dependency: keep it, get rid of it - up to you.
Expand Down
2 changes: 2 additions & 0 deletions mods/core/css/localised.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
--theme--font_heading3-size: var(--theme_dark--font_heading3-size);
--theme--font_label-size: var(--theme_dark--font_label-size);
--theme--font_body-size: var(--theme_dark--font_body-size);
--theme--font_body-size_small: var(--theme_dark--font_body-size_small);
--theme--font_code-size: var(--theme_dark--font_code-size);
--theme--font_sidebar-size: var(--theme_dark--font_sidebar-size);
--theme--scrollbar: var(--theme_dark--scrollbar);
Expand Down Expand Up @@ -125,6 +126,7 @@
--theme--font_heading3-size: var(--theme_light--font_heading3-size);
--theme--font_label-size: var(--theme_light--font_label-size);
--theme--font_body-size: var(--theme_light--font_body-size);
--theme--font_body-size_small: var(--theme_light--font_body-size_small);
--theme--font_code-size: var(--theme_light--font_code-size);
--theme--font_sidebar-size: var(--theme_light--font_sidebar-size);
--theme--scrollbar: var(--theme_light--scrollbar);
Expand Down
17 changes: 14 additions & 3 deletions mods/core/css/shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,31 @@
font-size: var(--theme--font_title-size) !important;
}
[placeholder='Heading 1'] {
font-size: var(--theme--font_heading1-size) !important;
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em)
) !important;
}
[placeholder='Heading 2'] {
font-size: var(--theme--font_heading2-size) !important;
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading2-size) / 1em)
) !important;
}
[placeholder='Heading 3'] {
font-size: var(--theme--font_heading3-size) !important;
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading3-size) / 1em)
) !important;
}
.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'] {
font-size: var(--theme--font_label-size) !important;
}
.notion-frame .notion-scroller.vertical.horizontal .notion-page-content {
font-size: var(--theme--font_body-size) !important;
}
.notion-frame
.notion-scroller.vertical.horizontal
.notion-page-content[style*='font-size: 14px'] {
font-size: var(--theme--font_body-size_small) !important;
}
.notion-code-block [placeholder=' '] {
font-size: var(--theme--font_code-size) !important;
}
Expand Down
18 changes: 10 additions & 8 deletions mods/core/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
Courier, monospace;

--theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 30px;
--theme_dark--font_heading2-size: 24px;
--theme_dark--font_heading3-size: 20px;
--theme_dark--font_heading1-size: 1.875em;
--theme_dark--font_heading2-size: 1.5em;
--theme_dark--font_heading3-size: 1.25em;
--theme_dark--font_label-size: 14px;
--theme_dark--font_body-size: 16px;
--theme_dark--font_code-size: 12.75px;
--theme_dark--font_body-size_small: 14px;
--theme_dark--font_code-size: 0.796875em;
--theme_dark--font_sidebar-size: 14px;

--theme_dark--scrollbar: #505457;
Expand Down Expand Up @@ -143,12 +144,13 @@
Courier, monospace;

--theme_light--font_title-size: 40px;
--theme_light--font_heading1-size: 30px;
--theme_light--font_heading2-size: 24px;
--theme_light--font_heading3-size: 20px;
--theme_light--font_heading1-size: 1.875em;
--theme_light--font_heading2-size: 1.5em;
--theme_light--font_heading3-size: 1.25em;
--theme_light--font_label-size: 14px;
--theme_light--font_body-size: 16px;
--theme_light--font_code-size: 12.75px;
--theme_light--font_body-size_small: 14px;
--theme_light--font_code-size: 0.796875em;
--theme_light--font_sidebar-size: 14px;

--theme_light--scrollbar: #d9d8d6;
Expand Down
1 change: 1 addition & 0 deletions mods/core/css/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"--theme--font_heading3-size",
"--theme--font_label-size",
"--theme--font_body-size",
"--theme--font__small",
"--theme--font_code-size",
"--theme--font_sidebar-size",
"--theme--scrollbar",
Expand Down
42 changes: 0 additions & 42 deletions mods/dark+/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,7 @@
:root {
--theme_dark--main: rgb(5, 5, 5);
--theme_dark--sidebar: rgb(1, 1, 1);
/* --theme_dark--overlay: rgba(15, 15, 15, 0.6); */
--theme_dark--dragarea: #000;
/* --theme_dark--preview-width: 977px;
--theme_dark--preview-padding: 8rem;
--theme_dark--preview_banner-height: 20vh;
--theme_dark--page_banner-height: 30vh; */

/* --theme_dark--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji',
'Segoe UI Symbol';
--theme_dark--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho',
'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC',
SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif;
--theme_dark--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace;
--theme_dark--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
Courier, monospace; */

/* --theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 30px;
--theme_dark--font_heading2-size: 24px;
--theme_dark--font_heading3-size: 20px;
--theme_dark--font_label-size: 14px;
--theme_dark--font_body-size: 16px;
--theme_dark--font_code-size: 12.75px; */

--theme_dark--scrollbar: #23242599;
--theme_dark--scrollbar-border: transparent;
Expand All @@ -40,25 +17,9 @@
--theme_dark--gallery: rgba(26, 26, 26, 0.3);
--theme_dark--table-border: rgba(46, 46, 46, 0.7);
--theme_dark--interactive_hover: #020202;
/* --theme_dark--interactive_hover-border: transparent;
--theme_dark--button_close: #e81123;
--theme_dark--button_close-fill: white; */

/* --theme_dark--option-color: white;
--theme_dark--option-background: transparent;
--theme_dark--option_active-color: white;
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-color: white; */
--theme_dark--option_hover-background: rgb(32, 32, 32);

/* --theme_dark--danger_text: rgb(235, 87, 87);
--theme_dark--danger_border: rgba(235, 87, 87, 0.5); */

/* --theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 30px;
--theme_dark--font_heading2-size: 24px;
--theme_dark--font_heading3-size: 20px; */

--theme_dark--text: rgb(228, 228, 228);
--theme_dark--text_ui: rgba(211, 211, 211, 0.637);
--theme_dark--text_ui_info: rgba(211, 211, 211, 0.466);
Expand All @@ -73,7 +34,6 @@
--theme_dark--text_pink: rgb(226, 85, 161);
--theme_dark--text_red: rgb(218, 47, 35);

/* --theme_dark--bg_text: var(--theme_dark--text); */
--theme_dark--bg_gray: rgba(126, 128, 129, 0.5);
--theme_dark--bg_brown: #50331f;
--theme_dark--bg_orange: rgba(255, 155, 0, 0.58);
Expand All @@ -84,7 +44,6 @@
--theme_dark--bg_pink: rgba(243, 61, 159, 0.5);
--theme_dark--bg_red: rgb(122, 20, 20);

/* --theme_dark--line_text: var(--theme_dark--text); */
--theme_dark--line_gray: rgba(126, 128, 129, 0.301);
--theme_dark--line_brown: #50331fad;
--theme_dark--line_orange: rgba(255, 153, 0, 0.315);
Expand All @@ -97,7 +56,6 @@

--theme_dark--code_inline-text: #7dc582;
--theme_dark--code_inline-background: rgb(8, 8, 8);
/* --theme_dark--code_text: var(--theme_dark--text); */
--theme_dark--code-background: rgb(8, 8, 8);
--theme_dark--code_function: #c7e1ff;
--theme_dark--code_keyword: #c397d8;
Expand Down
61 changes: 0 additions & 61 deletions mods/gameish/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,29 @@
:root {
--theme_dark--main: #1e1c26;
--theme_dark--sidebar: #24222c;
/* --theme_dark--overlay: rgba(15, 15, 15, 0.6); */
--theme_dark--dragarea: #19181f;
/* --theme_dark--preview-width: 977px;
--theme_dark--preview-padding: 8rem;
--theme_dark--preview_banner-height: 20vh;
--theme_dark--page_banner-height: 30vh; */

--theme_dark--font_sans: 'Offside', -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif,
'Segoe UI Emoji', 'Segoe UI Symbol';
/* --theme_dark--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho',
'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC',
SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif; */
--theme_dark--font_mono: 'DM Mono', iawriter-mono, Nitti, Menlo, Courier,
monospace;
--theme_dark--font_code: 'DM Mono', SFMono-Regular, Consolas,
'Liberation Mono', Menlo, Courier, monospace;

/* --theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 30px;
--theme_dark--font_heading2-size: 24px;
--theme_dark--font_heading3-size: 20px;
--theme_dark--font_label-size: 14px;
--theme_dark--font_body-size: 16px;
--theme_dark--font_code-size: 12.75px;
--theme_dark--font_sidebar-size: 14px; */

--theme_dark--scrollbar: #221f29;
/* --theme_dark--scrollbar-border: transparent; */
--theme_dark--scrollbar_hover: #312d3c;

/* --theme_dark--card: rgb(53, 51, 58); */
--theme_dark--gallery: rgba(162, 162, 162, 0.01);
--theme_dark--table-border: rgba(148, 148, 184, 0.5);
--theme_dark--interactive_hover: #282632;
/* --theme_dark--interactive_hover-border: transparent;
--theme_dark--button_close: #e81123;
--theme_dark--button_close-fill: white; */

--theme_dark--selected: rgba(85, 68, 156, 0.3);
--theme_dark--primary: rgb(106, 47, 200);
--theme_dark--primary_hover: rgb(110, 48, 211);
--theme_dark--primary_click: rgb(117, 65, 200);
--theme_dark--primary_indicator: rgb(150, 84, 226);

/* --theme_dark--option-color: white;
--theme_dark--option-background: transparent;
--theme_dark--option_active-color: white;
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-color: white; */
--theme_dark--option_hover-background: rgb(20, 0, 51);

--theme_dark--danger_text: rgb(235, 87, 87);
Expand All @@ -71,54 +44,20 @@

--theme_dark--text_gray: rgba(151, 154, 155, 0.95);
--theme_dark--text_brown: rgb(112, 87, 77);
/* --theme_dark--text_orange: rgb(255, 163, 68); */
--theme_dark--text_yellow: #ffe529;
--theme_dark--text_green: #64d97b;
/* --theme_dark--text_blue: rgb(82, 156, 202); */
--theme_dark--text_purple: #d43cc7;
/* --theme_dark--text_pink: rgb(226, 85, 161); */
--theme_dark--text_red: #d93939;

/* --theme_dark--bg_text: var(--theme_dark--text);
--theme_dark--bg_gray: rgba(151, 154, 155, 0.5);
--theme_dark--bg_brown: rgba(147, 114, 100, 0.5);
--theme_dark--bg_orange: rgba(255, 163, 68, 0.5);
--theme_dark--bg_yellow: rgba(255, 220, 73, 0.5);
--theme_dark--bg_green: rgba(77, 171, 154, 0.5);
--theme_dark--bg_blue: rgba(82, 156, 202, 0.5);
--theme_dark--bg_purple: rgba(154, 109, 215, 0.5);
--theme_dark--bg_pink: rgba(226, 85, 161, 0.5); */
--theme_dark--bg_red: rgba(216, 57, 46, 0.5);

/* --theme_dark--line_text: var(--theme_dark--text);
--theme_dark--line_gray: rgb(69, 75, 78); */
--theme_dark--line_brown: rgb(78, 57, 48);
--theme_dark--line_orange: rgb(136, 80, 48);
--theme_dark--line_yellow: #fbe2287c;
/* --theme_dark--line_green: rgb(53, 76, 75);
--theme_dark--line_blue: rgb(54, 73, 84);
--theme_dark--line_purple: rgb(68, 63, 87);
--theme_dark--line_pink: rgb(83, 59, 76); */
--theme_dark--line_red: rgb(151, 62, 62);

--theme_dark--code_inline-text: #d9cbec;
--theme_dark--code_inline-background: #24222c;
/* --theme_dark--code_text: var(--theme_dark--text); */
--theme_dark--code-background: #24222c;
/* --theme_dark--code_function: rgba(255, 255, 255, 0.9);
--theme_dark--code_keyword: hsl(350, 40%, 70%);
--theme_dark--code_tag: hsl(350, 40%, 70%);
--theme_dark--code_operator: hsl(40, 90%, 60%);
--theme_dark--code_important: #e90;
--theme_dark--code_property: hsl(350, 40%, 70%);
--theme_dark--code_builtin: hsl(75, 70%, 60%);
--theme_dark--code_attr-name: hsl(75, 70%, 60%);
--theme_dark--code_comment: hsl(30, 20%, 50%);
--theme_dark--code_punctuation: rgba(255, 255, 255, 0.9);
--theme_dark--code_doctype: hsl(30, 20%, 50%);
--theme_dark--code_number: hsl(350, 40%, 70%);
--theme_dark--code_string: hsl(75, 70%, 60%);
--theme_dark--code_attr-value: hsl(350, 40%, 70%); */
}

.notion-dark-theme
Expand Down
Loading

0 comments on commit ab7771c

Please sign in to comment.