angular-docs-cn/public/_includes/_version-dropdown.jade

41 lines
1014 B
Plaintext
Raw Normal View History

2015-03-01 09:42:31 -05:00
language = current.path[1]
2015-03-03 09:34:45 -05:00
title = "Javascript "
filter = /(\.html$)/
replace = /(\.html$)|(^index\.html$)/
<!-- Replace _ undscores with . dots -->
version = current.path[2].replace(/\_+/gm, ".")
2015-03-01 09:42:31 -05:00
2015-03-03 09:34:45 -05:00
<!-- VERSION TREE CREATOR MIXIN -->
mixin tree(directory, urlPrefix, name)
ul
for val, key in directory
if key !== '.git' && key !== '_data'
li <a href="#{urlPrefix}/#{key}/">#{name} #{key}</a>
<!-- BUTTON TITLE GENERATION -->
2015-03-01 09:42:31 -05:00
if language == 'js'
if version == "latest"
2015-03-02 02:48:31 -05:00
title = 'Javascript ' + jsLatest
2015-03-03 09:34:45 -05:00
else
title = 'Javascript ' + version
2015-03-01 09:42:31 -05:00
if language == 'dart'
if version == "latest"
2015-03-02 02:48:31 -05:00
title = 'Dart ' + dartLatest
2015-03-03 09:34:45 -05:00
else
title = 'Dart ' + version
2015-03-01 09:42:31 -05:00
2015-03-02 22:07:47 -05:00
2015-03-03 09:34:45 -05:00
<!-- DROPDOWN BUTTON -->
2015-03-01 09:42:31 -05:00
h2.hero-subtitle.text-subhead
2015-03-01 18:43:22 -05:00
button(md-button ng-click="showVersionMenu($event)") #{title} <span class="icon-arrow-drop-down"></span>
2015-03-02 10:15:03 -05:00
2015-03-03 09:34:45 -05:00
<!-- DROPDOWN MENU -->
2015-03-03 09:41:37 -05:00
nav.dropdown.is-hidden
2015-03-03 09:34:45 -05:00
mixin tree(public.docs.js, "/docs/js", "Javascript")
mixin tree(public.docs.dart, "/docs/dart", "Dart")