styling updates

This commit is contained in:
Travis Fischer
2021-01-25 16:30:49 -05:00
parent 1a4306cb88
commit f35d8eb0eb
5 changed files with 18 additions and 32 deletions

View File

@@ -1,21 +1,9 @@
import * as types from 'lib/types'
import { getTextContent } from 'notion-utils'
import * as types from './types'
import { getPageProperty } from 'notion-utils'
export function getPageDescription(
block: types.Block,
recordMap: types.RecordMap
recordMap: types.ExtendedRecordMap
): string | null {
const collection = recordMap.collection[block.parent_id]?.value
if (collection) {
const descriptionKey = Object.keys(collection.schema).find(
(key) => collection.schema[key].name === 'Description'
)
if (descriptionKey) {
return getTextContent(block.properties[descriptionKey])
}
}
return null
return getPageProperty('Description', block, recordMap)
}

View File

@@ -46,7 +46,7 @@
"react-body-classname": "^1.3.1",
"react-dom": "17.0.1",
"react-icons": "^4.1.0",
"react-notion-x": "^3.3.2",
"react-notion-x": "^3.4.1",
"react-use": "^15.3.3"
},
"devDependencies": {

View File

@@ -6,7 +6,7 @@
# Next.js Notion Starter Kit
> The perfect starter kit for building beautiful websites with Next.js and Notion.
> The perfect starter kit for building websites with Next.js and Notion.
[![Build Status](https://travis-ci.com/transitive-bullshit/nextjs-notion-starter-kit.svg?branch=main)](https://travis-ci.com/transitive-bullshit/nextjs-notion-starter-kit) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)

View File

@@ -61,19 +61,22 @@
}
.notion-collection-card {
border-radius: 15%;
/* border-radius: 15%;
border-top-right-radius: 5%;
border-bottom-left-radius: 5%;
box-shadow: 2px 2px 8px 4px rgba(15, 15, 15, 0.1);
border-bottom-left-radius: 5%; */
/* box-shadow: 2px 2px 8px 4px rgba(15, 15, 15, 0.1); */
border-radius: 25px;
box-shadow: none;
}
.notion-collection-card-cover img {
border-radius: 0;
/* border-radius: 0; */
border-radius: 25px;
}
.notion-collection-card-cover {
transition: filter 150ms linear;
filter: brightness(100%);
filter: none;
}
.notion-collection-card:hover .notion-collection-card-cover {
@@ -140,14 +143,9 @@
margin-right: auto;
}
.notion img.notion-page-icon-cover {
margin-top: -62px;
}
.notion-title {
display: block;
text-align: center;
margin-top: 4vmin;
}
.notion-collection-column-title {

View File

@@ -5146,10 +5146,10 @@ react-modal@^3.11.2:
react-lifecycles-compat "^3.0.0"
warning "^4.0.3"
react-notion-x@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-3.3.2.tgz#4c9b9a8be4aa406a35b7666d3b08d84481a33021"
integrity sha512-Ke49ScQriQDqcEF8BZuBUkubSbmQdjf8iL2xwXTEYOUqfX0uPf4KRG5p0jrEyAhF+HOU4ACMkFy9fxzc5EjyFg==
react-notion-x@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-3.4.1.tgz#b4905d4b3f7964d03d759e8099d3f82bd544b7f0"
integrity sha512-08Vonu4BaVss+q42w2MyrzL+PnBb2cgsma9D6tPPkuX9UAvn13avaaLJXJ/ORpvh9f4MBJ1jOfkuP7rp74g1xQ==
dependencies:
"@matejmazur/react-katex" "^3.1.3"
date-fns "^2.15.0"