Skip to content

Commit

Permalink
functional....need more navbar cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kreynoldsf5 committed May 1, 2024
1 parent 6ffadac commit dd6584a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
2 changes: 1 addition & 1 deletion labapp/app/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ main {
}
.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
background-color: #d2f4ea;
background-color: #d4e0e0;
}

.scrollarea {
Expand Down
16 changes: 0 additions & 16 deletions labapp/app/static/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,3 @@ async function makeHttpRequest(buttonId, requestUrl, resultDivId) {
resultDiv.scrollIntoView({ behavior: 'smooth', block: 'end' });
}
}

function restoreAccordionPanel(storageKey, accordionId) {
var activeItem = localStorage.getItem(storageKey);
if (activeItem) {
//remove default collapse settings
$(accordionId + " .panel-collapse").removeClass('in');

//show the account_last visible group
$("#" + activeItem).addClass("in");
}
}

function saveActiveAccordionPanel(storageKey, e) {
localStorage.setItem(storageKey, e.target.id);
}

24 changes: 6 additions & 18 deletions labapp/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link href="/static/custom.css" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="/static/helpers.js"></script>
</head>
<body>
Expand All @@ -32,7 +30,7 @@
</a>
<ul class="list-unstyled ps-0">
<li class="mb-1">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="false">
<button class="btn btn-toggle align-items-center rounded collapsed disabled" data-bs-toggle="collapse-null" data-bs-target="#home-collapse" aria-expanded="false">
Home
</button>
<div class="collapse show" id="home-collapse">
Expand All @@ -44,7 +42,7 @@
</div>
</li>
<li class="mb-1">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#appconnect-collapse" aria-expanded="false">
<button class="btn btn-toggle align-items-center rounded collapsed disabled" data-bs-toggle="collapse-null" data-bs-target="#appconnect-collapse" aria-expanded="false">
App Connect
</button>
<div class="collapse show" id="appconnect-collapse">
Expand All @@ -56,7 +54,7 @@
</div>
</li>
<li class="mb-1">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#netconnect-collapse" aria-expanded="false">
<button class="btn btn-toggle align-items-center rounded collapsed disabled" data-bs-toggle="collapse-null" data-bs-target="#netconnect-collapse" aria-expanded="false">
Network Connect
</button>
<div class="collapse show" id="netconnect-collapse">
Expand All @@ -68,28 +66,18 @@
</li>
<li class="border-top my-3"></li>
<li class="mb-1">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#status-collapse" aria-expanded="false">
<button class="btn btn-toggle align-items-center rounded collapsed disabled" data-bs-toggle="collapse-null" data-bs-target="#status-collapse" aria-expanded="false">
Miscellaneous
</button>
<div class="collapse" id="status-collapse">
<div class="collapse show" id="status-collapse">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a href="/ref" class="link-dark rounded">Reference</a></li>
<li><a href="/score" class="link-dark rounded">Scoreboard</a></li>
</ul>
</div>
</li>
</ul>
</div>
<script>
$(function () {
$('#sidebar').on('shown.bs.collapse', function (e) {
saveActiveAccordionPanel('accordion-activePanel', e);
})
});
restoreAccordionPanel('accordion-activePanel', '#sidebar');
</script>


</div>
</div>

<!-- Main Content -->
Expand Down

0 comments on commit dd6584a

Please sign in to comment.