Skip to content

Commit

Permalink
fix documentation prod js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilelkihal committed May 3, 2024
1 parent 8bdd8c9 commit 4e5a32c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _includes/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ document.addEventListener('DOMContentLoaded', function() {
const parts = currentUrl.split('/');

// Extract the selected portal from the url
let portal = parts.pop();
if(portal == ''){
let portal = parts[parts.length-1];
if((portal === '') || (portal === 'user_guide')){
portal = 'OntoPortal'
}

let nav_items = document.getElementById('site-nav').children[0].children[1].querySelectorAll('li');
let nav_items = document.querySelector('.nav-list-item a[href="/documentation/user_guide"]').parentNode.querySelectorAll('li');

for(let i = 0; i<nav_items.length; i++){
const links = nav_items[i].querySelectorAll('a')
const item_link = links[links.length-1].href
Expand Down

0 comments on commit 4e5a32c

Please sign in to comment.