Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
toggle header support added
Browse files Browse the repository at this point in the history
  • Loading branch information
amv146 committed Feb 9, 2022
1 parent 81213ca commit d45348c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
10 changes: 9 additions & 1 deletion indentation-lines/client.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@
.notion-page-content .notion-numbered_list-block > div > div:last-child,
.notion-page-content .notion-to_do-block > div > div:last-child,
.notion-page-content .notion-toggle-block > div > div:last-child,
.notion-page-content .notion-selectable.notion-sub_header-block > div > div > div:last-child,
.notion-page-content .notion-selectable.notion-sub_sub_header-block > div > div > div:last-child,
.notion-page-content .notion-selectable.notion-sub_sub_sub_header-block > div > div > div:last-child,
.notion-page-content .notion-table_of_contents-block > div > div > a > div > div {
position: relative;
}

.notion-page-content .notion-bulleted_list-block > div > div:last-child::before,
.notion-page-content .notion-numbered_list-block > div > div:last-child::before,
.notion-page-content .notion-to_do-block > div > div:last-child::before,
.notion-page-content .notion-toggle-block > div > div:last-child::before {
.notion-page-content .notion-toggle-block > div > div:last-child::before,
.notion-page-content .notion-selectable.notion-sub_header-block > div > div > div:last-child::before,
.notion-page-content .notion-selectable.notion-sub_sub_header-block > div > div > div:last-child::before,
.notion-page-content .notion-selectable.notion-sub_sub_sub_header-block > div > div > div:last-child::before,
.notion-page-content .pseudoSelection > div > div:last-child::before {
content: '';
position: absolute;
height: calc(100% - 2em);
Expand Down Expand Up @@ -93,3 +100,4 @@
> .plus:hover {
background: var(--theme--ui_interactive-hover) !important;
}

16 changes: 15 additions & 1 deletion indentation-lines/client.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,21 @@ export default async function ({ web }, db) {
}
}
}

if (await db.get(['toggle_header'])) {
css += `
.notion-page-content .notion-selectable.notion-sub_sub_header-block > div > div > div:last-child::before {
border-left: 1px ${style} var(--indentation_lines--color, currentColor);
opacity: ${opacity};
}
.notion-page-content .notion-selectable.notion-sub_header-block > div > div > div:last-child::before {
border-left: 1px ${style} var(--indentation_lines--color, currentColor);
opacity: ${opacity};
}
.notion-page-content .notion-selectable.notion-sub_sub_sub_header-block > div > div > div:last-child::before {
border-left: 1px ${style} var(--indentation_lines--color, currentColor);
opacity: ${opacity};
}`;
}
if (db.get(['table_of_contents'])) {
css += `
.notion-page-content .notion-table_of_contents-block > div > div > a > div
Expand Down
6 changes: 6 additions & 0 deletions indentation-lines/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
"label": "toggle lists",
"value": true
},
{
"type": "toggle",
"key": "toggle_header",
"label": "toggle headers",
"value": true
},
{
"type": "toggle",
"key": "table_of_contents",
Expand Down

0 comments on commit d45348c

Please sign in to comment.