diff --git a/src/Elastic.Documentation.Site/Assets/styles.css b/src/Elastic.Documentation.Site/Assets/styles.css
index 27404ef2b..ebb52e75c 100644
--- a/src/Elastic.Documentation.Site/Assets/styles.css
+++ b/src/Elastic.Documentation.Site/Assets/styles.css
@@ -125,6 +125,72 @@ body {
}
}
+ .nav-badge {
+ @apply ml-auto inline-flex shrink-0 items-center rounded px-1.5 py-0.5 text-[9px] font-bold;
+ }
+
+ .nav-badge-ns {
+ background: #f5f3ff;
+ color: #7c3aed;
+ border: 1px solid #ddd6fe;
+ }
+
+ .nav-badge-cmd {
+ background: #fffbeb;
+ color: #b45309;
+ border: 1px solid #fde68a;
+ }
+
+ .nav-badge-alias {
+ background: #f0f9ff;
+ color: #0369a1;
+ border: 1px solid #bae6fd;
+ }
+
+ .nav-link {
+ @apply group-[.current]/li:text-blue-elastic! flex w-full grow items-center;
+ }
+
+ .nav-folder-link {
+ @apply group-[.current]/li:text-blue-elastic! flex content-center items-center gap-1 pr-2;
+ }
+
+ .nav-folder {
+ @apply relative flex flex-wrap;
+ }
+
+ .nav-toggle-btn {
+ @apply hover:bg-grey-20 cursor-pointer rounded-sm p-1;
+ }
+
+ .nav-chevron {
+ @apply w-3.5 shrink-0 -rotate-90 group-has-checked/label:rotate-0;
+ fill: none;
+ stroke-width: 1.5;
+ stroke: currentColor;
+ }
+
+ .nav-subtree {
+ @apply relative ml-4 hidden w-full;
+
+ /* revealed when the sibling .peer div contains a checked checkbox */
+ .peer:has(:checked) ~ & {
+ display: block;
+ }
+
+ &::before {
+ content: '';
+ @apply bg-grey-20 absolute top-0 bottom-0 w-px;
+ left: calc(var(--spacing) * -4 + 1px);
+ }
+
+ /* darken connector line when subtree contains the current page */
+ &:has(.current)::before,
+ .peer:has(.current) ~ &::before {
+ @apply bg-grey-40;
+ }
+ }
+
.sidebar-trial-card {
background: var(--color-green-30);
border-radius: 8px;
diff --git a/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml b/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml
index 3a83d7b8b..60b45821c 100644
--- a/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml
+++ b/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml
@@ -38,14 +38,14 @@
-
+
@await RenderPartialAsync(_TocTreeNav.Create(new NavigationTreeItem
{
IsPrimaryNavEnabled = Model.IsPrimaryNavEnabled,
diff --git a/src/Elastic.Documentation.Site/Navigation/_TocTreeNav.cshtml b/src/Elastic.Documentation.Site/Navigation/_TocTreeNav.cshtml
index 40d981dbb..868232d73 100644
--- a/src/Elastic.Documentation.Site/Navigation/_TocTreeNav.cshtml
+++ b/src/Elastic.Documentation.Site/Navigation/_TocTreeNav.cshtml
@@ -14,25 +14,12 @@
if (raw.StartsWith("[alias]", StringComparison.Ordinal)) return ("alias", raw[7..]);
return (null, raw);
}
-
- // Inline styles to avoid Tailwind purge — very muted tints, subtle border for definition
- const string NsStyle = "background:#f5f3ff;color:#7c3aed;border:1px solid #ddd6fe;";
- const string CmdStyle = "background:#fffbeb;color:#b45309;border:1px solid #fde68a;";
- const string AliasStyle = "background:#f0f9ff;color:#0369a1;border:1px solid #bae6fd;";
-
- static string BadgeStyle(string? badge) => badge switch { "ns" => NsStyle, "cmd" => CmdStyle, "alias" => AliasStyle, _ => "" };
}
@if (isTopLevel && !Model.IsGlobalAssemblyBuild && !Model.IsPrimaryNavEnabled && !Model.SubTree.Index.Hidden)
{
var idx = Model.SubTree.Index;
-
-
+
}
@foreach (var item in Model.SubTree.NavigationItems)
@@ -50,15 +37,11 @@
{
var (groupBadge, groupLabel) = ParseNavTitle(group.NavigationTitle);
-
-
}
@@ -67,30 +50,19 @@
var g = folder;
var allHidden = folder.NavigationItems.All(n => n.Hidden);
var (folderBadge, folderLabel) = ParseNavTitle(g.NavigationTitle);
- -
+
-
-
@if (!allHidden)
{