Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub profile picture from github-data.json #943

Merged
merged 7 commits into from
Jan 20, 2021

Conversation

dmcneary
Copy link
Member

Fixes #925

See issue comments for screenshots and additional issues

@trtincher trtincher self-requested a review January 17, 2021 17:56
@jbubar
Copy link
Member

jbubar commented Jan 17, 2021

Can you go ahead and change the css file to make it the image look more similar

@dmcneary
Copy link
Member Author

CSS to alter height and width have now been removed

wins.html Outdated
/* if github url is provided in wins-data and permission
is granted, ghId is defined & we can use their github avatar */

let githubAvaUrl = ghId ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be cleaner if you wrote it something like this.

let githubAvaUrl = `https://avatars1.githubusercontent.com/u/${ghId}?v=4`;
let defaultAvaUrl = "/assets/images/wins-page/avatar-default.svg"
let profileImgSrc = ghId ? githubAvaUrl : defaultAvaUrl;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we just resolve that to one line with a comment? i.e.

/* if github url is provided in wins-data and permission 
is granted, ghId is defined & we can use their github avatar 
otherwise, use default avatar */

let profileImgSrc = ghId ? 
    `https://avatars1.githubusercontent.com/u/${ghId}?v=4` : 
    "/assets/images/wins-page/avatar-default.svg";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that is a great solution as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, pushed a new commit

Copy link
Contributor

@trtincher trtincher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay looks good!

@trtincher trtincher merged commit 616ecf1 into hackforla:gh-pages Jan 20, 2021
@jbubar jbubar mentioned this pull request Jan 24, 2021
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add github avatar photo
3 participants