11import React from 'react' ;
22import { format } from 'fecha' ;
33import { PostData } from '../loader' ;
4- import { globals } from '../globals' ;
54
65export const FollowButton = ( ) => {
76 return (
87 < a href = "/newsletter" >
9- < div
10- style = { {
11- display : 'inline-block' ,
12- border : `1px solid ${ globals . accentColor } ` ,
13- borderRadius : '4px' ,
14- padding : '2px 10px' ,
15- color : globals . accentColor ,
16- fontSize : '10pt' ,
17- marginBottom : '2px' ,
18- marginLeft : '4px' ,
19- } }
20- >
21- Follow
22- </ div >
8+ < div className = "follow-button" > Follow</ div >
239 </ a >
2410 ) ;
2511} ;
2612
2713export const Author : React . FC < { post : PostData } > = ( props ) => {
2814 return (
29- < div
30- style = { {
31- margin : '0px' ,
32- padding : '0px' ,
33- } }
34- >
35- < div
36- style = { {
37- display : 'flex' ,
38- flexDirection : 'row' ,
39- alignItems : 'center' ,
40- justifyContent : 'flex-start' ,
41- } }
42- >
15+ < div className = "author-container" >
16+ < div className = "author" >
4317 { props . post . authorPhoto && (
44- < img
45- src = { props . post . authorPhoto }
46- style = { {
47- width : '70px' ,
48- height : '70px' ,
49- borderRadius : '35px' ,
50- margin : '0px 10px 0px 0px' ,
51- } }
52- />
18+ < img src = { props . post . authorPhoto } className = "author-image" />
5319 ) }
5420 < AuthorLines post = { props . post } />
5521 </ div >
@@ -58,35 +24,25 @@ export const Author: React.FC<{ post: PostData }> = (props) => {
5824} ;
5925
6026export const AuthorLines : React . FC < { post : PostData } > = ( props ) => {
61- const lineStyle = {
62- margin : '2px' ,
63- padding : 0 ,
64- lineHeight : 1.2 ,
65- fontSize : '11pt' ,
66- } ;
6727 return (
6828 < div >
69- < p style = { { ...lineStyle } } >
70- { props . post . author
71- ? props . post . author
72- : '' }
29+ < p className = "author-line" >
30+ { props . post . author && < span > { props . post . author } </ span > }
31+
32+ { props . post . authorTwitter && (
33+ < span >
34+ { ' ' }
35+ < a
36+ href = { `https://twitter.com/${ props . post . authorTwitter } ` }
37+ > { `@${ props . post . authorTwitter } ` } </ a > { ' ' }
38+ </ span >
39+ ) }
7340 </ p >
74- < p style = { { opacity : 0.6 , ... lineStyle } } >
41+ < p className = "author-line subtle" >
7542 { props . post . datePublished
7643 ? format ( new Date ( props . post . datePublished ) , 'MMMM Do, YYYY' )
7744 : '' }
7845 </ p >
79- < p style = { { ...lineStyle } } >
80- { props . post . authorTwitter && (
81- < a
82- style = { {
83- textDecoration : 'none' ,
84- color : '#3b9488' ,
85- } }
86- href = { `https://twitter.com/${ props . post . authorTwitter } ` }
87- > { `@${ props . post . authorTwitter } ` } </ a >
88- ) }
89- </ p >
9046 </ div >
9147 ) ;
9248} ;
0 commit comments