diff --git a/locales/en_GB.json b/locales/en_GB.json index a90ce0e..0f173d1 100644 --- a/locales/en_GB.json +++ b/locales/en_GB.json @@ -313,6 +313,10 @@ "title": "Our progress", "description": "Check the project's progress and goals! (Updated every hour or so, does not reflect ALL project goals or progress)" }, + "gamesPage": { + "title": "Game support", + "description": "Check which games are supported and online." + }, "blogPage": { "title": "Blog", "description": "The latest updates in condensed chunks. If you want to see more frequent updates, consider supporting us.", diff --git a/locales/en_US.json b/locales/en_US.json index 6530345..d425957 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -315,6 +315,10 @@ "title": "Our progress", "description": "Check the project progress and goals! (Updated every hour or so, does not reflect ALL project goals or progress)" }, + "gamesPage": { + "title": "Game support", + "description": "Check which games are supported and online." + }, "blogPage": { "title": "Blog", "description": "The latest updates in condensed chunks. If you want to see more frequent updates, consider supporting us.", diff --git a/src/routes/games.js b/src/routes/games.js new file mode 100644 index 0000000..2f5867c --- /dev/null +++ b/src/routes/games.js @@ -0,0 +1,21 @@ +const { Router } = require('express'); +const router = new Router(); + +router.get('/', async (request, response) => { + const renderData = { + announcement: "April 17: Due to extremely high load, most servers are unstable. You may not be able to connect, even to services shown as Online. Please be patient while we make upgrades!", + games: { + "Friends": "online", + "Juxtaposition (Miiverse)": "tester", + "Mario Kart 8": "online", + "Splatoon": "online", + "Minecraft: Wii U Edition": "tester", + "Animal Crossing: New Leaf": "offline", + "Super Smash Bros: Wii U": "offline", + } + } + + response.render('games', renderData); +}); + +module.exports = router; \ No newline at end of file diff --git a/src/server.js b/src/server.js index bb8765a..325707e 100644 --- a/src/server.js +++ b/src/server.js @@ -107,7 +107,8 @@ const routes = { account: require('./routes/account'), blog: require('./routes/blog'), localization: require('./routes/localization'), - aprilfools: require('./routes/aprilfools') + aprilfools: require('./routes/aprilfools'), + games: require('./routes/games') }; app.use('/', routes.home); @@ -119,6 +120,7 @@ app.use('/account', routes.account); app.use('/localization', routes.localization); app.use('/blog', routes.blog); app.use('/nso-legacy-pack', routes.aprilfools); +app.use('/games', routes.games) logger.info('Creating 404 status handler'); // This works because it is the last router created diff --git a/views/games.handlebars b/views/games.handlebars new file mode 100644 index 0000000..8aeb50e --- /dev/null +++ b/views/games.handlebars @@ -0,0 +1,99 @@ +{{#section 'head'}} + +{{/section}} + +{{> header}} + +
+ +
+
+ + + + + + + +

{{ locale.gamesPage.title }}

+

{{ locale.gamesPage.description }}

+
+
+ + {{#if announcement}} +
+ {{{announcement}}} +
+ {{/if}} + +
+ +
+
+
+ + + +
+ Online +
+ +
+
+
+
+ Testers only +
+ +
+
+ Unavailable +
+
+ +
+ +
+
+
+
+ {{#each games}} +
+ {{#if (eq this "online")}} +
+ + + +
+ {{/if}} + {{#if (eq this "tester")}} +
+
+
+ {{/if}} + {{#if (eq this "offline")}} +
+ {{/if}} + {{ @key }} +
+ {{/each}} +
+
+
+
+ +
+ +{{#section 'foot'}} + +{{/section}} \ No newline at end of file