oxil-net1
Version:
Oxford Information Labs Netistrar Theme
76 lines (49 loc) • 2.81 kB
HTML
<div class="side-menu">
{{ $currentPage := . }}
{{ range sort .CurrentSection.Pages ".Params.weight" }}
{{ if ne .Params.noList "1"}}
{{ if .Params.apiController }}
<button class="dropdown-btn api-menu-{{.Params.apiController}} {{if eq $currentPage .}}active{{ end }}">
{{.Title}} <i class="net-chevron-down"></i>
</button>
<div class="dropdown-container api-menu-{{.Params.apiController}}" {{if eq $currentPage .}}data-state="show"{{else}}data-state="hide"{{ end }}>
<net-bind data-source="{{.Site.Params.apiurl}}/apidoc/default/api/{{.Params.apiController}}?format=json"
data-source-key="{{.Params.apiController}}API">
<div kb-if="{{.Params.apiController}}API.controller">
<a href="{{.Permalink}}" {{if eq $currentPage .}}class="active"{{ end }}>Overview</a>
<a kb-each-method="{{.Params.apiController}}API.controller.methods"
kb-class="method.name"
kb-href="'{{.CurrentSection.Permalink}}method/?api={{.Params.apiController}}&method=' | append method.name">{method.name}</a>
</div>
</net-bind>
</div>
{{ else if eq .Title "API Objects" }}
<button class="dropdown-btn api-object {{if eq $currentPage .}}active{{ end }}">
{{.Title}} <i class="net-chevron-down"></i>
</button>
<div class="dropdown-container api-object" {{if eq $currentPage .}}data-state="show"{{else}}data-state="hide"{{ end }}>
<net-bind data-source="{{.Site.Params.apiurl}}/apidoc/default?format=json" data-source-key="apiObjects">
<div kb-if="apiObjects.apiMetaData">
<a href="{{.Permalink}}" {{if eq $currentPage .}}class="active"{{ end }}>Overview</a>
<a kb-each-object="apiObjects.apiMetaData.objectSummaries" kb-path="object.path"
kb-href="'{{.CurrentSection.Permalink}}object/?object=' | append object.path">{object.name}</a>
</div>
</net-bind>
</div>
{{ else if eq .Title "API Exceptions" }}
<button class="dropdown-btn api-exception {{if eq $currentPage .}}active{{ end }}">
{{.Title}} <i class="net-chevron-down"></i>
</button>
<div class="dropdown-container api-exception" {{if eq $currentPage .}}data-state="show"{{else}}data-state="hide"{{ end }}>
<net-bind data-source="{{.Site.Params.apiurl}}/apidoc/default?format=json" data-source-key="apiExceptions">
<div kb-if="apiExceptions.apiMetaData">
<a href="{{.Permalink}}" {{if eq $currentPage .}}class="active"{{ end }}>Overview</a>
<a kb-each-object="apiExceptions.apiMetaData.exceptionSummaries" kb-path="object.path"
kb-href="'{{.CurrentSection.Permalink}}exception/?exception=' | append object.path">{object.name}</a>
</div>
</net-bind>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>