diff options
author | isaacs <i@izs.me> | 2013-07-12 00:46:45 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-12 00:46:45 +0400 |
commit | a97443919bd648950f37cd35cefb341fd1b49aeb (patch) | |
tree | 7f2f42f61d4cb2329b2381334bf947abfdf010b6 /html | |
parent | d1e2035ee263f7f206efa455fcbde9a68d581f2d (diff) |
doc: update build scripts for new structure
Diffstat (limited to 'html')
-rw-r--r-- | html/docfoot-script.html | 31 | ||||
-rw-r--r-- | html/docfoot.html | 32 | ||||
-rw-r--r-- | html/dochead.html | 2 |
3 files changed, 32 insertions, 33 deletions
diff --git a/html/docfoot-script.html b/html/docfoot-script.html new file mode 100644 index 000000000..c0fea672a --- /dev/null +++ b/html/docfoot-script.html @@ -0,0 +1,31 @@ +<script> +;(function () { +var wrapper = document.getElementById("wrapper") +var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) + .filter(function (el) { + return el.parentNode === wrapper + && el.tagName.match(/H[1-6]/) + && el.id + }) +var l = 2 + , toc = document.createElement("ul") +toc.innerHTML = els.map(function (el) { + var i = el.tagName.charAt(1) + , out = "" + while (i > l) { + out += "<ul>" + l ++ + } + while (i < l) { + out += "</ul>" + l -- + } + out += "<li><a href='#" + el.id + "'>" + + ( el.innerText || el.text || el.innerHTML) + + "</a>" + return out +}).join("\n") +toc.id = "toc" +document.body.appendChild(toc) +})() +</script> diff --git a/html/docfoot.html b/html/docfoot.html index 3e35341cc..237b89718 100644 --- a/html/docfoot.html +++ b/html/docfoot.html @@ -1,34 +1,2 @@ </div> <p id="footer">@NAME@ — npm@@VERSION@</p> -<script> -;(function () { -var wrapper = document.getElementById("wrapper") -var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) - .filter(function (el) { - return el.parentNode === wrapper - && el.tagName.match(/H[1-6]/) - && el.id - }) -var l = 2 - , toc = document.createElement("ul") -toc.innerHTML = els.map(function (el) { - var i = el.tagName.charAt(1) - , out = "" - while (i > l) { - out += "<ul>" - l ++ - } - while (i < l) { - out += "</ul>" - l -- - } - out += "<li><a href='#" + el.id + "'>" + - ( el.innerText || el.text || el.innerHTML) - + "</a>" - return out -}).join("\n") -toc.id = "toc" -document.body.appendChild(toc) -})() -</script> -</body></html> diff --git a/html/dochead.html b/html/dochead.html index 1526e1b7b..01f4d2f05 100644 --- a/html/dochead.html +++ b/html/dochead.html @@ -2,7 +2,7 @@ <html> <title>@NAME@</title> <meta http-equiv="content-type" value="text/html;utf-8"> - <link rel="stylesheet" type="text/css" href="../static/style.css"> + <link rel="stylesheet" type="text/css" href="../../static/style.css"> <body> <div id="wrapper"> |