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 -->
|
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'
|
|
|
|
libVersion = (semvar == "latest") ? latest : semvar.replace(/\_+/gm, ".")
|
|
|
|
li <a href="#{urlPrefix}/#{semvar}/" md-button>#{name} #{libVersion}</a>
|
2015-03-03 09:34:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- 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-03 17:22:30 -05:00
|
|
|
nav.hero-subtitle.text-subhead.dropdown
|
2015-03-04 08:27:48 -05:00
|
|
|
button(md-button class="dropdown-button" ng-click="toggleVersionMenu($event)") #{title} <span class="icon icon-arrow-drop-down"></span>
|
2015-03-03 17:22:30 -05:00
|
|
|
div(class="overlay ng-hide" ng-click="toggleVersionMenu($event)" ng-show="showMenu")
|
|
|
|
|
|
|
|
<!-- DROPDOWN MENU -->
|
|
|
|
div(class="dropdown-menu ng-hide" ng-show="showMenu")
|
|
|
|
mixin tree(public.docs.js, "/docs/js", "Javascript", jsLatest)
|
|
|
|
mixin tree(public.docs.dart, "/docs/dart", "Dart", dartLatest)
|
|
|
|
ul
|
|
|
|
li <a href="https://angularjs.org/" md-button>#{name} Angular 1.X</a>
|
|
|
|
li <a href="https://angulardart.org/" md-button>#{name} AngularDart 1.X</a>
|