2015-07-28 02:39:47 -04:00
|
|
|
- var language = current.path[1]
|
|
|
|
- var title = "JavaScript "
|
|
|
|
- var filter = /(\.html$)/
|
|
|
|
- var replace = /(\.html$)|(^index\.html$)/
|
|
|
|
- var version = ''
|
|
|
|
- var page = ''
|
2015-03-03 09:34:45 -05:00
|
|
|
|
2016-02-25 12:03:50 -05:00
|
|
|
<!-- Replace _ underscores with . dots -->
|
2015-03-04 13:03:49 -05:00
|
|
|
if current.path[2]
|
2015-07-28 02:39:47 -04:00
|
|
|
- var version = current.path[2].replace(/\_+/gm, ".")
|
2015-03-03 09:34:45 -05:00
|
|
|
|
2016-03-17 04:09:34 -04:00
|
|
|
if current.path[6]
|
|
|
|
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]][current.path[5]][current.path[6]]
|
2016-03-18 04:56:52 -04:00
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '/' + current.path[5] + '/' + current.path[6] + '/'
|
2016-03-17 04:09:34 -04:00
|
|
|
else
|
2016-03-18 04:56:52 -04:00
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '/' + current.path[5] + '/' + current.path[6] + '.html'
|
2016-03-17 04:09:34 -04:00
|
|
|
|
|
|
|
else if current.path[5]
|
|
|
|
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]][current.path[5]]
|
2016-03-18 04:56:52 -04:00
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '/' + current.path[5] + '/'
|
2016-03-17 04:09:34 -04:00
|
|
|
else
|
2016-03-18 04:56:52 -04:00
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '/' + current.path[5] + '.html'
|
2016-03-17 04:09:34 -04:00
|
|
|
|
|
|
|
else if current.path[4]
|
2016-02-25 12:03:50 -05:00
|
|
|
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
|
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '/'
|
|
|
|
else
|
|
|
|
- var page = current.path[3] + '/' + current.path[4] + '.html'
|
|
|
|
|
|
|
|
else if current.path[3]
|
2015-04-22 12:51:13 -04:00
|
|
|
if public.docs[current.path[1]][current.path[2]][current.path[3]]
|
2015-07-28 02:39:47 -04:00
|
|
|
- var page = current.path[3] + '/'
|
2015-04-22 12:51:13 -04:00
|
|
|
else
|
2015-07-28 02:39:47 -04:00
|
|
|
- var page = current.path[3] + '.html'
|
2015-03-01 09:42:31 -05:00
|
|
|
|
2015-03-03 09:34:45 -05:00
|
|
|
<!-- VERSION TREE CREATOR MIXIN -->
|
2015-03-03 17:22:30 -05:00
|
|
|
mixin tree(directory, urlPrefix, name, latest)
|
2015-03-03 09:34:45 -05:00
|
|
|
ul
|
2015-03-03 17:22:30 -05:00
|
|
|
for val, semvar in directory
|
|
|
|
if semvar !== '.git' && semvar !== '_data'
|
2015-07-28 02:39:47 -04:00
|
|
|
- var libVersion = (semvar == "latest") ? latest : semvar.replace(/\_+/gm, ".")
|
2015-03-05 01:00:27 -05:00
|
|
|
li <a href="#{urlPrefix}/#{semvar}/#{page}" md-button>#{name} #{libVersion}</a>
|
2015-03-03 09:34:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- BUTTON TITLE GENERATION -->
|
2015-08-08 16:55:53 -04:00
|
|
|
if language == 'ts'
|
|
|
|
if version == "latest"
|
|
|
|
- var title = 'Angular 2 for TypeScript'
|
|
|
|
else
|
|
|
|
- var title = 'Angular ' + version + ' for TypeScript'
|
|
|
|
|
2015-03-01 09:42:31 -05:00
|
|
|
if language == 'js'
|
|
|
|
if version == "latest"
|
2015-07-28 02:39:47 -04:00
|
|
|
- var title = 'Angular 2 for JavaScript'
|
2015-03-03 09:34:45 -05:00
|
|
|
else
|
2015-07-28 02:39:47 -04:00
|
|
|
- var title = 'Angular ' + version + ' for JavaScript'
|
2015-03-03 09:34:45 -05:00
|
|
|
|
2015-03-01 09:42:31 -05:00
|
|
|
|
|
|
|
if language == 'dart'
|
|
|
|
if version == "latest"
|
2015-07-28 02:39:47 -04:00
|
|
|
- var title = 'Angular 2 for Dart'
|
2015-03-03 09:34:45 -05:00
|
|
|
else
|
2015-07-28 02:39:47 -04:00
|
|
|
- var title = 'Angular ' + version + ' for Dart'
|
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 -->
|
2016-04-22 17:25:55 -04:00
|
|
|
nav.dropdown
|
2016-04-09 12:38:38 -04:00
|
|
|
button(aria-label="选择Angular版本" md-button class="dropdown-button" ng-click="appCtrl.toggleVersionMenu($event)") #{title} <span class="icon icon-arrow-drop-down"></span>
|
2015-05-31 03:14:55 -04:00
|
|
|
div(class="overlay ng-hide" ng-click="appCtrl.toggleVersionMenu($event)" ng-show="appCtrl.showMenu")
|
2015-03-03 17:22:30 -05:00
|
|
|
|
|
|
|
<!-- DROPDOWN MENU -->
|
2015-05-31 03:14:55 -04:00
|
|
|
div(class="dropdown-menu" ng-class="appCtrl.showMenu ? 'is-visible' : ''")
|
2015-08-08 16:55:53 -04:00
|
|
|
mixin tree(public.docs.ts, "/docs/ts", "Angular 2 for TypeScript")
|
2016-05-26 19:51:01 -04:00
|
|
|
mixin tree(public.docs.js, "/docs/js", "Angular 2 for JavaScript")
|
2016-05-26 17:52:50 -04:00
|
|
|
//- mixin tree(public.docs.dart, "/docs/dart", "Angular 2 for Dart")
|