Skip to content

Commit

Permalink
more navbar changes, trying out dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
accellarando committed Sep 6, 2023
1 parent b9b586a commit 5eb1a06
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/scripts/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,34 @@ const navElement = `
<li class="nav-item">
<a class="nav-link" href="/TagGang/logs.html">Meeting Logs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/TagGang/schedule.html">Schedule</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/TagGang/">Resources</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="/TagGang/hardware/index.html" role="button" aria-haspopup="true" aria-expanded="false">Hardware</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/TagGang/hardware/plotter.html">Plotter</a>
<a class="dropdown-item" href="/TagGang/hardware/hat.html">CNC Pi HAT</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="/TagGang/software/index.html" role="button" aria-haspopup="true" aria-expanded="false">Software</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/TagGang/software/gui.html">GUI</a>
<a class="dropdown-item" href="/TagGang/software/kinect.html">Kinect UI</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="/TagGang/members.html">Team Members</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/TagGang/gallery.html">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/TagGang/notes/resources.html">Resources</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
Expand All @@ -26,7 +50,6 @@ $(document).ready(function(){
$("body").prepend(navElement);
// Code to mark current page as active
let thisPage = window.location.pathname.split("/").pop();
console.log(thisPage);
if (thisPage === "") {
thisPage = "index.html";
}
Expand Down
1 change: 1 addition & 0 deletions docs/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<link rel="stylesheet" href="https://bootswatch.com/5/cyborg/bootstrap.min.css">

<!-- Scripts -->
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script src="/TagGang/scripts/navbar.js"></script>
</head>
Expand Down

0 comments on commit 5eb1a06

Please sign in to comment.