Improved styling

This commit is contained in:
Leonardo Cavaletti 2020-05-17 19:17:26 +01:00
parent 3ff70de1b2
commit f93e9b8faf
3 changed files with 12 additions and 17 deletions

View File

@ -30,24 +30,19 @@ div[role="button"]:not(.notion-record-icon):hover {
padding-left: 0 !important; padding-left: 0 !important;
} }
/* normalizes database views width */
.notion-list-view,
.notion-gallery-view,
.notion-table-view,
.notion-board-view,
.notion-calendar-view {
padding-left: 0 !important;
padding-right: 0 !important;
}
/* add padding to banner, but not to image */ /* add padding to banner, but not to image */
.notion-scroller > div:first-child > div:last-child { .notion-scroller > div:first-child > div:last-child:not(.notion-collection_view_page-block) {
padding-right: 2em !important; padding-right: 2em !important;
padding-left: 2em !important; padding-left: 2em !important;
} }
/* add padding to content */ /* add padding to content */
.notion-scroller > div:nth-child(2) { .notion-scroller > div:nth-child(2),
.notion-list-view,
.notion-gallery-view,
.notion-table-view,
.notion-board-view,
.notion-calendar-view {
padding-right: 2em !important; padding-right: 2em !important;
padding-left: 2em !important; padding-left: 2em !important;
} }

View File

@ -56,6 +56,6 @@ for (let i = 0; i < pendingIframes.length; i++) {
const collectionSearchBoxes = document.getElementsByClassName("collectionSearch"); const collectionSearchBoxes = document.getElementsByClassName("collectionSearch");
for (let i = 0; i < collectionSearchBoxes.length; i++) { for (let i = 0; i < collectionSearchBoxes.length; i++) {
const collectionSearchBox = collectionSearchBoxes.item(i).parentElement(); const collectionSearchBox = collectionSearchBoxes.item(i).parentElement;
collectionSearchBox.style.display = "none"; collectionSearchBox.style.display = "none";
} }

View File

@ -311,12 +311,12 @@ class Parser():
fonts_selectors = { fonts_selectors = {
"site" : "div:not(.notion-code-block)", "site" : "div:not(.notion-code-block)",
"navbar": ".notion-topbar div", "navbar": ".notion-topbar div",
"title" : ".notion-page-block, .notion-collection_view_page-block", "title" : ".notion-page-block > div, .notion-collection_view_page-block > div",
"h1" : ".notion-header-block div", "h1" : ".notion-header-block div",
"h2" : ".notion-sub_header-block div", "h2" : ".notion-sub_header-block div",
"h3" : ".notion-sub_sub_header-block div", "h3" : ".notion-sub_sub_header-block div",
"body" : ".notion-app-inner", "body" : ".notion-app-inner",
"code" : ".notion-code-block *" "code" : ".notion-code-block *",
} }
custom_fonts = self.get_page_config(url).get("fonts", {}) custom_fonts = self.get_page_config(url).get("fonts", {})
if (custom_fonts): if (custom_fonts):