From 7a57fe21dac94f2e9715459fed790b176e39fb46 Mon Sep 17 00:00:00 2001 From: felixfontein Date: Thu, 14 Nov 2024 09:08:03 +0000 Subject: [PATCH] deploy: c17fef37b32873619aaa68ccd0a9293a19c93afc --- branch/main/_static/js/versions.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/branch/main/_static/js/versions.js b/branch/main/_static/js/versions.js index 818bc996..4958195e 100644 --- a/branch/main/_static/js/versions.js +++ b/branch/main/_static/js/versions.js @@ -1,6 +1,6 @@ const themeFlyoutDisplay = "hidden"; -const themeVersionSelector = "True"; -const themeLanguageSelector = "True"; +const themeVersionSelector = true; +const themeLanguageSelector = true; if (themeFlyoutDisplay === "attached") { function renderLanguages(config) { @@ -8,10 +8,14 @@ if (themeFlyoutDisplay === "attached") { return ""; } + // Insert the current language to the options on the selector + let languages = config.projects.translations.concat(config.projects.current); + languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name)); + const languagesHTML = `
Languages
- ${config.projects.translations + ${languages .map( (translation) => `