From 8f8e665927eb6ff4989ee2939f7d630027453472 Mon Sep 17 00:00:00 2001 From: Ming Di Leom Date: Wed, 22 Dec 2021 10:59:19 +0000 Subject: [PATCH] fix(routes): add fr logos --- src/routes.js | 5 +++++ src/utils.js | 4 ++++ static/fr/wikipedia-tagline-fr.svg | 9 +++++++++ static/fr/wikipedia-wordmark-fr.svg | 9 +++++++++ 4 files changed, 27 insertions(+) create mode 100644 static/fr/wikipedia-tagline-fr.svg create mode 100644 static/fr/wikipedia-wordmark-fr.svg diff --git a/src/routes.js b/src/routes.js index 1bc3656..801b7d2 100644 --- a/src/routes.js +++ b/src/routes.js @@ -59,6 +59,11 @@ module.exports = (app, utils) => { return res.sendFile(wikilessLogo()) } + // fr logos + if(req.url.startsWith('/static/images/mobile/copyright/')) { + return res.sendFile(frLogo(req.url)) + } + return next() }) diff --git a/src/utils.js b/src/utils.js index 5fca42e..412d6e5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -451,6 +451,10 @@ module.exports = function(redis) { return `${static_path}/wikiless-logo.png` } + this.frLogo = (reqUrl) => { + return path.join(__dirname, '..', 'static', 'fr', path.basename(reqUrl)) + } + this.preferencesPage = (req, res) => { const { default_lang, theme } = req.cookies let lang_select = '