mirror of https://github.com/lukechilds/node.git
Micheil Smith
14 years ago
committed by
Ryan Dahl
3 changed files with 0 additions and 494 deletions
@ -1,8 +0,0 @@ |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript" src="./jquery.js"></script> |
|||
<script type="text/javascript" src="./sh_main.js"></script> |
|||
<script type="text/javascript" src="./sh_javascript.min.js"></script> |
|||
<script type="text/javascript" src="./doc.js"></script> |
|||
</body> |
|||
</html> |
@ -1,308 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta name='generator' value='Ronn/v0.4.1'> |
|||
<title>node(1) -- evented I/O for V8 JavaScript</title> |
|||
<style type='text/css'> |
|||
*{ |
|||
margin: 0;padding: 0; |
|||
} |
|||
html,body |
|||
{ |
|||
height: 100%; |
|||
} |
|||
body |
|||
{ |
|||
font-family:helvetica, arial, sans serif; |
|||
background:#22252a; |
|||
color:#eee; |
|||
font-size:16px; |
|||
line-height:1.3; |
|||
position:relative; |
|||
min-width: 690px; |
|||
} |
|||
a |
|||
{ |
|||
color:#CD5; |
|||
} |
|||
a:focus |
|||
{ |
|||
outline: none; |
|||
-moz-outline: none; |
|||
} |
|||
pre |
|||
{ |
|||
overflow: hidden; |
|||
} |
|||
li |
|||
{ |
|||
list-style: inside; |
|||
} |
|||
#man,#man code,#man pre,#man tt,#man kbd,#man samp |
|||
{ |
|||
line-height:1.6; |
|||
color:#eee; |
|||
background:#22252a; |
|||
} |
|||
|
|||
#man |
|||
{ |
|||
margin: 0; |
|||
position: absolute; |
|||
top:0; |
|||
bottom:0; |
|||
left: 225px; |
|||
right: 0; |
|||
overflow: auto; |
|||
} |
|||
#man-content |
|||
{ |
|||
padding: 0 20px; |
|||
max-width: 650px; |
|||
} |
|||
#man h1,#man h2,#man h3 |
|||
{ |
|||
color:#DCDDDE; |
|||
clear:left; |
|||
} |
|||
|
|||
#man h1 |
|||
{ |
|||
background:url("http://nodejs.org/logo.png") no-repeat scroll center 0 transparent; |
|||
height:111px; |
|||
margin:15px 0 20px; |
|||
text-align:center; |
|||
text-indent:-2000px; |
|||
} |
|||
|
|||
#man h2 |
|||
{ |
|||
font-size:18px; |
|||
background:#000; |
|||
color:#CD5; |
|||
margin:10px 0; |
|||
padding:5px 10px; |
|||
} |
|||
|
|||
#man h3 |
|||
{ |
|||
font-size:16px; |
|||
margin:0 0 0 0ex; |
|||
} |
|||
|
|||
#man p,#man ul,#man ol,#man dl,#man pre |
|||
{ |
|||
margin:0 0 18px; |
|||
} |
|||
|
|||
#man pre |
|||
{ |
|||
color:#CCCDCE; |
|||
background:#121314; |
|||
border-left:2ex solid #222; |
|||
margin:0 0 20px; |
|||
padding:5px 7px; |
|||
} |
|||
|
|||
#man pre + h2,#man pre + h3 |
|||
{ |
|||
margin-top:22px; |
|||
} |
|||
|
|||
#man h2 + pre,#man h3 + pre |
|||
{ |
|||
margin-top:5px; |
|||
} |
|||
|
|||
#man > p,#man > ul,#man > ol,#man > dl,#man > pre |
|||
{ |
|||
margin-left:5%; |
|||
} |
|||
|
|||
#man dt |
|||
{ |
|||
clear:left; |
|||
margin:0; |
|||
} |
|||
|
|||
#man dt.flush |
|||
{ |
|||
float:left; |
|||
width:8ex; |
|||
} |
|||
|
|||
#man dd |
|||
{ |
|||
margin:0 0 0 9ex; |
|||
} |
|||
|
|||
#man code,#man strong,#man b |
|||
{ |
|||
font-weight:bold; |
|||
color:#ECEDEE; |
|||
} |
|||
|
|||
#man pre code |
|||
{ |
|||
font-weight:normal; |
|||
color:#DCDDDE; |
|||
background:inherit; |
|||
} |
|||
|
|||
#man em,var,u |
|||
{ |
|||
font-style:normal; |
|||
color:#CCCDCE; |
|||
border-bottom:1px solid #999; |
|||
} |
|||
|
|||
#man ol.man,#man ol.man li |
|||
{ |
|||
float:left; |
|||
width:33%; |
|||
list-style-type:none; |
|||
text-transform:uppercase; |
|||
font-size:18px; |
|||
color:#666; |
|||
letter-spacing:1px; |
|||
margin:2px 0 10px; |
|||
padding:0; |
|||
} |
|||
|
|||
#man ol.man |
|||
{ |
|||
width:100%; |
|||
} |
|||
|
|||
#man ol.man li.tl |
|||
{ |
|||
text-align:left; |
|||
} |
|||
|
|||
#man ol.man li.tc |
|||
{ |
|||
text-align:center; |
|||
letter-spacing:4px; |
|||
} |
|||
|
|||
#man ol.man li.tr |
|||
{ |
|||
text-align:right; |
|||
} |
|||
|
|||
#man ol.man a |
|||
{ |
|||
color:#666; |
|||
} |
|||
|
|||
#man ol.man a:hover |
|||
{ |
|||
color:#CCCDCE; |
|||
} |
|||
|
|||
#toc |
|||
{ |
|||
position: absolute; |
|||
top:0; |
|||
bottom:0; |
|||
left: 0; |
|||
padding-left: 30px; |
|||
width: 195px; |
|||
overflow: auto; |
|||
overflow-x: hidden; |
|||
font-size: 15px; |
|||
} |
|||
#toc li |
|||
{ |
|||
text-wrap: word-wrap; |
|||
} |
|||
#toc a |
|||
{ |
|||
display: inline-block; |
|||
width: 100%; |
|||
color: #fff; |
|||
text-decoration:none; |
|||
} |
|||
#toc > a:hover |
|||
{ |
|||
color: rgba(255,255,255,0.7); |
|||
} |
|||
#toc > ul > li |
|||
{ |
|||
border-bottom:1px solid #0f1214; |
|||
padding:5px 0 5px 5px; |
|||
list-style: none; |
|||
line-height: 1.3; |
|||
} |
|||
#toc ul ul |
|||
{ |
|||
display: none; |
|||
} |
|||
#toc ul ul > li |
|||
{ |
|||
border-top:1px solid rgba(0, 0, 0, 0.1); |
|||
color:#FFFFFF; |
|||
font-size:85%; |
|||
line-height:1.3; |
|||
list-style:disc outside none; |
|||
margin-left:25px; |
|||
max-width:165px; |
|||
padding:3px 0 5px 5px; |
|||
} |
|||
#toc li.active > a |
|||
{ |
|||
color:#CD5; |
|||
} |
|||
|
|||
.sh_sourceCode |
|||
{ |
|||
font-family: monospace; |
|||
overflow:hidden; |
|||
} |
|||
|
|||
#toc .toggler |
|||
{ |
|||
-moz-user-select:none; |
|||
background:none repeat scroll 0 0 #000000; |
|||
color:#FFFFFF; |
|||
display:inline-block; |
|||
font-weight:bold; |
|||
height:31px; |
|||
line-height:32px; |
|||
margin:-5px 8px -18px -33px; |
|||
outline:medium none; |
|||
padding:0; |
|||
text-align:center; |
|||
width:25px; |
|||
} |
|||
.current-section |
|||
{ |
|||
position: fixed; |
|||
top: 0; |
|||
margin: 0 !important; |
|||
} |
|||
#toctitle |
|||
{ |
|||
background:none repeat scroll 0 0 #000000; |
|||
color:#CCDD55; |
|||
font-size:18px; |
|||
margin: 0 0 10px -30px; |
|||
padding: 10px; |
|||
} |
|||
</style> |
|||
<link rel="stylesheet" href="./sh_vim-dark.css" type="text/css" /> |
|||
</head> |
|||
<body> |
|||
|
|||
<div id="toc"> |
|||
<div id="toctitle">Node v0.3.0</div> |
|||
<noscript>JavaScript must be enabled in your browser to display the table of contents.</noscript> |
|||
</div> |
|||
<div id='man'> |
|||
<div id="man-content"> |
|||
<ol class='head man'> |
|||
<li class='tl'>node(1)</li> |
|||
|
|||
<li class='tc'></li> |
|||
<li class='tr'>node(1)</li> |
|||
</ol> |
@ -1,178 +0,0 @@ |
|||
var NodeDoc = {}; |
|||
|
|||
NodeDoc.init = function() |
|||
{ |
|||
NodeDoc.generateToc(); |
|||
NodeDoc.setupScrollUpdate(); |
|||
NodeDoc.setupSmoothScrolling(); |
|||
|
|||
// Unblock rendering
|
|||
setTimeout(function() |
|||
{ |
|||
sh_highlightDocument(); |
|||
}, 100); |
|||
}; |
|||
NodeDoc.generateToc = function() |
|||
{ |
|||
var cur_level, last_level = 0, html = []; |
|||
|
|||
$('h2, h3').each(function(i) |
|||
{ |
|||
var $this = $(this); |
|||
$this.attr('id', $this.text().replace(/\(.*\)$/gi, '').replace(/[\s\.]+/gi, '-').replace(/('|"|:)/gi, '').toLowerCase() + '-' + i); |
|||
|
|||
cur_level = this.tagName.substr(1, 1); |
|||
|
|||
if (last_level != 0 && cur_level <= last_level) { |
|||
html.push("</li>") |
|||
} |
|||
|
|||
if (cur_level > last_level) |
|||
{ |
|||
html.push('<ul><li>'); |
|||
} |
|||
else if (cur_level < last_level) |
|||
{ |
|||
html.push('</ul>'); |
|||
} |
|||
|
|||
if (cur_level == last_level || cur_level < last_level) |
|||
{ |
|||
html.push('<li>'); |
|||
} |
|||
|
|||
html.push('<a href="#' + $this.attr('id') + '">' + $this.text().replace(/\(.*\)$/gi, '') + '</a>'); |
|||
|
|||
last_level = cur_level; |
|||
}); |
|||
|
|||
html.push('</li></ul>'); |
|||
|
|||
var $toc = $('#toc').append(html.join('')).find('ul li ul').each(function() |
|||
{ |
|||
$(this).parent().prepend('<a href="#" class="toggler">+</a>'); |
|||
}).hide(); |
|||
|
|||
$('.toggler').live('click', function() |
|||
{ |
|||
var $toggler = $('ul', $(this).parent()); |
|||
|
|||
if (!$toggler.is(':visible')) |
|||
{ |
|||
$toggler.slideDown(); |
|||
$(this).text('–'); |
|||
} |
|||
else |
|||
{ |
|||
$toggler.slideUp(); |
|||
$(this).text('+'); |
|||
} |
|||
|
|||
return false; |
|||
}); |
|||
|
|||
$('#toc > ul > li').live('click', function(e) |
|||
{ |
|||
if ($(e.target).parents('ul').length < 2) |
|||
{ |
|||
$(this).closest('li').find('.toggler').click(); |
|||
} |
|||
}); |
|||
}; |
|||
NodeDoc.setupScrollUpdate = function() |
|||
{ |
|||
$.extend($.expr[':'],{ |
|||
text: function(a,c, arr) |
|||
{ |
|||
return $.trim($(a).text()) === (arr[3] || 'av34'); |
|||
} |
|||
}); |
|||
var $headlines = $('h2'); |
|||
var scrollTimeout; |
|||
|
|||
function updateNavigation() |
|||
{ |
|||
var bodyCenter = $('body').scrollTop()+10; |
|||
|
|||
var $last = $('<div id="dummy"/>'); |
|||
var found = false; |
|||
|
|||
$headlines.each(function(index) |
|||
{ |
|||
var $this = $(this); |
|||
|
|||
if ($this.offset().top > bodyCenter) |
|||
{ |
|||
if (scrollTimeout) |
|||
{ |
|||
clearTimeout(scrollTimeout); |
|||
} |
|||
|
|||
scrollTimeout = setTimeout(function() |
|||
{ |
|||
updateNav($last); |
|||
}, 100); |
|||
return false; |
|||
} |
|||
|
|||
$last = $this; |
|||
}); |
|||
|
|||
if ($last.is('#dummy')) |
|||
{ |
|||
$('.current-section').remove(); |
|||
} |
|||
|
|||
function updateNav($last) |
|||
{ |
|||
var $activeToc = $('#toc > ul > li > a:text("'+$last.text()+'")').parent().addClass('active').siblings().removeClass('active').end(); |
|||
|
|||
if ($activeToc.length) |
|||
{ |
|||
var newHash = $activeToc.find('> a:not(.toggler)').attr('href'); |
|||
|
|||
var $elementHash = $('#man h2'+newHash); |
|||
|
|||
$('title').text($('title').text().replace(/-- (.*) for/, '-- '+$last.text()+' for')); |
|||
|
|||
$('.current-section').remove(); |
|||
$currentSelection = $last.clone().width($last.width()).addClass('current-section'); |
|||
$last.after($currentSelection); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
updateNavigation(); |
|||
|
|||
$('#man').scroll(updateNavigation); |
|||
}; |
|||
NodeDoc.setupSmoothScrolling = function() |
|||
{ |
|||
$('a[href*="#"]').live('click', function() |
|||
{ |
|||
var $this = $(this); |
|||
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) |
|||
{ |
|||
var $target = $(this.hash); |
|||
$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); |
|||
|
|||
if ($target.length) |
|||
{ |
|||
var targetOffset = $('#man').scrollTop()+$target.offset().top; |
|||
|
|||
if ($this.closest('#toc').length && $this.parents('ul').length > 1) |
|||
{ |
|||
targetOffset -= 45; |
|||
} |
|||
|
|||
$('#man').animate({ |
|||
scrollTop: targetOffset |
|||
}, 200); |
|||
|
|||
return false; |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
NodeDoc.init(); |
Loading…
Reference in new issue