removed the language dropdown, replaced with link to the only other language

This commit is contained in:
ARvind Tiwari 2017-07-25 18:17:59 +05:30
parent 7319cc4e1d
commit 1e55c6679a
2 changed files with 79 additions and 62 deletions

View file

@ -126,6 +126,15 @@ h6 {
color: #fff; color: #fff;
background-color: transparent; background-color: transparent;
} }
.navbar-transparent .navbar-nav>li>.on-hover-border {
transition: all 0.3s linear;
box-shadow: none;
}
.navbar-transparent .navbar-nav>li>.on-hover-border:hover {
box-shadow: 0 0 0 1px #eee;
border-radius: 5px;
}
.navbar-default .btn-link { .navbar-default .btn-link {
box-shadow: none; box-shadow: none;
} }

View file

@ -1,65 +1,73 @@
{% load staticfiles i18n%} {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} {% load custom_tags %}
{% get_current_language as LANGUAGE_CODE %}
{% load custom_tags %}
<nav class="navbar navbar-default navbar-fixed-top topnav"> <nav class="navbar navbar-default navbar-fixed-top topnav">
<div class="topnav"> <div class="topnav">
<!-- Brand and toggle get grouped for better mobile display --> <!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
{% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %} {% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %}
<a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav url" data-url="#home"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a> <a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav url" data-url="#home"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav url" data-url="#home"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> <a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav url" data-url="#home"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> {% else %}
{% else %} <a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav url"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav url"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a> <a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav url"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a>
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav url"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> {% endif %}
{% endif %} </div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<!-- Start Navbar collapse-->
<ul class="nav navbar-nav navbar-right">
{% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %}
<li class="dropdown">
<a class="dropdown-toggle visible-mobile" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a>
<a class="dropdown-toggle url disabled visible-desktop" href="{% url 'datacenterlight:index' %}#how" data-url="#how" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a class="url" href="{% url 'datacenterlight:index' %}#your" data-url="#your">{% trans "Scale out" %}</a></li>
<li><a class="url" href="{% url 'datacenterlight:index' %}#our" data-url="#our">{% trans "Reliable and light" %}</a></li>
<li><a class="url" href="{% url 'datacenterlight:index' %}#price" data-url="#price">{% trans "Order VM" %}</a></li>
</ul>
</li>
<li>
<a class="url" href="{% url 'datacenterlight:index' %}/whydatacenterlight">{% trans "Why Data Center Light?" %}</a>
</li>
<li>
<a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact">{% trans "Contact" %}</a>
</li>
{% endif %}
</div> <li>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"><!-- Start Navbar collapse--> {% if LANGUAGE_CODE == 'en-us'%}
<ul class="nav navbar-nav navbar-right"> <a class="url on-hover-border" href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a>
{% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %} {% else %}
<li class="dropdown"> <a class="url on-hover-border" href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a>
<a class="dropdown-toggle visible-mobile" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a> {% endif %}
<a class="dropdown-toggle url disabled visible-desktop" href="{% url 'datacenterlight:index' %}#how" data-url="#how" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a> </li>
<ul class="dropdown-menu"> {% comment %}
<li><a class="url" href="{% url 'datacenterlight:index' %}#your" data-url="#your" >{% trans "Scale out" %}</a></li> <!-- to be used when more than one option for language -->
<li><a class="url" href="{% url 'datacenterlight:index' %}#our" data-url="#our">{% trans "Reliable and light" %}</a></li> <li class="nav-language">
<li> <a class="url" href="{% url 'datacenterlight:index' %}#price" data-url="#price" >{% trans "Order VM" %}</a></li> <div class="dropdown">
</ul> <div class="dropdown-toggle select-language" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
</li> {% if LANGUAGE_CODE == 'en-us'%}
<li> <span>English</span>
<a class="url" href="{% url 'datacenterlight:index' %}/whydatacenterlight" >{% trans "Why Data Center Light?" %}</a> {% else %}
</li> <span>Deutsch</span>
<li> {% endif %}
<a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact" >{% trans "Contact" %}</a> <i class="fa fa-globe" aria-hidden="true"></i>
</li> </div>
{% endif %} <ul class="dropdown-menu drop-language dropdown-menu-right">
<li class="nav-language"> {% if LANGUAGE_CODE == 'en-us'%}
<div class="dropdown"> <li><a class="url" href="{% change_lang 'de' %}">Deutsch</a></li>
<div class="dropdown-toggle select-language" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> {% else %}
{% if LANGUAGE_CODE == 'en-us'%} <li><a class="url" href="{% change_lang 'en-us' %}">English</a></li>
<span>English</span> {% endif %}
{% else %} </ul>
<span>Deutsch</span> </div>
{% endif %} </li>
<i class="fa fa-globe" aria-hidden="true"></i> {% endcomment %}
</div> </ul>
<ul class="dropdown-menu drop-language dropdown-menu-right"> </div>
{% if LANGUAGE_CODE == 'en-us'%} <!-- /.navbar-collapse -->
<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>
</div><!-- /.navbar-collapse -->
</div>
</div> </div>
</nav> </nav>