hosting navbar changed and consistent with dcl navbar

This commit is contained in:
Arvind Tiwari 2017-09-07 21:01:17 +05:30
commit db891aaa1e
7 changed files with 108 additions and 93 deletions

View file

@ -5,7 +5,7 @@
}
.dashboard-container {
padding-top:70px;
padding-top: 80px;
padding-bottom: 70px;
width: 90%;
margin: 0 auto;

View file

@ -29,18 +29,22 @@ h6 {
max-height: 740px;
}
.navbar-brand {
padding: 10px 15px;
/* padding: 10px 15px; */
}
.navbar-default {
background: #fff;
box-shadow: 0 3px 3px -2px hsla(0,0%,78%,.72);
/* box-shadow: 0 3px 3px -2px hsla(0,0%,78%,.72); */
}
.navbar-default .navbar-header {
position: relative;
z-index: 1;
}
.navbar-default .navbar-nav>li>a {
padding-top: 20px;
padding-bottom: 20px;
}
.navbar-transparent {
background: transparent;

View file

@ -51,61 +51,7 @@
{% block navbar %}
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
{% if request.user.is_authenticated %}
<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="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% endif %}
<a class="navbar-brand topnav" href="{% if site_url %}{{site_url}}{% else %}{{ request.session.hosting_url}}{% endif %}"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
</div>
{% if request.user.is_authenticated %}
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{% url 'hosting:virtual_machines' %}">
<i class="fa fa-server" aria-hidden="true"></i> {% trans "My Virtual Machines"%}
</a>
</li>
<li>
<a href="{% url 'hosting:orders' %}">
<i class="fa fa-credit-card"></i> {% trans "My Orders"%}
</a>
</li>
<li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" href="#">
<i class="glyphicon glyphicon-user"></i> {{request.user.name}} <span class="caret"></span></a>
<ul id="g-account-menu" class="dropdown-menu" role="menu">
<li>
<a href="{% url 'hosting:ssh_keys' %}">
<i class="fa fa-key"></i> {% trans "SSH Keys" %}
</a>
</li>
<li>
<a href="{% url 'hosting:notifications' %}">
<i class="fa fa-bell"></i> {% trans "Notifications "%}
</a>
</li>
<li><a href="{% url 'hosting:logout' %}"><i class="glyphicon glyphicon-lock"></i>{% trans "Logout"%} </a></li>
</ul>
</li>
</ul>
</div>
{% endif %}
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
{% include "hosting/includes/_navbar_user.html" %}
{% endblock navbar %}

View file

@ -0,0 +1,50 @@
{% load staticfiles %}
{% load i18n %}
{% load custom_tags %}
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
{% if request.user.is_authenticated %}
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% endif %}
<a class="navbar-brand topnav" href="{% if site_url %}{{site_url}}{% else %}{{ request.session.hosting_url}}{% endif %}"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
</div>
{% if request.user.is_authenticated %}
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{% url 'hosting:dashboard' %}">
<i class="fa fa-server" aria-hidden="true"></i>&nbsp;&nbsp;{% trans "Dashboard"%}
</a>
</li>
<li class="dropdown highlights-dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" href="#">
<i class="fa fa-user"></i>&nbsp;&nbsp;{{request.user.name}}&nbsp;<span class="caret"></span>
</a>
<ul id="g-account-menu" class="dropdown-menu" role="menu">
<li><a href="{% url 'hosting:logout' %}">{% trans "Logout"%}</a></li>
</ul>
</li>
<li>
{% get_current_language as LANGUAGE_CODE %}
{% if LANGUAGE_CODE == 'en-us'%}
<a href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> {% else %}
<a href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> {% endif %}
</li>
</ul>
</div>
{% endif %}
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>

View file

@ -11,6 +11,7 @@ from .views import (
HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView,
SSHKeyChoiceView, DashboardView)
urlpatterns = [
url(r'index/?$', IndexView.as_view(), name='index'),
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),