Update navbar and toggle to Bootstrap 4 HTML.

This commit is contained in:
Audrey Roy Greenfeld 2015-08-29 12:09:45 -07:00
parent cb4e1d0d9d
commit 8330706775

View File

@ -34,38 +34,32 @@
<body> <body>
<div class="navbar navbar-default"> <nav class="navbar navbar-default">
<div class="container-fluid"> <div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a> <a class="navbar-brand" href="/">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
</div> <button type="button" class="navbar-toggler hidden-sm-up pull-right" data-toggle="collapse" data-target="#bs-navbar-collapse-1">
&#9776;
</button>
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-navbar-collapse-1"> <div class="collapse navbar-toggleable-xs" id="bs-navbar-collapse-1">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="{% url 'home' %}">Home</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'home' %}">Home</a></li>
<li><a href="{% url 'about' %}">About</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'about' %}">About</a></li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav pull-right">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<li><a href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a></li>
<li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
{% else %} {% else %}
<li><a href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a></li>
<li><a href="{% url 'account_login' %}">{% trans "Log In" %}</a></li> <li class="nav-item"><a class="nav-link" href="{% url 'account_login' %}">{% trans "Log In" %}</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </nav>
<div class="container"> <div class="container">