I attempted to place two links in one tab, but I was unsuccessful. Here is my navbar code:
<!DOCTYPE html>
<html lang="eng">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4f2d20203b3c3b3d3e3f0f7a617d617c">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="34565b5b4047404647554474011a061a07">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
<title>{% block title %} welcome to music stories{% endblock %}</title>
</style>
</head>
<body>
{% if user.is_authenticated %}
<div class='alert alert-success alert-dismissible fade show'>
<button type= 'btn' class="btn-close" data-bs-dismiss='alert'></button>
<p>{{user.username}}, welcome to music stories world</p>
</div>
{% else %}
<div class="alert alert-danger alert-dismissible fade show">
<button type="btn" class="btn-close" data-bs-dismiss='alert'></button>
<a href="{% url 'users:login' %}" class="alert-link">Log In</a>
</div>
{% endif %}
<a href="pages:home">Home</a>
<nav class="navbar text-dark bg-warning container-fluid">
<ul class="nav nav-tabs">
{% if user.is_authenticated %}
<li class="nav-item">
<a class='nav-link active' href="#">{{user.username}}</a><br>
<a class="nav-link" href=" {% url 'user:logout' ">Log Out</a>
</li>
{% else %}
<li class="nav-item">
<a class='nav-link active' href="{% url 'login' %}"> Log In</a>
<a class="nav-link" href="{% url 'users:signup'%}">Sign Up</a>
</li>
{% endif %}
`<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle='dropdown' href="tags">tags</a>
<ul class="dropdown-menu">
<li><a class="nav-item" href="#">tag1</a></li>
<li><a class='nav-item' href="#">tag2</a></li>
<li><a class="nav-item" href="#">tag3</a></li>
</ul>
</li>
<li class="nav-item"><a class="nav-link">communication</a></li>
<li class="nav-item">
<a class="nav-link" href="{% url 'pages:musiclist' %}">music list</a>
</li>
<li class="nav-item">
<a class='nav-link' href="{% url 'pages:music_create' %}">add</a>
</li>
</ul>
</nav>
<div>
{% block content %}{% endblock %}
</div>
</body>
</html>
I wanted to combine both the username and logout links into one tab, or login and logout, how can I achieve this? Furthermore, I have a second unrelated question regarding overriding .container
within the <nav>
.