diff --git a/Server/app/svelte/public/locales/en/navbar-component.json b/Server/app/svelte/public/locales/en/navbar-component.json index 6ecb2b3..d4e3eda 100644 --- a/Server/app/svelte/public/locales/en/navbar-component.json +++ b/Server/app/svelte/public/locales/en/navbar-component.json @@ -2,7 +2,7 @@ "orgName": "Libertarian socialists", "manifesto": "Manifesto", "joinUs": "Join us", - "aboutUs": "About us", + "initiatives": "Initiatives", "groups": "Groups", "communes": "Communes", "cooperatives": "Cooperatives", diff --git a/Server/app/svelte/public/locales/ru/navbar-component.json b/Server/app/svelte/public/locales/ru/navbar-component.json index ae8f1b9..527efd5 100644 --- a/Server/app/svelte/public/locales/ru/navbar-component.json +++ b/Server/app/svelte/public/locales/ru/navbar-component.json @@ -2,7 +2,7 @@ "orgName": "Либертарные социалисты", "manifesto": "Манифест", "joinUs": "Присоединяйся", - "aboutUs": "О нас", + "initiatives": "Инициативы", "groups": "Группы", "communes": "Коммуны", "cooperatives": "Кооперативы", diff --git a/Server/app/svelte/src/navbar/navbar-component.svelte b/Server/app/svelte/src/navbar/navbar-component.svelte index 17411f3..a5c6f64 100644 --- a/Server/app/svelte/src/navbar/navbar-component.svelte +++ b/Server/app/svelte/src/navbar/navbar-component.svelte @@ -10,7 +10,8 @@ // Main code let hambInput let navbar - let localesDropdown; + let localesDropdown + let initiativesDropdown let loaded = writable(0) let content = writable({}) let logoText @@ -33,12 +34,15 @@ } } - function showLocales() { - if (localesDropdown.style.display=="block") { - localesDropdown.style.display = "none" + function showDropdown(dropdown) { + let state = dropdown.style.display + initiativesDropdown.style.display = "none" + localesDropdown.style.display = "none" + if (state=="block") { + dropdown.style.display = "none" } else { - localesDropdown.style.display = "block" + dropdown.style.display = "block" } } @@ -75,9 +79,15 @@ } } + function hide(dropdown) { + let callback = () => { + dropdown.style.display = "none" + } + setTimeout(callback,100) + } onMount(() => { - + fixHeading() }) @@ -85,7 +95,6 @@ {#key loaded} {#if Object.keys($content).length!=0} - {fixHeading()}{console.log($content)}