5 changed files with 139 additions and 1 deletions
-
34data/languages.yaml
-
BINsource/images/LanguageIcon.png
-
22source/javascripts/site.js
-
8source/layouts/layout.erb
-
76source/stylesheets/site.css.scss
@ -0,0 +1,34 @@ |
|||
--- |
|||
af: Afrikaans |
|||
ar: العربية |
|||
ca: Català |
|||
cs: Česky |
|||
da: Dansk |
|||
de: Deutsch |
|||
el: Ελληνικά |
|||
en: English |
|||
eo: Esperanto |
|||
es: Español |
|||
fa: فارسی |
|||
fi: Suomi |
|||
fr: Français |
|||
gl: Galego |
|||
he: עברית |
|||
hu: Magyar |
|||
it: Italiano |
|||
ja: 日本語 |
|||
ko: 한국어 |
|||
nl: Nederlands |
|||
'no': Norsk (bokmål) |
|||
pl: Polski |
|||
pt: Português |
|||
ro: Română |
|||
ru: Русский |
|||
sat: ᱥᱟᱱᱛᱟᱲᱤ |
|||
si: සිංහල |
|||
sr: Српски |
|||
sv: Svenska |
|||
tr: Türkçe |
|||
uk: Українська |
|||
vi: Việtnam |
|||
zh: 中文 |
After Width: 128 | Height: 128 | Size: 4.7 KiB |
@ -1,3 +1,23 @@ |
|||
document.getElementById('menu').addEventListener('click', evt => |
|||
evt.target.parentElement.classList.toggle('show') |
|||
) |
|||
) |
|||
|
|||
document.addEventListener('DOMContentLoaded', () => { |
|||
for (const switcher of document.getElementsByClassName('language-switcher')) { |
|||
const control = switcher.querySelector('[aria-haspopup]'); |
|||
control.addEventListener('click', event => { |
|||
const popupId = control.getAttribute('aria-controls'); |
|||
if (! popupId) return; |
|||
const popup = document.getElementById(popupId); |
|||
if (! popup) return; |
|||
if (control.getAttribute('aria-expanded') === 'true') { |
|||
control.setAttribute('aria-expanded', 'false'); |
|||
popup.setAttribute('aria-hidden', 'true'); |
|||
} else { |
|||
control.setAttribute('aria-expanded', 'true'); |
|||
popup.setAttribute('aria-hidden', 'false'); |
|||
|
|||
} |
|||
}); |
|||
} |
|||
}); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue