fix: smaller margins on articles

This commit is contained in:
Morten Olsen
2023-01-28 21:56:49 +01:00
parent e3f56dbe47
commit 7ae92c5420
3 changed files with 18 additions and 4 deletions

View File

@@ -16,6 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.4",
"react-wrap-balancer": "^0.4.0",
"styled-components": "^5.3.6",
"three": "^0.147.0"
},

View File

@@ -3,6 +3,7 @@ import { GetStaticPaths, GetStaticProps } from 'next';
import styled from 'styled-components';
import React, { useMemo } from 'react';
import { ReactMarkdown } from 'react-markdown/lib/react-markdown';
import Balancer from 'react-wrap-balancer';
import { Jumbo, Overline } from 'typography';
import { ThemeProvider } from 'theme/provider';
import { createTheme } from 'theme/create';
@@ -30,7 +31,7 @@ const ArticleWrapper = styled.article`
const ArticleContent = styled.div`
max-width: 900px;
padding: 50px;
padding: 50px 30px;
letter-spacing: 0.5px;
line-height: 2.1rem;
color: ${({ theme }) => theme.colors.foreground};
@@ -148,9 +149,11 @@ const Article: React.FC<Props> = ({ article }) => {
<Wrapper>
<ArticleWrapper>
<ArticleContent>
{article.title.split(' ').map((word, index) => (
<Title key={index}>{word}</Title>
))}
<Balancer>
{article.title.split(' ').map((word, index) => (
<Title key={index}>{word}</Title>
))}
</Balancer>
<div>
<Meta>
By Morten Olsen - {article.stats.text}{' '}