diff --git a/.github/readme/imgs/plugin_achievements_ranks.png b/.github/readme/imgs/plugin_achievements_ranks.png
new file mode 100644
index 00000000..d63a3907
Binary files /dev/null and b/.github/readme/imgs/plugin_achievements_ranks.png differ
diff --git a/source/plugins/achievements/README.md b/source/plugins/achievements/README.md
index c8dc10ed..249e0fcb 100644
--- a/source/plugins/achievements/README.md
+++ b/source/plugins/achievements/README.md
@@ -13,6 +13,15 @@ Achievements are mostly related to features offered by GitHub, so by unlocking a
A few achievements contains actual real ranking (based on [GitHub search](https://github.com/search) results)!
+**About achievements ranks**
+
+Moving forward between ranks is voluntarily difficult, making it almost impossible to reach the latest rank except by hard work.
+
+With this design, when a user reach upper ranks you can be sure that they really deserve it!
+It also lets you quickly see at a glance what this user primarly use GitHub for, just look for crimson and gold badges!
+
+
+
#### ℹ️ Examples workflows
[➡️ Available options for this plugin](metadata.yml)
diff --git a/source/plugins/achievements/index.mjs b/source/plugins/achievements/index.mjs
index 75506425..cf432b3d 100644
--- a/source/plugins/achievements/index.mjs
+++ b/source/plugins/achievements/index.mjs
@@ -19,7 +19,7 @@ export default async function({login, q, imports, data, computed, graphql, queri
//Results
const order = {S:5, A:4, B:3, C:2, $:1, X:0}
- const colors = {S:["#FF0000", "#FF8500"], A:["#B59151", "#FFD576"], B:["#7D6CFF", "#B2A8FF"], C:["#2088FF", "#79B8FF"], $:["#FF48BD", "#FF92D8"], X:["#7A7A7A", "#B0B0B0"]}
+ const colors = {S:["#EB355E", "#731237"], A:["#B59151", "#FFD576"], B:["#7D6CFF", "#B2A8FF"], C:["#2088FF", "#79B8FF"], $:["#FF48BD", "#FF92D8"], X:["#7A7A7A", "#B0B0B0"]}
const achievements = list
.filter(a => (order[a.rank] >= order[threshold]) || ((a.rank === "$") && (secrets)))
.filter(a => (!only.length) || ((only.length) && (only.includes(a.title.toLocaleLowerCase()))))
@@ -41,7 +41,9 @@ export default async function({login, q, imports, data, computed, graphql, queri
}
/**Rank */
-function rank(x, [c, b, a, m]) {
+function rank(x, [c, b, a, s, m]) {
+ if (x >= s)
+ return {rank:"S", progress:(x - s) / (m - s)}
if (x >= a)
return {rank:"A", progress:(x - a) / (m - a)}
else if (x >= b)
diff --git a/source/plugins/achievements/list/organizations.mjs b/source/plugins/achievements/list/organizations.mjs
index 0efc7b93..5eec8bdb 100644
--- a/source/plugins/achievements/list/organizations.mjs
+++ b/source/plugins/achievements/list/organizations.mjs
@@ -14,7 +14,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Developers",
text:`Published ${value} public repositor${imports.s(value, "y")}`,
icon:'',
- ...rank(value, [1, 50, 100, 200]),
+ ...rank(value, [1, 50, 100, 200, 300]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.created_rank.userCount, requirement:scores.created >= requirements.created, type:"users"}),
@@ -29,7 +29,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Forkers",
text:`Forked ${value} public repositor${imports.s(value, "y")}`,
icon:'',
- ...rank(value, [1, 10, 30, 50]),
+ ...rank(value, [1, 10, 30, 50, 100]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -44,7 +44,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Managers",
text:`Created ${value} user project${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 2, 4, 8]),
+ ...rank(value, [1, 2, 4, 8, 10]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -59,7 +59,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Packagers",
text:`Created ${value} package${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 20, 50, 100]),
+ ...rank(value, [1, 20, 50, 100, 250]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -74,7 +74,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Maintainers",
text:`Maintaining a repository with ${value} star${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 5000, 10000, 30000]),
+ ...rank(value, [1, 5000, 10000, 30000, 50000]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.repo_rank.repositoryCount, requirement:scores.stars >= requirements.stars, type:"repositories"}),
@@ -89,7 +89,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Inspirationers",
text:`Maintaining a repository which has been forked ${value} time${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 500, 1000, 3000]),
+ ...rank(value, [1, 500, 1000, 3000, 5000]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.forks_rank.repositoryCount, requirement:scores.forks >= requirements.forks, type:"repositories"}),
@@ -105,7 +105,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Polyglots",
text:`Using ${value} different programming language${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 8, 16, 32]),
+ ...rank(value, [1, 8, 16, 32, 64]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -120,7 +120,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Sponsors",
text:`Sponsoring ${value} user${imports.s(value)} or organization${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 5, 10, 20]),
+ ...rank(value, [1, 5, 10, 20, 50]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -135,7 +135,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Organization",
text:`Has ${value} member${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 100, 500, 1000]),
+ ...rank(value, [1, 100, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -150,7 +150,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Member",
text:`Registered ${Math.floor(value)} year${imports.s(Math.floor(value))} ago`,
icon:'',
- ...rank(value, [1, 3, 5, 10]),
+ ...rank(value, [1, 3, 5, 10, 15]),
value,
unlock:new Date(unlock?.createdAt),
})
diff --git a/source/plugins/achievements/list/users.mjs b/source/plugins/achievements/list/users.mjs
index ff077040..34ae49a8 100644
--- a/source/plugins/achievements/list/users.mjs
+++ b/source/plugins/achievements/list/users.mjs
@@ -14,7 +14,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Developer",
text:`Published ${value} public repositor${imports.s(value, "y")}`,
icon:'',
- ...rank(value, [1, 20, 50, 100]),
+ ...rank(value, [1, 20, 50, 100, 250]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.created_rank.userCount, requirement:scores.created >= requirements.created, type:"users"}),
@@ -29,7 +29,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Forker",
text:`Forked ${value} public repositor${imports.s(value, "y")}`,
icon:'',
- ...rank(value, [1, 5, 10, 20]),
+ ...rank(value, [1, 5, 10, 20, 50]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -44,7 +44,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Contributor",
text:`Opened ${value} pull request${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -59,7 +59,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Manager",
text:`Created ${value} user project${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 2, 3, 4]),
+ ...rank(value, [1, 2, 3, 4, 5]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -74,7 +74,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Reviewer",
text:`Reviewed ${value} pull request${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -89,7 +89,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Packager",
text:`Created ${value} package${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 5, 10, 20]),
+ ...rank(value, [1, 5, 10, 20, 30]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -104,7 +104,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Scripter",
text:`Published ${value} gist${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 20, 50, 100]),
+ ...rank(value, [1, 20, 50, 100, 250]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -119,7 +119,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Worker",
text:`Joined ${value} organization${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 2, 4, 8]),
+ ...rank(value, [1, 2, 4, 8, 10]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -134,7 +134,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Stargazer",
text:`Starred ${value} repositor${imports.s(value, "y")}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -149,7 +149,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Follower",
text:`Following ${value} user${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -164,7 +164,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Influencer",
text:`Followed by ${value} user${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.user_rank.userCount, requirement:scores.followers >= requirements.followers, type:"users"}),
@@ -180,7 +180,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Maintainer",
text:`Maintaining a repository with ${value} star${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 1000, 5000, 10000]),
+ ...rank(value, [1, 1000, 5000, 10000, 25000]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.repo_rank.repositoryCount, requirement:scores.stars >= requirements.stars, type:"repositories"}),
@@ -195,7 +195,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Inspirationer",
text:`Maintaining a repository which has been forked ${value} time${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 100, 500, 1000]),
+ ...rank(value, [1, 100, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
leaderboard:leaderboard({user:ranks.forks_rank.repositoryCount, requirement:scores.forks >= requirements.forks, type:"repositories"}),
@@ -211,7 +211,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Polyglot",
text:`Using ${value} different programming language${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 4, 8, 16]),
+ ...rank(value, [1, 4, 8, 16, 32]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -226,7 +226,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Member",
text:`Registered ${Math.floor(value)} year${imports.s(Math.floor(value))} ago`,
icon:'',
- ...rank(value, [1, 3, 5, 10]),
+ ...rank(value, [1, 3, 5, 10, 15]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -241,7 +241,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Sponsor",
text:`Sponsoring ${value} user${imports.s(value)} or organization${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 3, 5, 10]),
+ ...rank(value, [1, 3, 5, 10, 25]),
value,
unlock:new Date(unlock?.createdAt),
})
@@ -256,7 +256,7 @@ export default async function({list, login, data, computed, imports, graphql, qu
title:"Deployer",
text:`Repositories have been deployed ${value} time${imports.s(value)}`,
icon:'',
- ...rank(value, [1, 200, 500, 1000]),
+ ...rank(value, [1, 200, 500, 1000, 2500]),
value,
unlock:new Date(unlock?.createdAt),
})
diff --git a/source/plugins/achievements/metadata.yml b/source/plugins/achievements/metadata.yml
index 9eb5bdb9..12713e2d 100644
--- a/source/plugins/achievements/metadata.yml
+++ b/source/plugins/achievements/metadata.yml
@@ -19,6 +19,7 @@ inputs:
type: string
default: C
values:
+ - S
- A
- B
- C
diff --git a/source/templates/classic/style.css b/source/templates/classic/style.css
index 619aa05c..d4351292 100644
--- a/source/templates/classic/style.css
+++ b/source/templates/classic/style.css
@@ -1013,13 +1013,10 @@
color: #E7BD69;
}
.achievement.s .title {
- color: #FF0000;
+ color: #EB355E;
}
.achievement.s .gauge.info {
- color: #FF0000;
- }
- .achievement.s .icon {
- filter: sepia() saturate(100);
+ color: #EB355E;
}
.achievement.secret .title{
color: #FF76CD;