summaryrefslogtreecommitdiff
path: root/frontend/index.js
diff options
context:
space:
mode:
authorMatthew Kosarek <matthew.kosarek@vention.cc>2021-02-23 19:39:16 -0500
committerMatthew Kosarek <matthew.kosarek@vention.cc>2021-02-23 19:39:16 -0500
commitf0d1398b0d1b1a7c5bd1d4e0b3488b7f1aa74364 (patch)
tree4279b063052fb71ef5ff34a2f2f93d5c7b870b98 /frontend/index.js
parentece2b67aa689aee0b881bac17a62c16e0469bc56 (diff)
Big rework of the directory structure to make it more orderly for my brain
Diffstat (limited to 'frontend/index.js')
-rw-r--r--frontend/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/index.js b/frontend/index.js
index f481bc6..d14ca95 100644
--- a/frontend/index.js
+++ b/frontend/index.js
@@ -2,8 +2,13 @@
(function() {
function main() {
- const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
- $('nav').find('a[href="' + lPathName + '"').addClass('nav-selected');
+
+ $.get('/navbar.html', function(pData) {
+ $('nav').html(pData);
+
+ const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
+ $('nav').find('a[href="' + lPathName + '"').addClass('nav-selected');
+ });
}
$(document).ready(main);