Skip to content

Commit

Permalink
No longer list scaler subentries in top- or side- navs (kedacore#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Nov 23, 2021
1 parent cfe42d9 commit 24a6936
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
public/
package-lock.json
/public
.idea
resources/
.DS_Store
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,20 @@
{{ with .Sections }}
{{ range . }}
{{ $isThisSection := eq .CurrentSection.Title $currentSection.Title }}
{{ $regularPages := cond (eq .CurrentSection.Title "Scalers") "" .RegularPages -}}
<div class="nav-subsection" x-data="{ open: {{ $isThisSection }} }">
<div class="nav-section-title is-size-5 is-size-6-mobile{{ if $isHere }} is-active{{ end }}" href="{{ .RelPermalink }}">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{ if .RegularPages }}
{{ if $regularPages }}
<span @click="open = !open">
<i class="fas fa-md has-text-secondary" :class="{ 'fa-caret-down': !open, 'fa-caret-up': open }"></i>
</span>
{{ end }}
</div>

{{ with .RegularPages }}
{{ with $regularPages }}
<ul class="nav-section-links" x-show="open">
{{ range . }}
{{ $isHere := eq $here .RelPermalink }}
Expand Down
20 changes: 1 addition & 19 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,7 @@
</div>

<div class="navbar-item is-size-5-desktop has-dropdown is-hoverable">
<a class="navbar-link is-arrowless" href="/docs/{{ $latest }}/scalers">
<span>
Scalers
</span>
<span class="icon has-text-secondary">
<i class="fas fa-md fa-caret-down"></i>
</span>
</a>

<div class="navbar-dropdown is-radiusless">
{{ range $scalers }}
{{ $version := index (split .File.Path "/") 1 }}
{{ if eq $version $latest }}
<a class="navbar-item" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{ end }}
{{ end }}
</div>
<a class="navbar-link is-arrowless" href="/docs/{{ $latest }}/scalers">Scalers</a>
</div>

{{ range $docs }}
Expand Down

0 comments on commit 24a6936

Please sign in to comment.