diff --git a/src/routes.js b/src/routes.js index 4c8a2c2..b8974c3 100644 --- a/src/routes.js +++ b/src/routes.js @@ -64,7 +64,15 @@ module.exports = (app, utils) => { // custom wikipedia logos for different languages if(req.url.startsWith('/static/images/mobile/copyright/')) { - const custom_logo = customLogos(req) + let custom_lang = '' + if(req.url.includes('-fr.svg')) { + custom_lang = 'fr' + } + if(req.url.includes('-ko.svg')) { + custom_lang = 'ko' + } + + const custom_logo = customLogos(req.url, custom_lang) if(custom_logo) { return res.sendFile(custom_logo) } diff --git a/src/utils.js b/src/utils.js index 040dd54..f856cdd 100644 --- a/src/utils.js +++ b/src/utils.js @@ -453,10 +453,9 @@ module.exports = function(redis) { return `${static_path}/wikiless-favicon.ico` } - this.customLogos = (req) => { - const lang = getLang(req) - if(lang === 'fr') { - return path.join(__dirname, '..', 'static', 'fr', path.basename(req.url)) + this.customLogos = (url, lang) => { + if(validLang(lang)) { + return path.join(__dirname, '..', 'static', lang, path.basename(url)) } return false } diff --git a/static/ko/wikipedia-tagline-ko.svg b/static/ko/wikipedia-tagline-ko.svg new file mode 100644 index 0000000..0dbb2dd --- /dev/null +++ b/static/ko/wikipedia-tagline-ko.svg @@ -0,0 +1,9 @@ + + + + Shape + + + + + diff --git a/static/ko/wikipedia-wordmark-ko.svg b/static/ko/wikipedia-wordmark-ko.svg new file mode 100644 index 0000000..d995ceb --- /dev/null +++ b/static/ko/wikipedia-wordmark-ko.svg @@ -0,0 +1,9 @@ + + + + Shape + + + + +