1- import { makeStyles , Paper , Typography } from '@material-ui/core' ;
1+ import {
2+ Avatar ,
3+ Box ,
4+ Grid ,
5+ makeStyles ,
6+ Paper ,
7+ Typography
8+ } from '@material-ui/core' ;
29import React from 'react' ;
10+ import blogAuthors from '../../../../data/blogAuthors' ;
311
412const useStyles = makeStyles ( theme => ( {
513 root : {
@@ -60,6 +68,21 @@ const useStyles = makeStyles(theme => ({
6068 } ,
6169 extraPadding : {
6270 padding : '20px 0px'
71+ } ,
72+ author : {
73+ marginBottom : 0 ,
74+ [ theme . breakpoints . down ( 'md' ) ] : {
75+ margin : '20px 0px'
76+ }
77+ } ,
78+ avatarLarge : {
79+ width : '62px' ,
80+ height : '62px' ,
81+ margin : '12px 0px' ,
82+ marginRight : theme . spacing ( 2 ) ,
83+ '& img' : {
84+ width : '100%'
85+ }
6386 }
6487} ) ) ;
6588
@@ -72,7 +95,7 @@ export default function Blog({ rawHtml }) {
7295 variant = "h6"
7396 color = "secondary"
7497 >
75- Experience
98+ { rawHtml . categories [ 0 ] }
7699 </ Typography >
77100 < Typography className = { classes . extraBottompadding } variant = "h3" >
78101 { rawHtml . title }
@@ -83,6 +106,74 @@ export default function Blog({ rawHtml }) {
83106 >
84107 { rawHtml . pubDate . split ( ' ' ) [ 0 ] . replaceAll ( '-' , ' ' ) } | 7 min Read
85108 </ Typography >
109+ < Grid container justify = "space-between" alignItems = "center" >
110+ < Grid
111+ item
112+ className = { classes . author }
113+ justify = "flex-end"
114+ alignContent = "flex-end"
115+ alignItems = "flex-end"
116+ >
117+ < Box display = "flex" alignItems = "center" >
118+ < Avatar
119+ className = { classes . avatarLarge }
120+ alt = ""
121+ width = "20px"
122+ src = { blogAuthors [ rawHtml . author ] . avatar }
123+ />
124+ < Box display = "flex" flexDirection = "column" >
125+ < Box fontWeight = "fontWeightBold" >
126+ < Typography variant = "h6" > { rawHtml . author } </ Typography >
127+ < Typography variant = "caption" > Learner</ Typography >
128+ </ Box >
129+ </ Box >
130+ </ Box >
131+ </ Grid >
132+ < Grid >
133+ < Grid row container alignItems = "center" >
134+ < Typography
135+ display = "inline"
136+ variant = "caption"
137+ style = { { fontSize : '14px' } }
138+ >
139+ Share this Article
140+ </ Typography >
141+ < Grid >
142+ < Grid container style = { { marginLeft : '12px' } } >
143+ < Grid >
144+ < img
145+ alt = ""
146+ src = "/static/images/icons/social/fb.svg"
147+ style = { { height : '34px' , display : 'inline' } }
148+ />
149+ </ Grid >
150+ < Grid >
151+ < img
152+ alt = ""
153+ src = "/static/images/icons/social/ins.svg"
154+ style = { { height : '34px' , display : 'inline' } }
155+ />
156+ </ Grid >
157+ < Grid >
158+ < img
159+ alt = ""
160+ src = "/static/images/icons/social/tw.svg"
161+ style = { { height : '34px' , display : 'inline' } }
162+ />
163+ </ Grid >
164+ < Grid >
165+ < img
166+ alt = ""
167+ src = "/static/images/icons/social/yt.svg"
168+ style = { { height : '34px' , display : 'inline' } }
169+ />
170+ </ Grid >
171+ </ Grid >
172+ </ Grid >
173+ </ Grid >
174+ </ Grid >
175+ </ Grid >
176+
86177 < div
87178 dangerouslySetInnerHTML = { {
88179 __html : rawHtml . description . replace ( / \n / g, '<br />' )
0 commit comments