This commit is contained in:
Thomas Chartron 2021-11-04 23:01:56 +01:00
parent 25af043d3d
commit 8e48ebb4c4
2 changed files with 14 additions and 7 deletions

View file

@ -1,5 +1,12 @@
document.addEventListener("DOMContentLoaded", function() {
let navbar_links = document.querySelector('#nav-links');
let navbar_links = document.querySelector('#nav-links').children;
[...navbar_links].find((item) => { console.log(item.href.indexOf('/')) })
navbar_links.find((item) => {
(item.attr(''))
});
// for (let i = 0; i <= navbar_links.length; i++) {
// if (document.querySelector('#nav-links').children)
// }
console.log(navbar_links);
});

View file

@ -28,14 +28,14 @@ zt.enable_search = true
zt.navbar_items = [
{ code = "en", nav_items = [
{ url = "$URL/", name = "Home" },
{ url = "$URL/categories", name = "Categories" },
{ url = "$URL/tags", name = "Tags" },
{ url = "/", name = "Home" },
{ url = "/categories", name = "Categories" },
{ url = "/tags", name = "Tags" },
] },
{ code = "fr", nav_items = [
{ url = "$URL/", name = "Accueil" },
{ url = "$URL/categories", name = "Categories" },
{ url = "$URL/tags", name = "Tags" },
{ url = "/", name = "Accueil" },
{ url = "/categories", name = "Categories" },
{ url = "/tags", name = "Tags" },
] },
]