summaryrefslogtreecommitdiff
path: root/frontend/index.js
diff options
context:
space:
mode:
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);