Skip to content

Commit

Permalink
style: tweak active docs nav item border color
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Oct 12, 2024
1 parent ec46859 commit 2be8fef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion assets/main/scss/docs/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

.docs-nav-title-icon {
margin-left: -1.5rem;
margin-left: -.5rem;
}

.docs-sidebar {
Expand All @@ -50,3 +50,7 @@
}
}
}

.docs-nav-active-item {
margin-left: -.58rem;
}
6 changes: 3 additions & 3 deletions layouts/partials/docs/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
{{- $active = true -}}
{{- end -}}
<li class="mb-2" tabindex="-1">
<div class="py-1 d-flex justify-content-between align-items-center ms-3{{ if $active }} text-primary{{ end }}">
<div class="py-1 d-flex justify-content-between align-items-center{{ if $active }} text-primary{{ end }}">
<a class="docs-nav-link d-flex align-items-center" href="{{ .RelPermalink }}">{{- template "nav-title" . -}}</a>
<a class="btn-toggle ms-1{{ if and (not $active) (not $expand) }} collapsed{{ end }}" role="button" data-bs-toggle="collapse"
data-bs-target="#{{ $sectionId }}" aria-expanded="{{ if or $active $expand }}true{{ else }}false{{ end }}" aria-controls="{{ $sectionId }}">
<i class="btn-toggle-icon fas fa-chevron-down ms-auto" data-fa-transform="rotate-270"></i>
</a>
</div>
<div class="docs-nav-subnavs border-start mt-2 collapse {{ if or $active $expand}} show{{ end }}{{ if $active }} border-primary{{ end }}" id="{{ $sectionId }}">
<div class="docs-nav-subnavs border-start mt-2 collapse {{ if or $active $expand }} show{{ end }}" id="{{ $sectionId }}">
<div class="btn-toggle-nav fw-normal ms-2{{ cond (default true site.Params.docs.nav.reduceFontSize) ` small` `` }}">
{{ template "walk-nav" (dict "section" . "page" $page) }}
</div>
</div>
</li>
{{- else -}}
<li class="mb-2 py-1 ms-3{{ if eq .RelPermalink $page.RelPermalink }} text-primary{{ end }}" tabindex="-1">
<li class="mb-2 py-1{{ if eq .RelPermalink $page.RelPermalink }} text-primary border-2 border-start border-primary ps-2 docs-nav-active-item{{ end }}" tabindex="-1">
<a class="docs-nav-link d-flex align-items-center" href="{{ .RelPermalink }}"{{ if .Params.redirect }} target="_blank"{{ end }}>
{{- template "nav-title" . -}}
{{- if .Params.redirect -}}
Expand Down

0 comments on commit 2be8fef

Please sign in to comment.