diff --git a/src/components/custom-blocks/page-reference.tsx b/src/components/custom-blocks/page-reference.tsx index 62481d1b..78cc76c2 100644 --- a/src/components/custom-blocks/page-reference.tsx +++ b/src/components/custom-blocks/page-reference.tsx @@ -6,7 +6,7 @@ import { Caption, Text } from '@components/typography'; import Link from 'next/link'; import routes from '@common/routes'; import { Img } from '@components/mdx/image'; - +import { css } from '@styled-system/css'; const Image = ({ src, isHovered, @@ -130,15 +130,26 @@ const GridCard: React.FC = ({ page, ...rest }) => { }); return ( - - + + + + @@ -166,7 +177,8 @@ export const PageReference = ({ children }) => { gridRowGap={space('loose')} gridTemplateColumns={[ `repeat(1, 1fr)`, - `repeat(1, 1fr)`, + `repeat(${pages.length === 1 ? 1 : 2}, 1fr)`, + `repeat(${pages.length === 1 ? 1 : 2}, 1fr)`, `repeat(${pages.length === 1 ? 1 : 3}, 1fr)`, ]} > diff --git a/src/components/mdx/components/code.tsx b/src/components/mdx/components/code.tsx index 4cad6e12..ea10942d 100644 --- a/src/components/mdx/components/code.tsx +++ b/src/components/mdx/components/code.tsx @@ -79,7 +79,7 @@ export const Code: React.FC< pr: space(['base-loose', 'base-loose', 'extra-loose', 'extra-loose']), pl: lines <= LINE_MINIMUM || lang === 'bash' - ? space(['base-loose', 'base-loose', 'base-loose', 'base-loose']) + ? space(['extra-loose', 'extra-loose', 'base-loose', 'base-loose']) : 'unset', })} {...rest}