mirror of
https://github.com/BeamMP/BeamMP-Website.git
synced 2026-11-26 07:46:29 +00:00
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.