I'm trying to create a taking notes app in Django framework. I just want to add a simple navigation bar between homepage, adding notes and administration notes. My question is where do i locate my html file with the navbar? And how the code should look like? So far i have the following configuration where index.html
represents the file for the navbar. I also tried to include the navbar notes_app folder near the other 3 html file, but that does not work.
Also,my code for my navbar looks like:
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link" href="/notes_app">Homepage</a>
<a class="nav-link" href="/notes_app/adaugare">Adaugare</a>
<a class="nav-link" href="/notes_app/administrare">Administrare</a>
</div>
</div>
</div>
</nav>
</body>
</html>
I want to mention that the language is in Romanian so the meanings for HTML
files are:
adaugare.html -> the page where i will add new notes
adminstrare.html -> the page where i will edit the content of notes
I also want to link this navigation bar to all my pages, so any help will be appreciated.
I also want to mention i viewed the official page of Bootstrap, viewed Django tutorials and Bootstrap tutorials and also i checked some already built examples for a notes application, but did not work for me.
Thank you!