Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions components/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</slot>
<transition-expand v-if="inline">
<div v-if="active">
<slot />
<slot v-bind="{ toggle, close: away }" />
</div>
</transition-expand>
<transition v-else name="dropdown-content">
Expand All @@ -18,7 +18,7 @@
class="absolute top-full z-40"
:class="{ 'left-0': align === 'left', 'right-0': align === 'right' }"
>
<slot />
<slot v-bind="{ toggle, close: away }" />
</div>
</transition>
</div>
Expand Down
59 changes: 57 additions & 2 deletions components/ServerBlurb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,32 @@
</p>
</div>
<div class="flex flex-col flex-shrink-0 gap-1 sm:w-72">
<span v-if="relays">
<Dropdown class="relay-select mb-2" :inline>
<template #toggler="{ toggle }">
<a href="#" class="dropdown-parent" @click.prevent="toggle">
{{ selectedRelay?.label ? 'Relay: ' : ''
}}{{ selectedRelay?.label || 'Select Relay' }}
<Icon name="fa6-solid:angle-down" class="ml-2" />
</a>
</template>

<template #default="{ close }">
<div class="relay-select__links relay-list">
<a
v-for="relay in relays"
:key="relay.id"
href="#"
@click.prevent="((selectedRelay = relay), close())"
>
{{ relay.label }}
</a>
</div>
</template>
</Dropdown>
</span>
<ServerBanner
v-for="(link, index) in links"
v-for="(link, index) in resolvedLinks"
:key="index"
v-bind="link"
/>
Expand All @@ -64,7 +88,7 @@
</template>

<script setup>
defineProps({
const props = defineProps({
name: {
type: String,
required: true,
Expand All @@ -91,6 +115,21 @@ defineProps({
type: Array,
required: true,
},
relays: {
type: Array,
required: false,
},
})

const selectedRelay = ref(props.relays?.[0] || null)

const resolvedLinks = computed(() => {
if (!selectedRelay.value) return props.links

return props.links.map((link) => ({
...link,
ip: selectedRelay.value.host,
}))
})

const getTagComponent = (tag) => {
Expand All @@ -115,4 +154,20 @@ h2 {
width: 50px;
}
}

.relay-list {
@apply flex flex-col bg-background bg-opacity-80 rounded-sm mt-1 overflow-hidden;

a {
@apply px-3 py-2 text-sm transition-colors cursor-pointer;

&:hover {
@apply bg-background bg-opacity-60;
}

&.active {
@apply bg-primary text-white;
}
}
}
</style>
9 changes: 8 additions & 1 deletion content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
import { defineCollection, defineContentConfig, z } from '@nuxt/content'

export default defineContentConfig({
collections: {
Expand All @@ -20,6 +20,13 @@ export default defineContentConfig({
url: z.string().optional(),
}),
),
relays: z.array(
z.object({
id: z.string(),
label: z.string(),
host: z.string(),
}),
),
}),
}),
},
Expand Down
35 changes: 29 additions & 6 deletions content/servers/monkestation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,46 @@
"name": "Monkestation",
"logo": "monkestation.png",
"created": "2025-06-18 16:00:00",
"tags": ["new", "mediumrp"],
"website": "https://play.monkestation.com",
"tags": [
"new",
"mediumrp"
],
"website": "https://monkestation.com",
"description": [
"Monkestation is a Medium-RP server that balances roleplay opportunities with casual gameplay elements. The server maintains a unique atmosphere where players can engage in serious roleplay while still enjoying lighthearted, nonsensical and less serious moments. Originally created by Twitch streamer and YouTuber The DukeofOok, who also helped establish other servers like Vanderlin, Monkestation has carved out its own niche in the SS13 community. The community focuses on maintaining an environment that remains approachable and helpful for both newcomers and veteran players."
],
"relays": [
{
"id": "direct",
"label": "Direct",
"host": "play.monkestation.com"
},
{
"id": "us-east-ashburn",
"label": "US East — Ashburn, VA",
"host": "useast.monkestation.com"
},
{
"id": "eu-warsaw",
"label": "Europe — Warsaw, PL",
"host": "warsaw.monkestation.com"
},
{
"id": "eu-gravelines",
"label": "Europe — Gravelines, FR",
"host": "gravelines.monkestation.com"
}
],
"links": [
{
"title": "Monkestation Main 1",
"ip": "play.monkestation.com",
"port": 3121,
"url": "https://play.monkestation.com"
"port": 3121
},
{
"title": "Monkestation Main 2",
"ip": "play.monkestation.com",
"port": 3122,
"url": "https://play.monkestation.com"
"port": 3122
}
]
}
Loading