add quote variable for themes and quote input for font chooser

This commit is contained in:
Emir 2020-12-04 20:44:26 +03:00
parent e8f8576f63
commit 163fa3e06f
3 changed files with 19 additions and 3 deletions

View File

@ -4,6 +4,7 @@
* (c) 2020 TarasokUA * (c) 2020 TarasokUA
* (c) 2020 Arecsu * (c) 2020 Arecsu
* (c) 2020 u/zenith_illinois * (c) 2020 u/zenith_illinois
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license * under the MIT license
*/ */
@ -145,6 +146,9 @@
[style*='SFMono-Regular'] { [style*='SFMono-Regular'] {
font-family: var(--theme--font_code) !important; font-family: var(--theme--font_code) !important;
} }
.notion-selectable.notion-quote-block div[spellcheck="true"] {
font-family: var(--theme--font_quote) !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'] { .notion-overlay-container .notion-page-block div[placeholder='Untitled'] {
font-size: calc( font-size: calc(

View File

@ -4,6 +4,7 @@
* (c) 2020 TarasokUA * (c) 2020 TarasokUA
* (c) 2020 Arecsu * (c) 2020 Arecsu
* (c) 2020 u/zenith_illinois * (c) 2020 u/zenith_illinois
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license * under the MIT license
*/ */
@ -35,6 +36,7 @@
--theme_dark--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace; --theme_dark--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace;
--theme_dark--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, --theme_dark--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
Courier, monospace; Courier, monospace;
--theme_dark--font_quote: var(--theme_dark--font_sans);
--theme_dark--font_title-size: 40px; --theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 1.875em; --theme_dark--font_heading1-size: 1.875em;
@ -219,6 +221,7 @@
--theme_light--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace; --theme_light--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace;
--theme_light--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, --theme_light--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
Courier, monospace; Courier, monospace;
--theme_light--font_quote: var(--theme_light--font_sans);
--theme_light--font_title-size: 40px; --theme_light--font_title-size: 40px;
--theme_light--font_heading1-size: 1.875em; --theme_light--font_heading1-size: 1.875em;
@ -396,6 +399,7 @@
--theme--font_serif: var(--theme_dark--font_serif); --theme--font_serif: var(--theme_dark--font_serif);
--theme--font_mono: var(--theme_dark--font_mono); --theme--font_mono: var(--theme_dark--font_mono);
--theme--font_code: var(--theme_dark--font_code); --theme--font_code: var(--theme_dark--font_code);
--theme--font_quote: var(--theme_dark--font_sans);
--theme--font_title-size: var(--theme_dark--font_title-size); --theme--font_title-size: var(--theme_dark--font_title-size);
--theme--font_heading1-size: var(--theme_dark--font_heading1-size); --theme--font_heading1-size: var(--theme_dark--font_heading1-size);
--theme--font_heading2-size: var(--theme_dark--font_heading2-size); --theme--font_heading2-size: var(--theme_dark--font_heading2-size);
@ -562,6 +566,7 @@
--theme--font_serif: var(--theme_light--font_serif); --theme--font_serif: var(--theme_light--font_serif);
--theme--font_mono: var(--theme_light--font_mono); --theme--font_mono: var(--theme_light--font_mono);
--theme--font_code: var(--theme_light--font_code); --theme--font_code: var(--theme_light--font_code);
--theme--font_quote: var(--theme_light--font_sans);
--theme--font_title-size: var(--theme_light--font_title-size); --theme--font_title-size: var(--theme_light--font_title-size);
--theme--font_heading1-size: var(--theme_light--font_heading1-size); --theme--font_heading1-size: var(--theme_light--font_heading1-size);
--theme--font_heading2-size: var(--theme_light--font_heading2-size); --theme--font_heading2-size: var(--theme_light--font_heading2-size);

View File

@ -2,6 +2,7 @@
* font chooser * font chooser
* (c) 2020 torchatlas (https://bit.ly/torchatlas) * (c) 2020 torchatlas (https://bit.ly/torchatlas)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/) * (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license * under the MIT license
*/ */
@ -12,8 +13,8 @@ module.exports = {
tags: ['extension'], tags: ['extension'],
name: 'font chooser', name: 'font chooser',
desc: desc:
'customize fonts. for each option, type in the name of the font you would like to use, or leave it blank to not change anything.', 'customize fonts. for each option, type in the name of the font you would like to use, or leave it blank to not change anything.<br/><br/>make sure the fonts you type are installed on your device.',
version: '0.1.1', version: '0.1.2',
author: 'torchatlas', author: 'torchatlas',
options: [ options: [
{ {
@ -40,6 +41,12 @@ module.exports = {
type: 'input', type: 'input',
value: '', value: '',
}, },
{
key: 'quote',
label: 'quote:',
type: 'input',
value: '',
},
], ],
hacks: { hacks: {
'renderer/preload.js'(store, __exports) { 'renderer/preload.js'(store, __exports) {
@ -47,7 +54,7 @@ module.exports = {
async function enhance() { async function enhance() {
if (!document.querySelector('.notion-app-inner')) return; if (!document.querySelector('.notion-app-inner')) return;
clearInterval(attempt_interval); clearInterval(attempt_interval);
for (let style of ['sans', 'serif', 'mono', 'code']) { for (let style of ['sans', 'serif', 'mono', 'code', 'quote']) {
if (!store()[style]) continue; if (!store()[style]) continue;
document document
.querySelector('.notion-app-inner') .querySelector('.notion-app-inner')