Skip to content

Commit c2886b3

Browse files
committed
add more social links
1 parent 4103c0d commit c2886b3

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

src/data.ts

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ export const discord = <T extends string>(
66
: T
77
): DiscordInvite => code as unknown as DiscordInvite;
88

9-
export interface Item {
9+
interface BaseEntry {
1010
name: string;
1111
description: string;
12-
link?: string;
1312
version?: `${number}.${number}` | `${number}.${number}.${number}`;
1413
}
1514

16-
export interface Server extends Item {
15+
export interface Item extends BaseEntry {
16+
link?: string;
17+
}
18+
19+
export interface Server extends BaseEntry {
1720
ip: string;
21+
website?: string;
22+
github?: string;
1823
discord?: DiscordInvite;
1924
}
2025

@@ -24,7 +29,7 @@ interface Category {
2429
}
2530

2631
export const latestVersion = "26.1.2";
27-
export const supportsLatestVersion = (item: Item): boolean =>
32+
export const supportsLatestVersion = (item: Item | Server): boolean =>
2833
item.version === latestVersion || !item.version;
2934

3035
export const data: Category[] = [
@@ -46,56 +51,60 @@ export const data: Category[] = [
4651
{
4752
name: "Hollow Cube",
4853
description: "Play, create, share builds and parkour maps, all on one server!",
49-
link: "https://hollowcube.net",
5054
version: "26.1.2",
5155
ip: "hollowcube.net",
56+
website: "https://hollowcube.net",
57+
github: "https://github.com/hollow-cube",
5258
discord: discord("h9Z9DGGJjJ")
5359
},
5460
{
5561
name: "EmortalMC",
5662
description: "A minigame network powered by Minestom with lots of overengineering.",
57-
link: "https://github.com/emortalmc",
5863
version: "26.1.2",
5964
ip: "mc.emortal.dev",
65+
github: "https://github.com/emortalmc",
6066
discord: discord("qrgqe8hDmx")
6167
},
6268
{
6369
name: "CounterMine",
6470
description: "A Russian recreation of Counter Strike with insane custom models and GUIs.",
65-
link: "https://cherry.pizza",
6671
version: "1.21.11",
6772
ip: "direct.cherry.pizza",
73+
website: "https://cherry.pizza",
6874
discord: discord("TNbyVSuaQh")
6975
},
7076
{
7177
name: "kloon.io",
7278
description: "A creative server developed by Minikloon featuring powerful building tools.",
73-
link: "https://kloon.io",
7479
version: "1.21.8",
7580
ip: "play.kloon.io",
81+
website: "https://kloon.io",
82+
github: "https://github.com/KloonInnovations/GameServer-Public",
7683
discord: discord("peC3UVmZc6")
7784
},
7885
{
7986
name: "BlueDragon",
8087
description: "A minigame server that strives to produce high-quality original content.",
81-
link: "https://bluedragonmc.com",
8288
version: "1.21.11",
8389
ip: "bluedragonmc.com",
90+
website: "https://bluedragonmc.com",
91+
github: "https://github.com/BlueDragonMC",
8492
discord: discord("pYA7xxytYJ")
8593
},
8694
// {
8795
// name: "Endercube",
8896
// description: "A parkour server with simple code that is easy to learn from.",
89-
// link: "https://endercube.net",
9097
// version: "1.21.8",
91-
// ip: "play.endercube.net"
98+
// ip: "play.endercube.net",
99+
// website: "https://endercube.net",
100+
// github: "https://github.com/Ender-Cube/Endercube"
92101
// },
93102
{
94103
name: "sb.tems.pl",
95104
description: "A Speed Builders server featuring practice and competitive game modes.",
96-
link: "https://www.tems.pl",
97105
version: "1.21.11",
98106
ip: "sb.tems.pl",
107+
website: "https://www.tems.pl",
99108
discord: discord("dkb2hCHV6A")
100109
},
101110
{
@@ -108,9 +117,9 @@ export const data: Category[] = [
108117
{
109118
name: "Fracture",
110119
description: "A competitive minigames arena with leaderboards and high-stakes matches.",
111-
link: "https://playfracture.com",
112120
version: "1.21.11",
113121
ip: "playfracture.com",
122+
website: "https://playfracture.com",
114123
discord: discord("apcJbvmdNV")
115124
}
116125
]

src/pages/server/[address].astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ const { server } = Astro.props;
5050
<p>Loading server data...</p>
5151
</div>
5252

53-
{server.link && (
54-
<p><a href={server.link} target="_blank" rel="noopener noreferrer">Visit Website →</a></p>
53+
{server.website && (
54+
<p><a href={server.website} target="_blank" rel="noopener noreferrer">Visit Website →</a></p>
55+
)}
56+
{server.github && (
57+
<p><a href={server.github} target="_blank" rel="noopener noreferrer">View on GitHub →</a></p>
5558
)}
5659
{server.discord && (
5760
<p><a href={`https://discord.com/invite/${server.discord}`} target="_blank" rel="noopener noreferrer">Join Discord Server →</a></p>

0 commit comments

Comments
 (0)