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 @@ -