update navbar in UI

This commit is contained in:
bohanjason 2019-10-06 22:57:14 -04:00 committed by Dana Van Aken
parent 63b7dd9a77
commit 924cccc459
1 changed files with 42 additions and 38 deletions

View File

@ -44,27 +44,32 @@
height: 32px; height: 32px;
width: 150px; width: 150px;
} }
</style> </style>
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css"> <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css">
{% endblock %} {% endblock %}
</head> </head>
<body> <body style="padding-top: 70px" >
<!-- Navigation --> <!-- Navigation -->
<nav class="navbar navbar-default fixed-top topnav" role="navigation"> <nav class="navbar navbar-default fixed-top topnav navbar-fixed-top " role="navigation">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand .text-warning" href="{% url 'home_projects' %}">OtterTune</a> <a class="navbar-brand .text-warning" href="{% url 'home_projects' %}">OtterTune</a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<div class="navbar-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<span class="navbar-text">Hello, {{ user.username }}</span> <div class="dropdown navbar-right"><a class="dropdown-toggle navbar-text" style="font-size: 18px;" data-toggle="dropdown" href="#">Hello, {{ user.username }} <span class="caret"></span></a>
<a class="btn btn-default navbar-btn2" href="{% url 'change_password' %}">Change Password</a> <ul class="dropdown-menu">
<a class="btn btn-default navbar-btn2" href="{% url 'logout' %}">Sign Out</a> <li><a href="{% url 'change_password' %}">Change Password</a></li>
<li><a href="{% url 'logout' %}">Sign Out</a></li>
</ul>
</div>
{% else %} {% else %}
<div class="navbar-right">
<form class="form-inline navbar-form2" role="form" action="{% url 'login' %}" method="POST" style="margin:0 0 0 0"> <form class="form-inline navbar-form2" role="form" action="{% url 'login' %}" method="POST" style="margin:0 0 0 0">
{% csrf_token %} {% csrf_token %}
<input type="text" placeholder="username" class="form-control form-control2" name="username"> <input type="text" placeholder="username" class="form-control form-control2" name="username">
@ -75,7 +80,6 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div>
</nav> </nav>
{% if form.errors %} {% if form.errors %}
@ -92,8 +96,8 @@
</div> </div>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% block body %} {% endblock body %} {% block body %} {% endblock body %}
</body> </body>
</html> </html>