language options using bootstrap dropdown

This commit is contained in:
ARvind Tiwari 2017-07-24 22:16:37 +05:30
parent 652054d334
commit 7319cc4e1d
2 changed files with 49 additions and 26 deletions

View file

@ -161,37 +161,59 @@ h6 {
}
.nav-language .drop-language{
position: absolute;
/*position: absolute;*/
top: 45px;
left: -8px;
background: #fff;
left: auto !important;
/* background: #fff; */
width: 100px;
min-width: 100px;
height: 40px;
padding: 9px 10px;
-webkit-box-shadow: -8px 13px 31px -8px rgba(77,77,77,1);
-moz-box-shadow: -8px 13px 31px -8px rgba(77,77,77,1);
box-shadow: -8px 13px 31px -8px rgba(77,77,77,1);
display: none;
/*display: none;*/
z-index: 100;
/* margin-left: 10px; */
text-align: center;
border-radius: 4px;
}
.nav-language .open .drop-language{
width: 100px;
min-width: 100px;
}
.nav-language .drop-language a{
cursor: pointer;
padding: 5px 10px !important;
font-family: 'Lato-Light', sans-serif;
}
/* Show the dropdown menu on hover */
@media (min-width: 769px) {
.nav-language .dropdown:hover .dropdown-menu {
display: block;
}
}
@media (max-width: 767px){
.nav-language .open .dropdown-menu>li>a {
line-height: 1.42857143;
}
}
.navbar-transparent .nav-language .drop-language{
background: transparent;
border: 1px solid #fff;
}
.navbar-transparent .nav-language .drop-language a{
color: #fff;
padding: 5px 10px !important;
font-family: 'Lato-Light', sans-serif;
}
.nav-language:hover .drop-language{
/* .nav-language:hover .drop-language{
display: block;
}
} */
.intro-header {
height: 100vh;
text-align: center;
@ -1025,7 +1047,7 @@ line-height: 40px;
color: #777;
}
.nav-language:hover{
height: 80px;
/*height: 80px;*/
}
.navbar-transparent .nav-language .select-language {
color: #777;

View file

@ -40,24 +40,25 @@
</li>
{% endif %}
<li class="nav-language">
<div class="select-language">
{% if LANGUAGE_CODE == 'en-us'%}
<span>English</span>
{% else %}
<span>Deutsch</span>
{% endif %}
<i class="fa fa-globe" aria-hidden="true"></i>
</div>
<div onclick="return true" class="drop-language">
{% if LANGUAGE_CODE == 'en-us'%}
<a class="url" href="{% change_lang 'de' %}">Deutsch</a>
{% else %}
<a class="url" href="{% change_lang 'en-us' %}" >English</a>
{% endif %}
</div>
<div class="dropdown">
<div class="dropdown-toggle select-language" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% if LANGUAGE_CODE == 'en-us'%}
<span>English</span>
{% else %}
<span>Deutsch</span>
{% endif %}
<i class="fa fa-globe" aria-hidden="true"></i>
</div>
<ul class="dropdown-menu drop-language dropdown-menu-right">
{% if LANGUAGE_CODE == 'en-us'%}
<li><a class="url" href="{% change_lang 'de' %}">Deutsch</a></li>
{% else %}
<li><a class="url" href="{% change_lang 'en-us' %}" >English</a></li>
{% endif %}
</ul>
</div>
</li>
</ul>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div>