From b43daa67ce1bce31d9d1e249a1c1900d8bb532a3 Mon Sep 17 00:00:00 2001 From: Alex Wolfe Date: Mon, 2 Mar 2015 19:07:47 -0800 Subject: [PATCH] dropdown initial test --- public/_includes/_version-dropdown.jade | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/public/_includes/_version-dropdown.jade b/public/_includes/_version-dropdown.jade index e7865bf6da..964f4e9cec 100644 --- a/public/_includes/_version-dropdown.jade +++ b/public/_includes/_version-dropdown.jade @@ -10,6 +10,27 @@ if language == 'dart' if version == "latest" title = 'Dart ' + dartLatest + +filter = /(\.html$)/ +replace = /(\.html$)|(^index\.html$)/ + +mixin tree(head, tail) + for val, key in head + if key !== '.git' && key !== '_data' + if key == '_contents' + each file in val + if filter.test(file) && !/^404\.html/.test(file) + - file = file.replace(replace, ""); + li: a(href="#{ tail + file }")= tail + file + else + mixin tree(val, tail + key + "/") + +h1 Sitemap +ol +mixin tree(public, "/") + + + h2.hero-subtitle.text-subhead button(md-button ng-click="showVersionMenu($event)") #{title}