delei opened a new pull request, #3820: URL: https://github.com/apache/hertzbeat/pull/3820
## What's changed? Close #3133 ### Summary - Add a `github-avatar.js` script to fetch the base64 string of the GitHub avatar - Replace with the base64 string - Refactor team page layout and contributor grid ### GitHub Avatar The `github-avatar.js` script was developed using `Node.js` to read files `src/pages/team/data/member.json` and `.all-contributorsrc`, 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 yarn github-avatar ``` output result: ```bash $ node github-avatar.js ==> Reading src/pages/team/data/member.json file ==> Reading ../.all-contributorsrc file ==> Processing avatars -- Fetching avatar for 24788200 ... [1/271] ✓ Successfully processed 24788200 -- Fetching avatar for 48920254 ... [2/271] ✓ Successfully processed 48920254 -- Fetching avatar for 30048352 ... [3/271] ✓ Successfully processed 30048352 -- Fetching avatar for 85919258 ... [4/271] ✓ Successfully processed 85919258 -- Fetching avatar for 74083801 ... [5/271] ... ==> Writing src/pages/team/data/github_avatar.json file ✓ Done! ``` ### Team Page light <img width="1638" height="1387" alt="1" src="https://github.com/user-attachments/assets/68ab1516-0af9-4362-a4a6-c0284eb5111c" /> dark <img width="1613" height="1317" alt="2" src="https://github.com/user-attachments/assets/2ba278e1-88b5-464a-9e02-482f52b54641" /> ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [x] I have added the necessary unit tests and all cases have passed. ## Add or update API - [ ] I have added the necessary [e2e tests](https://github.com/apache/hertzbeat/tree/master/e2e) 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]
