Skip to content

Commit 13a090b

Browse files
authored
Fix pages nav behaviour attempt 2 (#800)
1 parent 05d39f0 commit 13a090b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Elastic.Markdown/Slices/Layout/_TocTreeNav.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<li class="flex group/li @(item.Depth == topLevelFile ? "font-semibold py-8 not-last:border-b-1 border-grey-20" : "ml-5 lg:ml-4 mt-4 lg:mt-3")">
1515
<a
1616
href="@f.Url"
17-
@Htmx.GetHxAttributes(f.Url, !Model.IsPrimaryNavEnabled && f.RootNavigation.Id == Model.RootNavigationId)
17+
@Htmx.GetHxAttributes(f.Url, Model.IsPrimaryNavEnabled && f.RootNavigation.Id == Model.RootNavigationId || true)
1818
class="sidebar-link group-[.current]/li:text-blue-elastic!"
1919
id="page-@id"
2020
>
@@ -48,7 +48,7 @@
4848
</label>
4949
<a
5050
href="@(g.Index?.Url ?? "")"
51-
@Htmx.GetHxAttributes(g.Index?.Url ?? "", !Model.IsPrimaryNavEnabled || g.NavigationRootId == Model.RootNavigationId)
51+
@Htmx.GetHxAttributes(g.Index?.Url ?? "", Model.IsPrimaryNavEnabled && g.NavigationRootId == Model.RootNavigationId || true)
5252
id="page-@(g.Index?.Id ?? id)"
5353
class="sidebar-link @(g.Depth == topLevelGroup ? "font-semibold font-sans mb-1 text-base" : "")">
5454
@(g.Index?.NavigationTitle ?? "Untitled")

0 commit comments

Comments
 (0)