drop down logic now switches to page too

This commit is contained in:
Alex Wolfe 2015-03-04 22:00:27 -08:00
parent 7d81ec2fae
commit 700136dd0f
1 changed files with 6 additions and 1 deletions

View File

@ -3,11 +3,16 @@ title = "JavaScript "
filter = /(\.html$)/ filter = /(\.html$)/
replace = /(\.html$)|(^index\.html$)/ replace = /(\.html$)|(^index\.html$)/
version = '' version = ''
page = ''
<!-- Replace _ undscores with . dots --> <!-- Replace _ undscores with . dots -->
if current.path[2] if current.path[2]
version = current.path[2].replace(/\_+/gm, ".") version = current.path[2].replace(/\_+/gm, ".")
<!-- Replace _ undscores with . dots -->
if current.path[3]
page = current.path[3] + '.html'
<!-- VERSION TREE CREATOR MIXIN --> <!-- VERSION TREE CREATOR MIXIN -->
mixin tree(directory, urlPrefix, name, latest) mixin tree(directory, urlPrefix, name, latest)
@ -15,7 +20,7 @@ mixin tree(directory, urlPrefix, name, latest)
for val, semvar in directory for val, semvar in directory
if semvar !== '.git' && semvar !== '_data' if semvar !== '.git' && semvar !== '_data'
libVersion = (semvar == "latest") ? latest : semvar.replace(/\_+/gm, ".") libVersion = (semvar == "latest") ? latest : semvar.replace(/\_+/gm, ".")
li <a href="#{urlPrefix}/#{semvar}/" md-button>#{name} #{libVersion}</a> li <a href="#{urlPrefix}/#{semvar}/#{page}" md-button>#{name} #{libVersion}</a>
<!-- BUTTON TITLE GENERATION --> <!-- BUTTON TITLE GENERATION -->