Skip to content

Commit

Permalink
Move navbar to separate template file
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianDAlessandro committed Oct 4, 2024
1 parent 6539087 commit 97ef845
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
22 changes: 1 addition & 21 deletions main/templates/main/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,7 @@
{% endblock extra_css %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="{% url 'main:index' %}">DUNE Process Manager</a>
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarLinks">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="{% url 'controller:index' %}">Controller</a>
</li>
</ul>
</div>
</div>
</nav>
{% include "main/navbar.html" %}
<div class="container py-3">
{% block content %}
{% endblock content %}
Expand Down
21 changes: 21 additions & 0 deletions main/templates/main/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="{% url 'main:index' %}">DUNE Process Manager</a>
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarLinks">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="{% url 'controller:index' %}">Controller</a>
</li>
</ul>
</div>
</div>
</nav>

1 comment on commit 97ef845

@jamesturner246
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that the navbar currently is not being displayed. I remove navbar-expand-lg and it displays, but does nothing. Maybe the navbar-toggler tags are not required.

Please sign in to comment.