From eb35ec8feb39f67e8d4e957a2e5b1811e5aa696c Mon Sep 17 00:00:00 2001 From: Ash Monty Date: Thu, 9 Dec 2021 18:33:18 +0100 Subject: [PATCH] feat: add showQuickLinks boolean --- docs/en-US/welcome.md | 20 -------------------- docs/it-IT/welcome.md | 22 ---------------------- src/routers/docs.js | 7 +++++++ views/docs/docs.handlebars | 23 +++++++++++++++++++++++ 4 files changed, 30 insertions(+), 42 deletions(-) diff --git a/docs/en-US/welcome.md b/docs/en-US/welcome.md index 1f0f132..7feaafd 100644 --- a/docs/en-US/welcome.md +++ b/docs/en-US/welcome.md @@ -1,24 +1,4 @@ -# Quick links - # Other documentation diff --git a/docs/it-IT/welcome.md b/docs/it-IT/welcome.md index e7e6b22..1fbbc7a 100644 --- a/docs/it-IT/welcome.md +++ b/docs/it-IT/welcome.md @@ -1,25 +1,3 @@ -# Link rapidi - - - # Altra documentazione Siamo un gruppo di programmer che spendono il loro tempo libero a sviluppare e fare reverse-engineering per i server online per la 3DS e Wii U. diff --git a/src/routers/docs.js b/src/routers/docs.js index a531f11..5773ad1 100644 --- a/src/routers/docs.js +++ b/src/routers/docs.js @@ -58,6 +58,12 @@ router.get('/:slug', async (request, response, next) => { // Convert the content into HTML content = marked(content); + // A boolean to show the quick links grid or not. + let showQuickLinks = false; + if (pageName === 'welcome') { + showQuickLinks = true; + } + response.render('docs/docs', { layout: 'main', locale, @@ -65,6 +71,7 @@ router.get('/:slug', async (request, response, next) => { content, currentPage: request.params.slug, missingInLocale, + showQuickLinks }); }); diff --git a/views/docs/docs.handlebars b/views/docs/docs.handlebars index a0e5f68..3bee4af 100644 --- a/views/docs/docs.handlebars +++ b/views/docs/docs.handlebars @@ -37,6 +37,29 @@

{{locale.docs.missingInLocale}}

{{/if}} + {{#if showQuickLinks}} +

Quick links

+ + {{/if}} + {{{ content }}}