File tree Expand file tree Collapse file tree
components/blog/PostContent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,9 +163,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
163163 - ButtonLink
164164 - SubmitButton
165165 - AuthorBio
166+ - PostContent
166167 - SearchBar
167168 - BlogPostsContainer
168169 - RevealContentContainer
169-
170170- Updated ContactUsForm's checkbox wrapper from div to label to enhance its accessibility
171171- Updated SearchInput width to 100% for better styling
Original file line number Diff line number Diff line change 1- import styled , { css } from 'styled-components' ;
2-
3- const P = styled . p `
1+ .subtitle {
42 font-size : 2rem ;
53 font-style : italic ;
64 text-align : left ;
75 line-height : normal ;
86 margin : 2rem 0 ;
9- ` ;
10- const SubTitle = styled ( P ) `` ;
7+ }
118
12- const ContentContainer = styled . div `
9+ .contentContainer {
1310 a {
14- color: ${ ( { theme } ) => theme . colors . blue } ;
11+ color : var ( --color- blue) ;
1512 }
1613 .article-body-image-wrapper {
1714 display : flex ;
@@ -44,29 +41,23 @@ const ContentContainer = styled.div`
4441 font-size : 1rem ;
4542 padding : 1rem ;
4643 border-radius : 0.5rem ;
47- background-color: ${ ( { theme } ) => theme . colors . black } ;
48- color: ${ ( { theme } ) => theme . colors . white } ;
44+ background-color : var ( --color- black) ;
45+ color : var ( --color- white) ;
4946 overflow-x : scroll ;
5047 }
5148 .highlight__panel-action.js-fullscreen-code-action {
5249 display : none ;
5350 }
54- ` ;
51+ }
5552
56- const ImageWrapper = styled . div `
53+ .imageWrapper {
5754 position : relative ;
5855 max-width : 828px ;
5956 height : 348px ;
6057 margin : 0 auto ;
6158 img {
62- border-color: ${ ( { theme } ) => theme . colors . darkGrey } ;
59+ border-color : var ( --color-dark-grey ) ;
6360 border-radius : 10px ;
6461 object-fit : contain ;
6562 }
66- ` ;
67-
68- export default {
69- SubTitle,
70- ContentContainer,
71- ImageWrapper,
72- } ;
63+ }
Original file line number Diff line number Diff line change 1- import S from './styles ' ;
1+ import styles from './PostContent.module.scss ' ;
22import Image from 'next/image' ;
33import Container from '@/components/containers/Container' ;
4+
45export default function PostContent ( { post } ) {
56 const publishedDate = post . published_at . split ( 'T' ) [ 0 ] ;
67 return (
78 < Container >
89 < h1 > { post . title } </ h1 >
9- < S . SubTitle > { `${ post . user . name } \u00A0\u00A0\u00A0${ publishedDate } ` } </ S . SubTitle >
10-
10+ < p
11+ className = { styles . subtitle }
12+ > { `${ post . user . name } \u00A0\u00A0\u00A0${ publishedDate } ` } </ p >
1113 { post . cover_image && (
12- < S . ImageWrapper >
14+ < div className = { styles . imageWrapper } >
1315 < Image src = { post . cover_image } alt = 'Blog post cover' fill />
14- </ S . ImageWrapper >
16+ </ div >
1517 ) }
16- < S . ContentContainer >
18+ < div className = { styles . contentContainer } >
1719 < div dangerouslySetInnerHTML = { { __html : post . body_html } } />
18- </ S . ContentContainer >
20+ </ div >
1921 </ Container >
2022 ) ;
2123}
Original file line number Diff line number Diff line change 11:root {
22 --bg-contact-card : #ffffff ;
33 --bg-color : #eaeaea ;
4+ --color-black : #000000 ;
5+ --color-blue : #0000ee ;
46 --color-dark-grey : #9ba39d ;
57 --color-grey : #d9d9d9 ;
68 --color-white : #ffffff ;
You can’t perform that action at this time.
0 commit comments