@@ -19,6 +19,7 @@ import Grid from '@material-ui/core/Grid';
1919import ListItem from 'app/components/List/Item' ;
2020import Stats from 'app/components/Member/Stats' ;
2121import getPlural from 'app/utils' ;
22+ import { GITHUB_URL } from 'app/config' ;
2223import moment from 'moment' ;
2324
2425const styles = theme => ( {
@@ -43,6 +44,41 @@ const styles = theme => ({
4344 fontSize : '1.5rem'
4445 }
4546 } ,
47+ smallGithubContributions : {
48+ fontSize : '0.4rem'
49+ } ,
50+ smallGithubRepo : {
51+ padding : '2px'
52+ } ,
53+ githubContainer : {
54+ width : '60%' ,
55+ [ theme . breakpoints . down ( 'lg' ) ] : {
56+ width : '80%'
57+ } ,
58+ [ theme . breakpoints . down ( 'md' ) ] : {
59+ width : '60%'
60+ } ,
61+ [ theme . breakpoints . down ( 'sm' ) ] : {
62+ width : '100%'
63+ }
64+ } ,
65+ githubRepoName : {
66+ color : 'white' ,
67+ fontWeight : 'bold'
68+ } ,
69+ githubContributions : {
70+ opacity : 0.6 ,
71+ fontSize : '0.8rem' ,
72+ [ theme . breakpoints . down ( 'lg' ) ] : {
73+ fontSize : '0.65rem'
74+ } ,
75+ [ theme . breakpoints . down ( 'md' ) ] : {
76+ fontSize : '0.5rem'
77+ } ,
78+ [ theme . breakpoints . down ( 'sm' ) ] : {
79+ fontSize : '0.5rem'
80+ }
81+ } ,
4682 firstSeen : {
4783 fontSize : '0.6rem' ,
4884 opacity : 0.7
@@ -93,6 +129,7 @@ const Item = props => {
93129 avatar,
94130 name,
95131 github,
132+ githubContributions,
96133 brusData,
97134 kaffeData,
98135 birthday,
@@ -141,11 +178,31 @@ const Item = props => {
141178 isLegoDay = { isLegoDay }
142179 >
143180 < span > { name } </ span >
144- < span >
181+ < div className = { classes . githubContainer } >
145182 < FontAwesomeIcon className = { classes . statsIcon } icon = { faGithub } />
146183 < span > </ span >
147- < a href = { `https://github.com/${ github } ` } > @{ github } </ a >
148- </ span >
184+ < a href = { `${ GITHUB_URL } /${ github } ` } > @{ github } </ a >
185+ { width !== 'xs' && (
186+ < Grid
187+ container
188+ direction = { 'row' }
189+ justify = { 'space-between' }
190+ className = { classes . githubContributions }
191+ >
192+ { githubContributions . map ( item => (
193+ < div key = { `contributions-${ github } -${ item . repository } ` } >
194+ < a
195+ href = { `${ GITHUB_URL } /${ item . repository } ` }
196+ className = { classes . githubRepoName }
197+ >
198+ { item . repository . replace ( 'webkom/' , '' ) } :
199+ </ a > { ' ' }
200+ { item . contributions }
201+ </ div >
202+ ) ) }
203+ </ Grid >
204+ ) }
205+ </ div >
149206 { width === 'xs' && (
150207 < Grid
151208 container
@@ -262,6 +319,7 @@ Item.propTypes = {
262319 kaffeData : PropTypes . object . isRequired ,
263320 activityToday : PropTypes . string . isRequired ,
264321 lastSeen : PropTypes . string . isRequired ,
322+ githubContributions : PropTypes . object ,
265323 firstSeen : PropTypes . object ,
266324 birthday : PropTypes . object ,
267325 firstLegoCommit : PropTypes . object ,
0 commit comments