tweaks: #155 more readable line spacing

This commit is contained in:
dragonwocky 2020-10-27 19:57:20 +11:00
parent 5d439bbdc8
commit 9d3ab72eb7
5 changed files with 25 additions and 11 deletions

View File

@ -199,7 +199,7 @@
/** text-block readability **/ /** text-block readability **/
.notion-selectable.notion-text-block { .notion-page-content .notion-selectable.notion-text-block {
line-height: var(--theme--text-block_line-height) !important; line-height: var(--theme--text-block_line-height) !important;
margin-top: var(--theme--text-block_margin-top) !important; margin-top: var(--theme--text-block_margin-top) !important;
} }

View File

@ -139,7 +139,7 @@ window['__start'] = async () => {
!(event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey; !(event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey;
if ( if (
meta && meta &&
document.activeElement.parentElement.id === 'tags' && document.activeElement.getAttribute('tabindex') === '0' &&
event.key === 'Enter' event.key === 'Enter'
) )
document.activeElement.click(); document.activeElement.click();
@ -228,7 +228,7 @@ window['__start'] = async () => {
.map((mod) => `<b>${mod.name}</b>`) .map((mod) => `<b>${mod.name}</b>`)
.join( .join(
', ' ', '
)}. <br> resolve or <span data-action="dismiss">dismiss</span> to continue.` )}. <br> resolve or <span data-action="dismiss" tabindex="0">dismiss</span> to continue.`
); );
alert.el alert.el
.querySelector('[data-action="dismiss"]') .querySelector('[data-action="dismiss"]')
@ -248,7 +248,7 @@ window['__start'] = async () => {
if (conflicts.relaunch) return; if (conflicts.relaunch) return;
conflicts.relaunch = createAlert( conflicts.relaunch = createAlert(
'info', 'info',
'changes may not fully apply until <span data-action="relaunch">app relaunch</span>.' 'changes may not fully apply until <span data-action="relaunch" tabindex="0">app relaunch</span>.'
); );
conflicts.relaunch.el conflicts.relaunch.el
.querySelector('[data-action="relaunch"]') .querySelector('[data-action="relaunch"]')

View File

@ -42,7 +42,7 @@ module.exports = {
{ {
key: 'close_to_tray', key: 'close_to_tray',
label: 'close window to the tray', label: 'close window to the tray',
description: `pressing the × close button will hide the app instead of quitting it. description: `pressing the × close button will hide the app instead of quitting it.\
it can be re-shown by clicking the tray icon or using the hotkey.`, it can be re-shown by clicking the tray icon or using the hotkey.`,
type: 'toggle', type: 'toggle',
value: true, value: true,
@ -80,9 +80,9 @@ module.exports = {
{ {
key: 'default_page', key: 'default_page',
label: 'default page id/url:', label: 'default page id/url:',
description: `every new tab/window that isn't opening a url via the notion:// description: `every new tab/window that isn't opening a url via the notion://\
protocol will load this page. to get a page link from within the app, protocol will load this page. to get a page link from within the app,\
go to the triple-dot menu and click "copy link". go to the triple-dot menu and click "copy link".\
leave blank to just load the last page you opened.`, leave blank to just load the last page you opened.`,
type: 'input', type: 'input',
value: '', value: '',

View File

@ -18,7 +18,7 @@ module.exports = {
{ {
key: 'dragarea_height', key: 'dragarea_height',
label: 'height of frameless dragarea:', label: 'height of frameless dragarea:',
description: `the rectangle added at the top of a window in "integrated titlebar" mode, description: `the rectangle added at the top of a window in "integrated titlebar" mode,\
used to drag/move the window.`, used to drag/move the window.`,
type: 'input', type: 'input',
value: 15, value: 15,
@ -26,7 +26,7 @@ module.exports = {
{ {
key: 'responsive_breakpoint', key: 'responsive_breakpoint',
label: 'width to wrap columns at:', label: 'width to wrap columns at:',
description: `the size in pixels below which in-page columns are resized to appear description: `the size in pixels below which in-page columns are resized to appear\
full width so content isn't squished.`, full width so content isn't squished.`,
type: 'input', type: 'input',
value: 600, value: 600,
@ -49,6 +49,12 @@ module.exports = {
key: 'thicker_bold', key: 'thicker_bold',
label: 'thicker bold text', label: 'thicker bold text',
type: 'toggle', type: 'toggle',
value: true,
},
{
key: 'spaced_lines',
label: 'more readable line spacing',
type: 'toggle',
value: false, value: false,
}, },
{ {
@ -65,8 +71,9 @@ module.exports = {
document.body.dataset.tweaks = [ document.body.dataset.tweaks = [
'smooth_scrollbars', 'smooth_scrollbars',
'snappy_transitions', 'snappy_transitions',
'hide_help',
'thicker_bold', 'thicker_bold',
'spaced_lines',
'hide_help',
] ]
.filter((tweak) => store()[tweak]) .filter((tweak) => store()[tweak])
.map((tweak) => `[${tweak}]`) .map((tweak) => `[${tweak}]`)

View File

@ -36,3 +36,10 @@
span[style*='font-weight:600'] { span[style*='font-weight:600'] {
font-weight: 700 !important; font-weight: 700 !important;
} }
[data-tweaks*='[spaced_lines]'] {
--theme_dark--text-block_line-height: 1.65;
--theme_dark--text-block_margin-top: 0.75em;
--theme_light--text-block_line-height: 1.65;
--theme_light--text-block_margin-top: 0.75em;
}