diff --git a/public/index.html b/public/game.html similarity index 99% rename from public/index.html rename to public/game.html index a665e38..8bb38b3 100644 --- a/public/index.html +++ b/public/game.html @@ -369,7 +369,7 @@ (function() { // Get room name from URL const pathParts = window.location.pathname.split('/').filter(p => p); - const roomName = pathParts[0] || 'default'; + const roomName = pathParts[pathParts.length-1] || 'default'; document.getElementById('room-display').textContent = `Room: ${roomName}`; // Get or create player UUID diff --git a/public/menu.html b/public/menu.html new file mode 100644 index 0000000..339f82b --- /dev/null +++ b/public/menu.html @@ -0,0 +1,226 @@ + + + + + + Y.A.R.N. 2026 + + + + + + +
+

Y.A.R.N.

+

HTML5 Edition

+ + +
+ + +
+ + +
+ +
+
+ + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/server.js b/server.js index e63b01c..e998788 100644 --- a/server.js +++ b/server.js @@ -344,8 +344,12 @@ function getOrCreateGame(roomName) { } // Route for game rooms -app.get('/:roomName', (req, res) => { - res.sendFile(path.join(__dirname, 'public', 'index.html')); +app.get('/game/:roomName', (req, res) => { + res.sendFile(path.join(__dirname, 'public', 'game.html')); +}); + +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'public', 'menu.html')); }); // Socket.IO connection handling