41 lines
1014 B
Plaintext
41 lines
1014 B
Plaintext
language = current.path[1]
|
|
title = "Javascript "
|
|
filter = /(\.html$)/
|
|
replace = /(\.html$)|(^index\.html$)/
|
|
|
|
<!-- Replace _ undscores with . dots -->
|
|
version = current.path[2].replace(/\_+/gm, ".")
|
|
|
|
|
|
<!-- 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 -->
|
|
if language == 'js'
|
|
if version == "latest"
|
|
title = 'Javascript ' + jsLatest
|
|
else
|
|
title = 'Javascript ' + version
|
|
|
|
|
|
if language == 'dart'
|
|
if version == "latest"
|
|
title = 'Dart ' + dartLatest
|
|
else
|
|
title = 'Dart ' + version
|
|
|
|
|
|
<!-- DROPDOWN BUTTON -->
|
|
h2.hero-subtitle.text-subhead
|
|
button(md-button ng-click="showVersionMenu($event)") #{title} <span class="icon-arrow-drop-down"></span>
|
|
|
|
|
|
<!-- DROPDOWN MENU -->
|
|
nav.dropdown.is-hidden
|
|
mixin tree(public.docs.js, "/docs/js", "Javascript")
|
|
mixin tree(public.docs.dart, "/docs/dart", "Dart") |