From 4d1076a5f0374230b82e63f227be8616c6240ebb Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Thu, 21 Jan 2021 22:12:45 -0500 Subject: [PATCH] feat: style fixes and adding inline toc --- .github/funding.yml | 1 + .github/issue_template.md | 7 +++++++ .github/pull_request_template.md | 7 +++++++ components/NotionPage.tsx | 5 +++++ readme.md | 1 - styles/global.css | 4 ++++ styles/notion.css | 4 ++++ 7 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/funding.yml create mode 100644 .github/issue_template.md create mode 100644 .github/pull_request_template.md diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..9377c23 --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1 @@ +github: [transitive-bullshit] diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000..d1da5d0 --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,7 @@ + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..d1da5d0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ + diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 92c7858..fcc29ab 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -90,6 +90,9 @@ export const NotionPage: React.FC = ({ const isBlogPost = block.type === 'page' && block.parent_table === 'collection' + const showTableOfContents = !!isBlogPost + const minTableOfContentsItems = 3 + const socialImage = config.api.renderSocialImage(pageId) const socialDescription = getPageDescription(block, recordMap) ?? config.description @@ -194,6 +197,8 @@ export const NotionPage: React.FC = ({ darkMode={isDarkMode} previewImages={site.previewImages !== false} showCollectionViewDropdown={false} + showTableOfContents={true} + minTableOfContentsItems={minTableOfContentsItems} defaultPageIcon={config.defaultPageIcon} defaultPageCover={config.defaultPageCover} defaultPageCoverPosition={config.defaultPageCoverPosition} diff --git a/readme.md b/readme.md index ad913f7..28ccad5 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,6 @@ Example article page -

# Next.js Notion Starter Kit diff --git a/styles/global.css b/styles/global.css index 3f62db4..a0d68c0 100644 --- a/styles/global.css +++ b/styles/global.css @@ -15,6 +15,10 @@ html { Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; } +body { + overflow-x: hidden; +} + .utterances { max-width: 100% !important; } diff --git a/styles/notion.css b/styles/notion.css index a415923..c9e4caa 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -7,6 +7,10 @@ * places to add some flare and make our site look more like a blog. */ +.notion { + --notion-max-width: 720px; +} + .notion-page { margin: 0 12px; width: 720px;