delei opened a new pull request, #652:
URL: https://github.com/apache/fesod/pull/652

   ## Purpose of the pull request
   
   Replace the avatar on the team page with a base64 image.
   
   ## What's changed?
   
   ### Summary
   
   - Add a `github-avatar.js` script to fetch the base64 string of the GitHub 
avatar.
   - Replace with the base64 string.
   - Remove the unnecessary avatar images files
   
   ### GitHub Avatar
   
   The `github-avatar.js` script was developed using `Node.js` to read files 
`src/pages/team/data/member.json` , fetch all the githubId values, and 
separately retrieve the avatar files for each githubId and convert them into 
base64 strings. 
   
   The resulting base64 string results were stored in 
`src/pages/team/data/github-avatar.json`. The Team page will retrieve the 
base64 string of the GitHub avatar from this JSON file based on the `githubId`.
   
   In the local development environment, run the command to update all the 
avatar information.
   
   ```bash
   pnpm github-avatar
   ```
   
   output result:
   
   ```bash
   $ node github-avatar.js
   ==> Reading src/pages/team/data/team.json file
   
   ==> Processing avatars
   -- Fetching avatar for 29803617 ... [1/10]
   ✓ Successfully processed 29803617
   -- Fetching avatar for 13284744 ... [2/10]
   ✓ Successfully processed 13284744
   -- Fetching avatar for 11783444 ... [3/10]
   ✓ Successfully processed 11783444
   -- Fetching avatar for 18818196 ... [4/10]
   ✓ Successfully processed 18818196
   -- Fetching avatar for 18475586 ... [5/10]
   ✓ Successfully processed 18475586
   -- Fetching avatar for 198714007 ... [6/10]
   ✓ Successfully processed 198714007
   -- Fetching avatar for 10711694 ... [7/10]
   ✓ Successfully processed 10711694
   -- Fetching avatar for 5753992 ... [8/10]
   ✓ Successfully processed 5753992
   -- Fetching avatar for 3264250 ... [9/10]
   ✓ Successfully processed 3264250
   -- Fetching avatar for 17263766 ... [10/10]
   ✓ Successfully processed 17263766
   
   ==> Write to src/pages/team/data/github-avatar.json
   
   ✓ Done!
   ```
   
   ## Checklist
   
   - [x] I have read the [Contributor 
Guide](https://fesod.apache.org/community/contribution/).
   - [x] I have written the necessary doc or comment.
   - [x] I have added the necessary unit tests and all cases have passed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to