diff --git a/app/components/home/StatItem.vue b/app/components/home/StatItem.vue index e5130bf..4f334db 100644 --- a/app/components/home/StatItem.vue +++ b/app/components/home/StatItem.vue @@ -45,11 +45,8 @@ onMounted(() => {
-
+
{{ displayValue?.toLocaleString() }} -
{{ name }} diff --git a/app/composables/useExplanations.ts b/app/composables/useExplanations.ts index 6781fc2..6999344 100644 --- a/app/composables/useExplanations.ts +++ b/app/composables/useExplanations.ts @@ -1,28 +1,69 @@ -export function useExplanations(key: string): string | undefined { - switch (key.toLowerCase()) { +export function useExplanations( + type: string, + stat: string, +): string | undefined { + switch (type.toLowerCase()) { + case "mod": + case "plugin": + case "datapack": + case "shader": + case "resourcepack": + case "modpack": + return getProjectStatsExplanation(stat, type); + case "projects": + return ` +

Number of Projects across all ProjectTypes

+
+ This Count includes all projects types (mods, plugins, datapacks, shaders, resourcepacks, modpacks). + `; + case "versions": + return ` +

Number of Versions across all ProjectTypes

+
+ This Count includes all projects types (mods, plugins, datapacks, shaders, resourcepacks, modpacks). + `; + case "authors": + return ` +

Number of Authors on Modrinth

+ `; + case "files": + return ` +

Number of Files hosted on Modrinth

+ `; + case "revenue": + return ` +

Revenue Generated by Modrinth in USD

+
+ The revenue is Split between Modrinth and the Creators. + `; + } +} + +function getProjectStatsExplanation(stat: string, type: string) { + switch (stat.toLowerCase()) { case "versions": { return ` -

Number of Versions Supporting Each Loader/Game-Version

-
-Each version will be counted separately for every loader or game-version it supports. If a version supports multiple loaders or game-versions, it will be counted once for each supported loader/game-version. -`; +

Number of Versions Supporting Each Loader/Game-Version

+
+ Each version will be counted separately for every loader or game-version it supports. If a version supports multiple loaders or game-versions, it will be counted once for each supported loader/game-version. + `; } case "count": { return ` -

Number of Mods Supporting Each Loader/Game-Version

-
-Each mod will only be counted once. This means if a mod has 10 versions supporting a single game-version in will still only be counted once. -`; +

Number of ${firstLetterUpperCase(type)}s Supporting Each Loader/Game-Version

+
+ Each ${firstLetterUpperCase(type)} will only be counted once. This means if a ${firstLetterUpperCase(type)} has 10 versions supporting a single game-version in will still only be counted once. + `; } case "downloads": { return ` -

Number of Downloads per Specific Loader/Game-Version

-
-If a version supports multiple loaders or game-versions, the downloads will be divided equally among each supported loader/game-version. -
-
-This may exaggerate widely supported but less commonly used loaders or versions, such as Quilt. -`; +

Number of Downloads per Specific Loader/Game-Version

+
+ If a version supports multiple loaders or game-versions, the downloads will be divided equally among each supported loader/game-version. +
+
+ This may exaggerate widely supported but less commonly used loaders or versions, such as Quilt. + `; } } } diff --git a/app/pages/charts.vue b/app/pages/charts.vue index ad9d037..2c502a9 100644 --- a/app/pages/charts.vue +++ b/app/pages/charts.vue @@ -191,7 +191,7 @@ const sideBarOpen = ref(false); :explanation="explanation" />
- +
-
+

The place for stats all about
@@ -25,7 +25,7 @@ const { data } = useFetch("/api/stats/global");
(unofficial)
-
+