diff --git a/repo/menu/components.mjs b/repo/menu/components.mjs index 5bb4130..355bda8 100644 --- a/repo/menu/components.mjs +++ b/repo/menu/components.mjs @@ -144,7 +144,6 @@ export const options = { .slice(5, -1) .split(',') .map((i) => parseInt(i)); - console.log(r, g, b, fmt.rgbContrast(r, g, b)); $input.style.color = fmt.rgbContrast(r, g, b); $input.style.padding = ''; }, diff --git a/repo/menu/menu.mjs b/repo/menu/menu.mjs index 4a90499..1072545 100644 --- a/repo/menu/menu.mjs +++ b/repo/menu/menu.mjs @@ -224,8 +224,10 @@ const _$modListCache = {}, }); $mod.addEventListener('click', async (event) => { if ($mod.className === 'mod-selected') return; - for (const $selected of document.querySelectorAll('.mod-selected')) { - $selected.className = 'mod'; + for (const $list of Object.values(_$modListCache)) { + for (const $selected of $list.querySelectorAll('.mod-selected')) { + $selected.className = 'mod'; + } } $mod.className = 'mod-selected'; const fragment = [ diff --git a/repo/neutral/app.css b/repo/neutral/app.css index 1e27956..973d1e3 100644 --- a/repo/neutral/app.css +++ b/repo/neutral/app.css @@ -32,7 +32,9 @@ font-size: 1.3rem !important; } .notion-frame .notion-scroller.vertical.horizontal .notion-page-content, -.notion-overlay-container .notion-scroller.vertical .notion-page-content, +.notion-overlay-container .notion-scroller.vertical .notion-page-content { + font-size: 15px !important; +} .notion-frame .notion-scroller.vertical.horizontal .notion-page-content[style*='font-size: 14px'], diff --git a/repo/theming/theme.css b/repo/theming/theme.css index 207873c..aade6ea 100644 --- a/repo/theming/theme.css +++ b/repo/theming/theme.css @@ -6,26 +6,49 @@ /** layout **/ -.notion-frame .notion-scroller [style*='env(safe-area-inset-'][style*=' width: 900px'], -.notion-frame .notion-scroller [style*='env(safe-area-inset-'][style*=';width: 900px'], .notion-frame - .notion-scroller - [style*='height: 30vh'] - [style*='pointer-events:'][style*='max-width: 100%; width: 900px'] { + > .notion-scroller.vertical.horizontal + > .pseudoSelection + > div + > div:nth-child(3)[style*='width: 900px'], +.notion-frame + > .notion-scroller.vertical.horizontal + > .pseudoSelection + + div + > :nth-child(1)[style*='width: 900px'], +.notion-frame + > .notion-scroller.vertical.horizontal + > :nth-child(2) + > :nth-child(2)[style*='display: flex; width: 100%; justify-content: center;'] + > :nth-child(1)[style*='width: 900px'] { width: var(--theme--page-width) !important; } -.notion-frame .notion-scroller [style*='env(safe-area-inset-'][style*=' width: 100%'], .notion-frame - .notion-scroller - [style*='height: 30vh'] - [style*='pointer-events:'][style*='max-width: 100%; width: 100%'] { + > .notion-scroller.vertical.horizontal + > .pseudoSelection + > div + > div:nth-child(3):not([style*='width: 900px']), +.notion-frame + > .notion-scroller.vertical.horizontal + > .pseudoSelection + + div + > :nth-child(1):not([style*='width: 900px']), +.notion-frame + > .notion-scroller.vertical.horizontal + > :nth-child(2) + > :nth-child(2)[style*='display: flex; width: 100%; justify-content: center;'] + > :nth-child(1):not([style*='width: 900px']) { width: var(--theme--page-width_full) !important; } -.notion-frame - [style*='padding-left: calc(96px + env(safe-area-inset-left)); padding-right: calc(96px + env(safe-area-inset-right));'] { - padding-left: var(--theme--page-padding) !important; +.notion-page-content [style*='width: 100%; max-width:'][style*='align-self: center;'] { + max-width: 100% !important; +} +.notion-frame [style*='padding-right: calc(96px + env(safe-area-inset-right));'] { padding-right: var(--theme--page-padding) !important; } +.notion-frame [style*='padding-left: calc(96px + env(safe-area-inset-left));'] { + padding-left: var(--theme--page-padding) !important; +} [style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;'], [style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;'] img { @@ -36,7 +59,6 @@ .notion-peek-renderer > :nth-child(2) { max-width: var(--theme--page_preview-width) !important; } - .notion-peek-renderer .notion-scroller.vertical [style*='padding-left: calc(126px + env(safe-area-inset-left));'] { @@ -62,7 +84,6 @@ padding-right: var(--theme--page_preview-padding) !important; width: 100%; } - .notion-peek-renderer .notion-scroller.vertical [style*='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 20vh;'], @@ -444,7 +465,7 @@ body, > div > div > div:nth-child(1) - > div { + > div[style*='background'] { background: var(--theme--ui_input) !important; } diff --git a/repo/tweaks/client.css b/repo/tweaks/client.css index de0b77d..504e3a2 100644 --- a/repo/tweaks/client.css +++ b/repo/tweaks/client.css @@ -14,7 +14,8 @@ .enhancer--tweak-responsive_breakpoint .notion-column_list-block [style='display: flex;'] { flex-direction: column !important; } -.enhancer--tweak-responsive_breakpoint .notion-app-inner { +.enhancer--tweak-responsive_breakpoint .notion-app-inner, +.enhancer--tweak-full_width_pages .notion-app-inner { --theme--page-width: 100%; --theme--page-padding: calc(48px + env(safe-area-inset-left)); } @@ -32,59 +33,23 @@ padding-right: 4px; } .enhancer--tweak-normalise_table_scroll - .notion-frame - .notion-page-content .notion-collection_view-block - [style*='padding-left: 126px'], + > [contenteditable] + > .notion-scroller + > [class$='view'][style*='padding-left'], .enhancer--tweak-normalise_table_scroll - .notion-frame - .notion-page-content .notion-collection_view-block - [style*='padding-left: 96px'], -.enhancer--tweak-normalise_table_scroll - .notion-peek-renderer - .notion-collection_view-block - [style*='padding-left: 126px'], -.enhancer--tweak-normalise_table_scroll - .notion-peek-renderer - .notion-collection_view-block - [style*='padding-left: 96px'], -.enhancer--tweak-normalise_table_scroll - .notion-page-template-modal - .notion-collection_view-block - [style*='padding-left: 126px'], -.enhancer--tweak-normalise_table_scroll - .notion-page-template-modal - .notion-collection_view-block - [style*='padding-left: 96px'] { + > :first-child[style*='padding-left'] { padding-left: 0 !important; } .enhancer--tweak-normalise_table_scroll - .notion-frame - .notion-page-content .notion-collection_view-block - [style*='padding-right: 126px'], + > [contenteditable] + > .notion-scroller + > [class$='view'][style*='padding-right'], .enhancer--tweak-normalise_table_scroll - .notion-frame - .notion-page-content .notion-collection_view-block - [style*='padding-right: 96px'], -.enhancer--tweak-normalise_table_scroll - .notion-peek-renderer - .notion-collection_view-block - [style*='padding-right: 126px'], -.enhancer--tweak-normalise_table_scroll - .notion-peek-renderer - .notion-collection_view-block - [style*='padding-right: 96px'], -.enhancer--tweak-normalise_table_scroll - .notion-page-template-modal - .notion-collection_view-block - [style*='padding-right: 126px'], -.enhancer--tweak-normalise_table_scroll - .notion-page-template-modal - .notion-collection_view-block - [style*='padding-right: 96px'] { + > :first-child[style*='padding-right'] { padding-right: 0 !important; } diff --git a/repo/tweaks/client.mjs b/repo/tweaks/client.mjs index fe08b3b..33963de 100644 --- a/repo/tweaks/client.mjs +++ b/repo/tweaks/client.mjs @@ -21,7 +21,6 @@ export default async function (api, db) { screen.width * 0.01 * (await db.get(['tweak.responsive_breakpoint_percent'])), addResponsiveBreakpoint = () => { document.body.classList.remove('enhancer--tweak-responsive_breakpoint'); - console.log(responsiveBreakpointPercent, window.innerWidth); if ( window.innerWidth <= responsiveBreakpointPx || window.innerWidth <= responsiveBreakpointPercent @@ -33,6 +32,7 @@ export default async function (api, db) { addResponsiveBreakpoint(); const tweaks = [ + 'full_width_pages', 'normalise_table_scroll', 'hide_help', 'hide_slash_for_commands', diff --git a/repo/tweaks/mod.json b/repo/tweaks/mod.json index 3090646..a95f443 100644 --- a/repo/tweaks/mod.json +++ b/repo/tweaks/mod.json @@ -40,6 +40,13 @@ "tooltip": "the **percentage of the screen below which in-page columns are resized to appear full-width** to reduce content squishing", "value": 30 }, + { + "type": "toggle", + "key": "tweak.full_width_pages", + "label": "full width pages", + "tooltip": "**decreases padding so every page appears full width**", + "value": false + }, { "type": "toggle", "key": "tweak.normalise_table_scroll",