Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-07-12 00:46:45 +0400
committerisaacs <i@izs.me>2013-07-12 00:46:45 +0400
commita97443919bd648950f37cd35cefb341fd1b49aeb (patch)
tree7f2f42f61d4cb2329b2381334bf947abfdf010b6 /html
parentd1e2035ee263f7f206efa455fcbde9a68d581f2d (diff)
doc: update build scripts for new structure
Diffstat (limited to 'html')
-rw-r--r--html/docfoot-script.html31
-rw-r--r--html/docfoot.html32
-rw-r--r--html/dochead.html2
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@ &mdash; 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">