mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Move language selection into the mobile menu (fixes #489)
This commit is contained in:
parent
ee8fa8cbdb
commit
eaf0b2262f
4 changed files with 29 additions and 14 deletions
|
@ -27,11 +27,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endcase %}
|
{% endcase %}
|
||||||
<div class="head"><div>
|
<div class="head"><div>
|
||||||
<select id="langselect" class="langselect" onchange="window.location=this.value;">
|
|
||||||
{% for lang in site.langsorder %}{% assign active = ''%}{% if lang == page.lang %}{% assign active = ' selected="selected"'%}{% endif %}
|
|
||||||
<option value="/{{ lang }}/{% translate {{page.id}} url {{lang}} %}"{{ active }}>{{ site.langs[lang] }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
<ul class="lang">
|
<ul class="lang">
|
||||||
<li><a href="#" onclick="return false;">{{ site.langs[page.lang] }}</a>
|
<li><a href="#" onclick="return false;">{{ site.langs[page.lang] }}</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -47,6 +42,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
<a class="logo" href="/{{ page.lang }}/"><img src="/img/logotop.svg" alt="Bitcoin"></a>
|
<a class="logo" href="/{{ page.lang }}/"><img src="/img/logotop.svg" alt="Bitcoin"></a>
|
||||||
<a id="menumobile" class="menumobile" onclick="mobileMenuShow(event);" href="#"></a>
|
<a id="menumobile" class="menumobile" onclick="mobileMenuShow(event);" href="#"></a>
|
||||||
|
<div id="langselect" class="langselect"><select onchange="window.location=this.value;">
|
||||||
|
{% for lang in site.langsorder %}{% assign active = ''%}{% if lang == page.lang %}{% assign active = ' selected="selected"'%}{% endif %}
|
||||||
|
<option value="/{{ lang }}/{% translate {{page.id}} url {{lang}} %}"{{ active }}>{{ site.langs[lang] }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select></div>
|
||||||
<ul id="menusimple" class="menusimple" onclick="mobileMenuHover(event);">
|
<ul id="menusimple" class="menusimple" onclick="mobileMenuHover(event);">
|
||||||
<li><a href="#" onclick="return false;">{% translate menu-intro layout %}</a>
|
<li><a href="#" onclick="return false;">{% translate menu-intro layout %}</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -289,6 +289,14 @@ h2 .rssicon{
|
||||||
h1{
|
h1{
|
||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
.langselect{
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
.langselect select{
|
||||||
|
text-align:right;
|
||||||
|
margin-left:0;
|
||||||
|
margin-right:10px;
|
||||||
|
}
|
||||||
.summary{
|
.summary{
|
||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2031,14 +2031,21 @@ h2 .rssicon{
|
||||||
width:auto;
|
width:auto;
|
||||||
}
|
}
|
||||||
.langselect{
|
.langselect{
|
||||||
|
text-align:left;
|
||||||
|
background-color:#fff;
|
||||||
|
border-top:2px solid #ebebeb;
|
||||||
|
}
|
||||||
|
.langselect select{
|
||||||
|
text-align:left;
|
||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
border:0;
|
border:0;
|
||||||
font-size:115%;
|
font-size:115%;
|
||||||
position:absolute;
|
padding:8px 0;
|
||||||
right:-20px;
|
margin-top:12px;
|
||||||
top:18px;
|
margin-left:10px;
|
||||||
width:120px;
|
width:95%;
|
||||||
text-indent:20px;
|
-webkit-appearance:none;
|
||||||
|
-moz-appearance:none;
|
||||||
}
|
}
|
||||||
.menumobile{
|
.menumobile{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
|
@ -2053,12 +2060,12 @@ h2 .rssicon{
|
||||||
.lang,
|
.lang,
|
||||||
.menusimple{
|
.menusimple{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
background-color:#fff;
|
||||||
.menusimple{
|
|
||||||
position:static;
|
position:static;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
margin:0 0 10px 0;
|
margin:0;
|
||||||
height:auto;
|
height:auto;
|
||||||
|
overflow:auto;
|
||||||
}
|
}
|
||||||
.menusimple li a,
|
.menusimple li a,
|
||||||
.menusimple li ul li a,
|
.menusimple li ul li a,
|
||||||
|
|
|
@ -168,7 +168,7 @@ var mm=document.getElementById('menusimple');
|
||||||
var ml=document.getElementById('langselect');
|
var ml=document.getElementById('langselect');
|
||||||
var t=document.getElementById('menumobile');
|
var t=document.getElementById('menumobile');
|
||||||
if(mm.style.display=='block'){mm.style.display='';ml.style.display='';}
|
if(mm.style.display=='block'){mm.style.display='';ml.style.display='';}
|
||||||
else{mm.style.display='block';ml.style.display='inline-block';}
|
else{mm.style.display='block';ml.style.display='block';}
|
||||||
t.parentNode.removeChild(t);
|
t.parentNode.removeChild(t);
|
||||||
cancelEvent(e);
|
cancelEvent(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue