-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sponsorkit.config.ts
83 lines (80 loc) · 2 KB
/
sponsorkit.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { readFileSync } from "fs";
import path from "path";
import { defineConfig, presets } from "sponsorkit";
const RSS3_LOGO = (width: number, y: number) =>
readFileSync(path.resolve(__dirname, "./logo/crossbell.svg"), "utf-8")
.replace("${x}", String((width - 273) / 2))
.replace("${y}", String(y));
const DOSO_LOGO = (width: number, y: number) =>
readFileSync(path.resolve(__dirname, "./logo/doso.svg"), "utf-8")
.replace("${x}", String((width - 80) / 2))
.replace("${y}", String(y));
export default defineConfig({
includePrivate: true,
tiers: [
{
title: "Past Sponsors",
monthlyDollars: -1,
preset: presets.xs,
composeAfter(compose, _, config) {
if (
config.filter?.({ monthlyDollars: Infinity } as any, []) !== false
) {
compose
.addSpan(10)
.addRaw(RSS3_LOGO(config.width!, compose.height))
.addSpan(100);
}
},
},
{
title: "Backers",
preset: presets.small,
},
{
title: "Sponsors",
monthlyDollars: 10,
preset: {
avatar: {
size: 42,
},
boxWidth: 52,
boxHeight: 52,
container: {
sidePadding: 30,
},
},
},
{
title: "Silver Sponsors",
monthlyDollars: 50,
preset: presets.medium,
},
{
title: "Gold Sponsors",
monthlyDollars: 100,
preset: presets.large,
},
{
title: "Platinum Sponsors",
monthlyDollars: 500,
preset: presets.xl,
},
{
title: "Special Sponsor",
monthlyDollars: Infinity,
composeAfter(compose, _, config) {
if (
config.filter?.({ monthlyDollars: Infinity } as any, []) !== false
) {
compose
.addSpan(20)
.addText("Special Sponsor", "sponsorkit-tier-title")
.addSpan(10)
.addRaw(DOSO_LOGO(config.width!, compose.height))
.addSpan(100);
}
},
},
],
});