mirror of
https://github.com/TRaSH-Guides/Guides.git
synced 2026-02-05 00:09:14 -06:00
update with colours
This commit is contained in:
10
.github/scripts/update-contributors.js
vendored
10
.github/scripts/update-contributors.js
vendored
@@ -22,15 +22,19 @@ function fetchPage() {
|
||||
return;
|
||||
}
|
||||
|
||||
response.data.forEach((user) => {
|
||||
response.data.forEach((user, i) => {
|
||||
// Exclude bots and actions-user
|
||||
if (user.type === 'Bot' || user.login.toLowerCase().includes('bot') || user.login === 'actions-user' || user.login === 'mynameisbogdan') return;
|
||||
|
||||
// Determine row index for background color
|
||||
const rowIndex = Math.floor(index / 5);
|
||||
const bgColor = (rowIndex % 2 === 0) ? '#1e2129' : '#303850';
|
||||
|
||||
const userHtml = `
|
||||
<div style="flex: 1 1 20%; border: 1px solid black; box-sizing: border-box; padding: 10px; text-align: center;">
|
||||
<div style="flex: 1 1 20%; background-color: ${bgColor}; border: 1px solid #373a42; padding: 10px; text-align: center;">
|
||||
<img src="${user.avatar_url}&v=4" style="width: 50px; border-radius: 50%;" alt="${user.login}">
|
||||
<br>
|
||||
<b><a href="${user.html_url}">${user.login}</a></b>
|
||||
<b><a href="${user.html_url}" style="color: #ffa500;">${user.login}</a></b>
|
||||
</div>`;
|
||||
|
||||
contributors += '\n' + indentString(userHtml, ' ');
|
||||
|
||||
Reference in New Issue
Block a user