angular-cn/public/_includes/_docs-nav.jade

56 lines
3.0 KiB
Plaintext
Raw Normal View History

2015-02-26 09:45:32 -05:00
nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
2015-03-11 23:21:59 -04:00
header.side-nav-search.st-input-wrapper
form.st-input-inner
2015-03-04 14:57:28 -05:00
label(for="search-io" class="is-hidden") Search Docs
2015-03-04 14:48:14 -05:00
input(type="search" id="search-io" placeholder="SEARCH DOCS...")
2015-04-22 13:12:55 -04:00
button(aria-label="Docs Menu" class="mobile-trigger button" aria-label="View Docs Menu" ng-click="toggleDocsMenu($event)" md-button) Docs <span class="icon icon-arrow-drop-down"></span>
2015-02-26 09:45:32 -05:00
2015-03-05 00:21:59 -05:00
ul(class="side-nav-primary" ng-class="showDocsNav ? 'is-visible' : ''")
2015-03-04 08:21:10 -05:00
if current.path[2]
for page, slug in public.docs[current.path[1]][current.path[2]]._data
name = page.menuTitle || page.title
selected = current.path[3] == slug ? 'is-selected':''
2015-03-01 19:39:17 -05:00
2015-04-16 10:24:28 -04:00
// PRIMARY NAVIGATION
2015-04-22 12:51:13 -04:00
if public.docs[current.path[1]][current.path[2]][slug]
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}/" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a>
2015-04-13 10:29:40 -04:00
2015-04-22 12:51:13 -04:00
else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}.html" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a>
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
// SECONDARY NAVIGATION
if selected
secondarySection = public.docs[current.path[1]][current.path[2]][current.path[3]]
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
if secondarySection
listType = public.docs[current.path[1]][current.path[2]][current.path[3]]._data._listtype || 'unordered'
ordered = listType == "ordered" ? "is-ordered" : ""
number = 0
2015-04-14 02:03:13 -04:00
2015-04-22 13:12:55 -04:00
ul(class="side-nav-secondary #{ordered}")
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]]._data
if slug != "index"
name = page.menuTitle || page.title
selected = current.path[4] == slug ? 'is-selected':''
num = (listType == "ordered") ? number++ : ''
2015-04-15 11:15:51 -04:00
2015-04-22 13:12:55 -04:00
if slug != "_listtype"
if num
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{num}. #{page.title}</a>
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a>
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
// TERTIARY NAVIGATION
if selected
tertiarySection = public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
2015-04-16 10:24:28 -04:00
2015-04-22 13:12:55 -04:00
if tertiarySection
ul.side-nav-tertiary
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
name = page.menuTitle || page.title
selected = current.path[5] == slug ? 'is-selected':''
li(class="#{selected}")<a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{current.path[4]}/#{slug}.html" md-button>#{name}</a>