I’m trying to create a centralized navigation header.
I’ve embedded the header trough the following query:
dv.executeJs(await dv.io.load("ф System/Queries/embed-HeaderNavigation.md"))
this al works fine. But now I want to style the whole thing.
I’ve got 5 main pages, namely “HOME”, “Page-1”, “Page-2”, “Page-3” and “Page-4”.
I’m trying to embed links to the 5 pages using the following:
dv.el("div",
dv.el("div", dv.fileLink("HOME"), { cls: "vault-header-item" })+
dv.el("div", dv.fileLink("Page-1"), { cls: "vault-header-item" })+
dv.el("div", dv.fileLink("Page-2"), { cls: "vault-header-item" })+
dv.el("div", dv.fileLink("Page-3"), { cls: "vault-header-item" })+
dv.el("div", dv.fileLink("Page-4"), { cls: "vault-header-item" }),
{ cls: "vault-header-block" }
)
I’m using the classes to align the whole thing according to my wishes, but unfortunately I can’t seem to embed the header-items div inside the header-block div. For some reason a separate div is created below the header-item div’s.
The result from the code above is this:
HOME
Page-1
Page-2
Page-3
Page-4
[object HTMLDivElement][object HTMLDivElement][object HTMLDivElement][object HTMLDivElement][object HTMLDivElement]
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-block"></div>
Instead I’d like to see it as:
<div class="vault-header-block">
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
<div class="vault-header-item"></div>
</div>
Can anyone help me achieve this?