feature: different navbar items grouped into a dropdown beneath 'about us' item. Translations updated
This commit is contained in:
parent
4c00c99aa1
commit
4371feac41
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"orgName": "Libertarian socialists",
|
"orgName": "Libertarian socialists",
|
||||||
"manifesto": "Manifesto",
|
"manifesto": "Manifesto",
|
||||||
"joinUs": "Join Us",
|
"joinUs": "Join us",
|
||||||
|
"aboutUs": "About us",
|
||||||
"groups": "Groups",
|
"groups": "Groups",
|
||||||
"communes": "Communes",
|
"communes": "Communes",
|
||||||
"cooperatives": "Cooperatives",
|
"cooperatives": "Cooperatives",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"orgName": "Либертарные социалисты",
|
"orgName": "Либертарные социалисты",
|
||||||
"manifesto": "Манифест",
|
"manifesto": "Манифест",
|
||||||
"joinUs": "Присоединяйся",
|
"joinUs": "Присоединяйся",
|
||||||
|
"aboutUs": "О нас",
|
||||||
"groups": "Группы",
|
"groups": "Группы",
|
||||||
"communes": "Коммуны",
|
"communes": "Коммуны",
|
||||||
"cooperatives": "Кооперативы",
|
"cooperatives": "Кооперативы",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// Main code
|
// Main code
|
||||||
let hambInput
|
let hambInput
|
||||||
let navbar
|
let navbar
|
||||||
let localesDropdown
|
let localesDropdown;
|
||||||
let loaded = writable(0)
|
let loaded = writable(0)
|
||||||
let content = writable({})
|
let content = writable({})
|
||||||
let logoText
|
let logoText
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
<!-- Navigation bar -->
|
<!-- Navigation bar -->
|
||||||
{#key loaded}
|
{#key loaded}
|
||||||
{#if Object.keys($content).length!=0}
|
{#if Object.keys($content).length!=0}
|
||||||
{fixHeading()}
|
{fixHeading()}{console.log($content)}
|
||||||
<header bind:this={navbar} id="navbar">
|
<header bind:this={navbar} id="navbar">
|
||||||
<!-- Hamburger icon -->
|
<!-- Hamburger icon -->
|
||||||
<input bind:this={hambInput} type="checkbox" id="side-menu" on:click={changeNavbar}>
|
<input bind:this={hambInput} type="checkbox" id="side-menu" on:click={changeNavbar}>
|
||||||
|
@ -100,11 +100,25 @@
|
||||||
<ul id="menu">
|
<ul id="menu">
|
||||||
<li><a href={"/"+locale+"/manifesto"}>{$content.manifesto}</a></li>
|
<li><a href={"/"+locale+"/manifesto"}>{$content.manifesto}</a></li>
|
||||||
<li><a href={"/"+locale+"/join-us"}>{$content.joinUs}</a></li>
|
<li><a href={"/"+locale+"/join-us"}>{$content.joinUs}</a></li>
|
||||||
|
|
||||||
|
<!-- Options dropdown -->
|
||||||
|
<!-- A list of links pointing to different pages of the website. Implemented as a div opened on :hover-->
|
||||||
|
<li id="options-container">
|
||||||
|
<button id="options-button">{$content.aboutUs}</button>
|
||||||
|
<div id="options-dropdown">
|
||||||
|
<ul id="options-list">
|
||||||
<li><a href={"/"+locale+"/groups"}>{$content.groups}</a></li>
|
<li><a href={"/"+locale+"/groups"}>{$content.groups}</a></li>
|
||||||
<li><a href={"/"+locale+"/communes"}>{$content.communes}</a></li>
|
<li><a href={"/"+locale+"/communes"}>{$content.communes}</a></li>
|
||||||
|
|
||||||
<li><a href={"/"+locale+"/cooperatives"}>{$content.cooperatives}</a></li>
|
<li><a href={"/"+locale+"/cooperatives"}>{$content.cooperatives}</a></li>
|
||||||
<li><a href={"/"+locale+"/parties"}>{$content.parties}</a></li>
|
<li><a href={"/"+locale+"/parties"}>{$content.parties}</a></li>
|
||||||
<li><a href={"/"+locale+"/partners"}>{$content.partners}</a></li>
|
<li><a href={"/"+locale+"/partners"}>{$content.partners}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li id="locales">
|
<li id="locales">
|
||||||
<button on:click={showLocales}>
|
<button on:click={showLocales}>
|
||||||
<picture>
|
<picture>
|
||||||
|
@ -119,6 +133,7 @@
|
||||||
<button on:click={() => changeLocale(loc)}>{name}</button>
|
<button on:click={() => changeLocale(loc)}>{name}</button>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
@ -137,6 +152,8 @@
|
||||||
width: min(100%,116rem);
|
width: min(100%,116rem);
|
||||||
z-index: 1000000000;
|
z-index: 1000000000;
|
||||||
height: 5.26rem;
|
height: 5.26rem;
|
||||||
|
padding-left: 4rem;
|
||||||
|
padding-right: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar * {
|
#navbar * {
|
||||||
|
@ -185,7 +202,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
#menu a {
|
#menu a, #options-button {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 1.2rem;
|
padding: 1.2rem;
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
|
@ -282,6 +299,38 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Options */
|
||||||
|
|
||||||
|
#options-dropdown {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
border: #404040 solid 0.1rem;
|
||||||
|
/*padding: 0.5rem;*/
|
||||||
|
background-color: white;
|
||||||
|
overflow: auto;
|
||||||
|
width: 35%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#options-list > li a {
|
||||||
|
padding: 1rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#options-list > li:hover {
|
||||||
|
background-color: rgb(187 53 52 / 96%);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#options-list > li:hover > a{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#options-container:hover #options-dropdown {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Localization*/
|
/*Localization*/
|
||||||
|
|
||||||
#locales {
|
#locales {
|
||||||
|
@ -340,9 +389,11 @@
|
||||||
|
|
||||||
#navbar {
|
#navbar {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: min(95%,116rem);
|
width: min(100%,116rem);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
padding-right: 4rem;
|
||||||
|
padding-left: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav {
|
#nav {
|
||||||
|
@ -363,12 +414,12 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu a:hover {
|
#menu a:hover, #options-button:hover {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: rgb(127, 127, 127);
|
color: rgb(127, 127, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu a {
|
#menu a, #options-button {
|
||||||
padding: 1.2rem;
|
padding: 1.2rem;
|
||||||
padding-top: 1.9rem;
|
padding-top: 1.9rem;
|
||||||
padding-bottom: 1.9rem;
|
padding-bottom: 1.9rem;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"orgName": "Libertarian socialists",
|
"orgName": "Libertarian socialists",
|
||||||
"manifesto": "Manifesto",
|
"manifesto": "Manifesto",
|
||||||
"joinUs": "Join Us",
|
"joinUs": "Join us",
|
||||||
|
"aboutUs": "About us",
|
||||||
"groups": "Groups",
|
"groups": "Groups",
|
||||||
"communes": "Communes",
|
"communes": "Communes",
|
||||||
"cooperatives": "Cooperatives",
|
"cooperatives": "Cooperatives",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"orgName": "Либертарные социалисты",
|
"orgName": "Либертарные социалисты",
|
||||||
"manifesto": "Манифест",
|
"manifesto": "Манифест",
|
||||||
"joinUs": "Присоединяйся",
|
"joinUs": "Присоединяйся",
|
||||||
|
"aboutUs": "О нас",
|
||||||
"groups": "Группы",
|
"groups": "Группы",
|
||||||
"communes": "Коммуны",
|
"communes": "Коммуны",
|
||||||
"cooperatives": "Кооперативы",
|
"cooperatives": "Кооперативы",
|
||||||
|
|
Loading…
Reference in New Issue