mirror of
https://github.com/BeamMP/BeamMP-Website.git
synced 2026-11-28 16:54:27 +00:00
Add event standings pages and an Events link
BeamMP now runs community events with combined leaderboards, and the site had nowhere to show them. This adds an Events page listing each event and an event page with live standings, a driver search, the servers taking part and the event rules. Standings come from the API's public events routes, so no key is ever in the browser. The page keeps the last good results on screen if a refresh fails and says the connection was lost rather than going blank. Events with an uploaded banner show it behind the card and the page header, with an overlay so the text stays readable; events without one look as plain cards. The helpers the two pages share live beside them in views/events rather than in lib, since nothing else uses them. The Events link sits before Servers in the desktop and mobile menus. All of the new text is translated into the seven site languages using literal keys, so the locale checks can see every one. The translations are machine written and want a native speaker's review. src/lib/config.js is included because the pages need the API address from it: it is the one place that reads the window.__ENV__ the container writes at start, with the real services as the defaults.
This commit is contained in:
1 parent
1488e3bbdb
commit
38955dcbfe
14 files changed
+931
-7
No files matched your search
@@ -92,6 +92,21 @@ function localRoute(path) {
|
||||
</RouterLink>
|
||||
</NavigationMenuLink>
|
||||
</NavigationMenuItem>
|
||||
<NavigationMenuItem>
|
||||
<NavigationMenuLink as-child>
|
||||
<RouterLink
|
||||
:to="localRoute('events')"
|
||||
:class="
|
||||
cn(
|
||||
navigationMenuTriggerStyle(),
|
||||
'bg-transparent text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 dark:bg-transparent dark:text-white dark:hover:bg-neutral-800 dark:hover:text-white'
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ $t('message.nav.events') }}
|
||||
</RouterLink>
|
||||
</NavigationMenuLink>
|
||||
</NavigationMenuItem>
|
||||
<NavigationMenuItem>
|
||||
<NavigationMenuLink as-child>
|
||||
<RouterLink
|
||||
@@ -270,6 +285,13 @@ function localRoute(path) {
|
||||
>
|
||||
{{ $t('message.nav.partners') }}
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
:to="localRoute('events')"
|
||||
class="block px-4 py-3 text-neutral-900 dark:text-white hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-md transition-colors"
|
||||
@click="closeMobileMenu"
|
||||
>
|
||||
{{ $t('message.nav.events') }}
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
:to="localRoute('servers')"
|
||||
class="block px-4 py-3 text-neutral-900 dark:text-white hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-md transition-colors"
|
||||
|
||||
Reference in new issue
Block a user