From c272222886e6cfff9f6f242a47c7b310e1bb7012 Mon Sep 17 00:00:00 2001 From: Supernova Date: Tue, 18 Aug 2020 16:01:54 +0000 Subject: [PATCH] Add Onion URL to footer if it is defined --- index.js | 1 + views/template.base.pug | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/index.js b/index.js index cf60b25..d920c9e 100644 --- a/index.js +++ b/index.js @@ -41,6 +41,7 @@ app.set('view engine', 'pug'); app.set('port', process.env.PORT || 3000); app.set('domain', process.env.DOMAIN || "keyoxide.org"); app.set('keyoxide_version', packageData.version); +app.set('onion_url', process.env.ONION_URL); app.use('/favicon.svg', express.static('favicon.svg')); diff --git a/views/template.base.pug b/views/template.base.pug index 1f947a3..689f48a 100644 --- a/views/template.base.pug +++ b/views/template.base.pug @@ -20,6 +20,10 @@ main.container block content footer + if settings.onion_url + p + | This website is available via Tor : + a(href=`${settings.onion_url}`) #{settings.onion_url} p | Keyoxide a(href="https://codeberg.org/keyoxide/web/releases")= settings.keyoxide_version