From 542ac7f3d204be52c829f25270e840933e397bc0 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 17 Sep 2014 17:26:46 -0400 Subject: child_process: properly support optional args Currently, a TypeError is incorrectly thrown if the second argument is an object. This commit allows the args argument to be properly omitted. Fixes: https://github.com/joyent/node/issues/6068 Reviewed-by: Trevor Norris --- lib/child_process.js | 2 +- test/simple/test-child-process-spawn-typeerror.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index e19f4ff89..0c1b4c99c 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -711,7 +711,7 @@ var spawn = exports.spawn = function(file /*, args, options*/) { if (Array.isArray(arguments[1])) { args = arguments[1].slice(0); options = arguments[2]; - } else if (arguments[1] && !Array.isArray(arguments[1])) { + } else if (arguments[1] && typeof arguments[1] !== 'object') { throw new TypeError('Incorrect value of args option'); } else { args = []; diff --git a/test/simple/test-child-process-spawn-typeerror.js b/test/simple/test-child-process-spawn-typeerror.js index 791adcbc2..d18ce943e 100644 --- a/test/simple/test-child-process-spawn-typeerror.js +++ b/test/simple/test-child-process-spawn-typeerror.js @@ -22,12 +22,13 @@ var spawn = require('child_process').spawn, assert = require('assert'), windows = (process.platform === 'win32'), - cmd = (windows) ? 'ls' : 'dir', + cmd = (windows) ? 'dir' : 'ls', + invalidcmd = (windows) ? 'ls' : 'dir', errors = 0; try { // Ensure this throws a TypeError - var child = spawn(cmd, 'this is not an array'); + var child = spawn(invalidcmd, 'this is not an array'); child.on('error', function (err) { errors++; @@ -37,6 +38,11 @@ try { assert.equal(e instanceof TypeError, true); } +// verify that args argument is optional +assert.doesNotThrow(function() { + spawn(cmd, {}); +}); + process.on('exit', function() { assert.equal(errors, 0); }); -- cgit v1.2.1 From c8e0bdd7cf628ee2f3f79e5538132467bbc50b4a Mon Sep 17 00:00:00 2001 From: Calvin Metcalf Date: Wed, 3 Sep 2014 09:01:15 -0400 Subject: doc: document _transform callback takes 2 args Expands the paragraph in the transform stream implementation docs about the callback that is passed to the _transform method to include details about how two arguments may be passed, error and data. A code example is also included. Reviewed-By: Fedor Indutny --- doc/api/stream.markdown | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 5c311e830..5a823e723 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -1071,7 +1071,7 @@ initialized. * `encoding` {String} If the chunk is a string, then this is the encoding type. (Ignore if `decodeStrings` chunk is a buffer.) * `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. + argument and data) when you are done processing the supplied chunk. Note: **This function MUST NOT be called directly.** It should be implemented by child classes, and called by the internal Transform @@ -1091,7 +1091,20 @@ as a result of this chunk. Call the callback function only when the current chunk is completely consumed. Note that there may or may not be output as a result of any -particular input chunk. +particular input chunk. If you supply as the second argument to the +it will be passed to push method, in other words the following are +equivalent: + +```javascript +transform.prototype._transform = function (data, encoding, callback) { + this.push(data); + callback(); +} + +transform.prototype._transform = function (data, encoding, callback) { + callback(null, data); +} +``` This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user -- cgit v1.2.1 From d87ae24dfe148e8bd524c57cfd2c9fe0d3dfce93 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 23 Sep 2014 16:49:14 +0400 Subject: hdr: always define NODE_WANT_INTERNALS Otherwise the warning could be printed on some systems. fix #8419 --- src/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.h b/src/node.h index 199aadfac..7b1851253 100644 --- a/src/node.h +++ b/src/node.h @@ -66,7 +66,7 @@ #include "node_object_wrap.h" -#if NODE_WANT_INTERNALS +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS # include "node_internals.h" #endif -- cgit v1.2.1 From 2b7c8a2f02c2e132c2dbc59bd05e0e7246e10196 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Mon, 13 Oct 2014 11:34:42 -0700 Subject: test: check for multi-localhost support --- test/common.js | 8 ++++++++ test/simple/test-http-localaddress.js | 2 +- test/simple/test-https-localaddress.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/common.js b/test/common.js index cf90634c4..92a418394 100644 --- a/test/common.js +++ b/test/common.js @@ -210,3 +210,11 @@ exports.mustCall = function(fn, expected) { return fn.apply(this, arguments); }; }; + +exports.hasMultiLocalhost = function hasMultiLocalhost() { + var TCP = process.binding('tcp_wrap').TCP; + var t = new TCP(); + var ret = t.bind('127.0.0.2', exports.PORT); + t.close(); + return ret === 0; +}; diff --git a/test/simple/test-http-localaddress.js b/test/simple/test-http-localaddress.js index d5778e09b..27172e33a 100644 --- a/test/simple/test-http-localaddress.js +++ b/test/simple/test-http-localaddress.js @@ -23,7 +23,7 @@ var common = require('../common'); var http = require('http'), assert = require('assert'); -if (['linux', 'win32'].indexOf(process.platform) == -1) { +if (!common.hasMultiLocalhost()) { console.log('Skipping platform-specific test.'); process.exit(); } diff --git a/test/simple/test-https-localaddress.js b/test/simple/test-https-localaddress.js index f577af3ac..6388c5baa 100644 --- a/test/simple/test-https-localaddress.js +++ b/test/simple/test-https-localaddress.js @@ -24,7 +24,7 @@ var https = require('https'), fs = require('fs'), assert = require('assert'); -if (['linux', 'win32'].indexOf(process.platform) == -1) { +if (!common.hasMultiLocalhost()) { console.log('Skipping platform-specific test.'); process.exit(); } -- cgit v1.2.1 From 641cea092699aaeba8c61ed5ca864f0a219d5c43 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Mon, 13 Oct 2014 13:09:17 -0700 Subject: doc: build branch versioned docs --- Makefile | 13 +++++++++++-- tools/doc/html.js | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3464c2e2f..99c168179 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,9 @@ website_files = \ doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node +doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.) +doc-branch: doc + $(apidoc_dirs): mkdir -p $@ @@ -159,10 +162,10 @@ out/doc/%: doc/% cp -r $< $@ out/doc/api/%.json: doc/api/%.markdown node - out/Release/node tools/doc/generate.js --format=json $< > $@ + NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=json $< > $@ out/doc/api/%.html: doc/api/%.markdown node - out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@ + NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@ email.md: ChangeLog tools/email-footer.md bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@ @@ -181,6 +184,11 @@ website-upload: doc rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\ ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz' +doc-branch-upload: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.) +doc-branch-upload: doc-branch + echo $(NODE_DOC_VERSION) + rsync -r out/doc/api/ node@nodejs.org:~/web/nodejs.org/api/$(NODE_DOC_VERSION) + docopen: out/doc/api/all.html -google-chrome out/doc/api/all.html @@ -189,6 +197,7 @@ docclean: RAWVER=$(shell $(PYTHON) tools/getnodeversion.py) VERSION=v$(RAWVER) +NODE_DOC_VERSION=$(VERSION) RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py) PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') ifeq ($(findstring x86_64,$(shell uname -m)),x86_64) diff --git a/tools/doc/html.js b/tools/doc/html.js index 087f726a3..195668a37 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -48,7 +48,7 @@ function render(lexed, filename, template, cb) { template = template.replace(/__FILENAME__/g, filename); template = template.replace(/__SECTION__/g, section); - template = template.replace(/__VERSION__/g, process.version); + template = template.replace(/__VERSION__/g, process.env.NODE_DOC_VERSION); template = template.replace(/__TOC__/g, toc); // content has to be the last thing we do with -- cgit v1.2.1 From 1524d483336e1fba1c62693f65e79c2f251cd36a Mon Sep 17 00:00:00 2001 From: Matthew Fitzsimmons Date: Mon, 16 Jun 2014 17:38:00 -0700 Subject: doc: update design to match nodejs.org --- doc/api_assets/joyent-footer.svg | 31 ++ doc/api_assets/logo.svg | 42 ++ doc/api_assets/style.css | 1051 +++++++++++++++++++++++++------------- doc/template.html | 99 ++-- 4 files changed, 821 insertions(+), 402 deletions(-) create mode 100644 doc/api_assets/joyent-footer.svg create mode 100644 doc/api_assets/logo.svg diff --git a/doc/api_assets/joyent-footer.svg b/doc/api_assets/joyent-footer.svg new file mode 100644 index 000000000..c4d1ab6f5 --- /dev/null +++ b/doc/api_assets/joyent-footer.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/doc/api_assets/logo.svg b/doc/api_assets/logo.svg new file mode 100644 index 000000000..39ce9672b --- /dev/null +++ b/doc/api_assets/logo.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index ecb4a35c5..39f2381f3 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -1,562 +1,749 @@ -/*--------------------- Layout and Typography ----------------------------*/ +*, *:before, *:after { + -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; + } + html { -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +hr { + border: none; + background-color: #999999; + height: 1px; +} + +.din { + font-family: "din-condensed-web","Arial Narrow",Arial,sans-serif; + font-style: normal; + font-weight: 400; + text-transform: uppercase; +} + +.sans { + font-family: "source-sans-pro", sans-serif; + font-style: normal; + font-weight: 400; +} + +.node-green { + color: #80bd01; } body { - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; - font-size: 14px; - line-height: 180%; - color: black; - background-color: white; - margin: 0; padding: 49px 0 0 0; - border-top: 6px #8CC84B solid; + background: #1d1d1d; + color: #333333; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 17px; + line-height: 200%; + font-family: "source-sans-pro", sans-serif; + font-style: normal; + font-weight: 400; + margin: 0; } -a { - color: #480; - text-decoration: underline; +body a { + font-weight: bold; } -a:visited { - color: #46483e; - text-decoration: underline; +img { + border: 0; } -a:hover, -a:focus { - text-decoration: none; +ul { + margin: 0px; + padding: 0px; } -code a:hover { - background: none; - color: #b950b7; +h1, h2, h3, h4 { + color: #000000; + margin-top: 1em; + margin-right: 0; + margin-bottom: 10px; + margin-left: 0; + text-transform: uppercase; } -#changelog #gtoc { - display: none; +h1 { + font-size: 30px; + line-height: 36px; + text-transform: none; + color: #000000; + font-weight: normal; + margin: 15px 0 11px; } -#gtoc p { - margin: 0; - font-size: 18px; - line-height: 30px; +h2 { + font-style: normal; + font-weight: 400; + font-size: 25px; + letter-spacing: 1px; + text-transform: none; } -#gtoc a { - font-family: Georgia, FreeSerif, Times, serif; - text-decoration: none; - color: #46483e; +h3, h4 { + font-weight: 400; + text-transform: none; } -#gtoc a:hover { - color: #669900; +.blog h2 {margin-top: 10px;} + +#front h1, #front h2, #front h3, #front h4/*, .blog h2, .blog h3, .blog h4*/ { + font-family: "din-condensed-web","Arial Narrow",Arial,sans-serif; + font-style: normal; + font-weight: 400; + text-transform: uppercase; + color: #80bd01; +} + +/*.blog h1 a { + color: #80bd01; +}*/ + +#Community h2 { + font-weight: 200; + font-size: 30px; + text-transform: uppercase; + line-height: 60px; + margin-bottom: 0; + margin-top: 10px; +} + +#Community #content ul a { + font-weight: 600; + line-height: 15px; text-decoration: underline; } -.notice { - display: block; - padding: 1em; - margin: 1.4667em 0 2.9334em; - background: #FFF6BF; - color: #514721; - border: 1px solid #FFD324; +h1 code, h2 code, h3 code, h4 code, +h1 a, h2 a, h3 a, h4 a { + color: inherit; + font-size: inherit; } -.notice p { - margin: 0; +h3 a { + color: #80bd01; } -.api_stability_0 { - border-color: #D60027; +#nav { + background: #303030; + padding-top: 22px; + text-align: center; } -.api_stability_1 { - border-color: #EC5315; +#nav ul { + width: 560px; + margin: 0 auto; } -.api_stability_2 { - border-color: #FFD700; +#nav ul:after, #footer .foot-nav:after { + content: ' '; + display: block; + width: 0; + height: 0; + clear: both; } -.api_stability_3 { - border-color: #AEC516; +#nav ul li { + position: relative; + background: #303030; + display: block; + float: left; + font-size: 12px; + line-height: 12px; + padding-bottom: 20px; } -.api_stability_4 { - border-color: #009431; +#nav ul li.active:after { + top: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(3, 3, 0, 0); + border-top-color: #303030; + border-width: 15px; + margin-left: -15px; } -.api_stability_5 { - border-color: #0084B6; +#nav ul li a { + padding: 0 12px; + font-weight: normal; + border-left: 1px solid rgba(109,109,109,.4); + text-transform: uppercase; + font-size: 14px; + color: #cccccc; } -ul.plain { - list-style: none; +#nav ul li.active a { + color: #80bd01; } -abbr { - border-bottom: 1px dotted #454545; +#nav ul li:first-child { + padding-bottom: 12px; } -p { - margin: 0 0 1.4667em 0; - position: relative; - text-rendering: optimizeLegibility; +#nav ul li:first-child a { + border-left: none; } -table { - border-collapse: collapse; - margin: 0 0 1.4667em 0; +#intro { + padding-top: 30px; + width: 775px; + margin: 0 auto; + text-align: center; + color: #d2d8ba; } -th, td { - border: 1px solid #aaa; +#logo { + width: 182px; + margin: 30px auto; } -table p { - margin: 0 1ex; +#intro p { + color: #ccc; + width: 755px; + padding-top: 30px; + margin: 0 auto; } -th { - text-align:left; +#intro p.version { + padding-top: 10px; + font-size: 16px; + color: rgba(153,153,153,.9); } -.apidoc #apicontent p, -.apidoc #apicontent li { - font-size: 15px; - line-height: 22px; - color: #000; - font-family: Georgia, FreeSerif, Times, serif; +#intro .buttons { + height: auto; + overflow: hidden; + _zoom: 1; + width: 300px; + margin: 0 auto; } -ol, ul, dl { - margin: 0 0 1em 0; - padding: 0; +#intro .button { + font-family: "din-condensed-web","Arial Narrow",Arial,sans-serif; + font-style: normal; + font-weight: 400; + text-transform: uppercase; + font-size: 18px; + line-height: 18px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + + -webkit-transition: .2s all ease-in-out; + -moz-transition: .2s all ease-in-out; + transition: .2s all ease-in-out; + + margin: 10px 4px; + display: inline-block; + color: #1b1b1b; + background-color: rgba(153,153,153,.7); + width: 106px; + padding-top: 5px; + padding-bottom: 3px; } -ol ul, ol ol, ol dl, -ul ul, ul ol, ul dl, -dl ul, dl ol, dl dl { - margin-bottom: 0; +#intro .button:hover { + text-decoration: none; + background-color: rgba(153,153,153,1); } -ol p:first-child, -ul p:first-child, -dl p:first-child { - margin-bottom: 0; +#intro #docsbutton { + clear: left; } -ul, ol { - margin-left: 2em; +#intro .downloadbutton { + background-color: #80bd01; + width: 220px; + font-size: 30px; + display: block; + margin: 30px auto 0px auto; + font-family: "din-condensed-web","Arial Narrow",Arial,sans-serif; + font-style: normal; + font-weight: 400; + text-transform: uppercase; + padding-top: 12px; + padding-bottom: 10px; } -dl dt { - position: relative; - margin: 1.5em 0 0; +#intro .downloadbutton:hover { + background-color: #73a53e; } -dl dd { +#promo { position: relative; - margin: 0 1em 0; + margin-top: 30px; } -dd + dt.pre { - margin-top: 1.6em; +#promo:after { + position: absolute; + background: url(/images/stripe.png); + background-size: 5px auto; + content: ''; + top: 10px; + left: 0; + right: 0; + bottom: 0; + z-index: -1; + display: block; } -h1, h2, h3, h4, h5, h6 { - font-family: Helvetica, Arial, sans-serif; - color: #000; - text-rendering: optimizeLegibility; - position: relative; +#promo img { + margin: 0 auto; + width: 729px; + display: block; } -header h1 { - font-family: Georgia, FreeSerif, Times, serif; - font-size: 30px; - font-weight: normal; - line-height: 36px; - color: #480; - margin: 15px 0 11px; +#content-wrap { + background: #303030; + padding-bottom: 50px; } -h1 { - font-size: 29px; - line-height: 33px; - margin: 2em 0 15px; +/* .blog #content-wrap, .blog #content-wrap #content #column1 { + background-color: #1d1d1d; +} */ + +#content { + width: 775px; + margin: 0 auto; + overflow: visible; + clear: both; + display: block; } -#toc + h1 { - margin-top: 1em; - padding-top: 0; +.int #content { } -h2 { - font-size: 1.4em; - line-height: 1.0909em; - margin: 1.5em 0 0.5em; +.blog.int #content { + padding-top: 10px; } -h2 + h2 { - margin: 0 0 0.5em; +#Community #content, .docs #content { + width: 953px; } -h3 { - font-size: 1.3em; - line-height: 1.1282em; - margin: 2.2em 0 0.5em; +/* .int.community #content { + width: 775px; +} */ + +#column1 { + width: 460px; + float: left; } -h3 + h3 { - margin: 0 0 0.5em; +#content p, +#content ul { + font-size: 15px; + line-height: 24px; } -h2, h3, h4 { - position: relative; - padding-right: 40px; +#content ul { + margin-top: 1em; } -h1 span, h2 span, h3 span, h4 span { - font-size: 25px; - position: absolute; - display: block; - top: 0; - right: 0; - opacity: 0.3; +#content table { + font-size: 14px; + line-height: 24px; + width: 100%; +} + +#installers { + width: 600px; + display: table; + margin-bottom: 1em; } -h1 span:hover, h2 span:hover, h3 span:hover, h4 span:hover { - opacity: 1; +#installers ul { + width: auto; + text-align: center; + margin: 0 auto; + display: table-row; + width: 600px; } -h1 span a, h2 span a, h3 span a, h4 span a { - font-size: 0.8em; - color: #000; +#installers ul img { + display: block; + margin: 0 auto; +} + +#installers ul a { + display: block; + width: 100%; text-decoration: none; - font-family: Helvetica, Arial, sans-serif; - font-weight: bold; + font-size: 16px; + padding-top: 1em; + background: #f1fbda; } -h1 span a.top, h2 span a.top, h3 span a.top, h4 span a.top { - /* XXX Get an image and clean up these two links - * so that they look nice next to one another. - * http://www.chrisglass.com/work/nodejs/website/v05/docs.html - * -isaacs - */ - display: none; +#installers ul a:hover, +#installers ul a:active { + background: #666; + color: #8cc84b; } -h5 { - font-size: 1.125em; - line-height: 1.4em; +#installers ul li { + width: 33%; + display: table-cell; } -h6 { - font-size: 1em; - line-height: 1.4667em; +#installers a small { + font-size: 10px; + display: block; + color: #999; } -pre, tt, code { - font-size: 14px; - line-height: 1.5438em; - font-family: Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; +#installers a:hover small { + color: #eee; } -.pre { - font-family: Monaco, Consolas, "Lucida Console", monospace; - line-height: 1.5438em; - font-size: 0.95em; +#download #content { + width: 600px; } -pre { - padding: 1em 1.6em 1em 1.2em; - vertical-align: top; - background: #f8f8f8; - border: 1px solid #e8e8e8; - border-width: 1px 1px 1px 6px; - margin: -0.5em 0 1.1em; - overflow-x: auto; +#download #content th { + text-align: left; + width: 33%; } -pre + h3 { - margin-top: 2.225em; +#download #content table { + table-collapse: separate; } -code.pre { - white-space: pre; +#download #content td { + border: 1px solid #ccc; } -#intro { - width: 775px; - margin: 0 auto; +#download #content td a { + background: none; + display: block; + height: 100%; + width: 100%; text-align: center; - color: #d2d8ba; - /* preload platform-icons.png */ - background-image: url(http://nodejs.org/images/platform-icons.png); - background-repeat: no-repeat; - background-position: -999em -999em; } -#intro.interior #logo { - margin-left: -298px; - border: 0; +#download #content td a:hover, +#download #content td a:active { + background: #666; + color: #8cc84b; } -hr { - background: none; - border: medium none; - border-bottom: 1px solid #ccc; - margin: 1em 0; +#front #content p { + color: #fff; + font-size: 12px; } -#toc { - font-size: 15px; - line-height: 1.5em; - line-height: 22px; - padding-top: 4px; +#column2 { + width: 218px; + padding-left: 0; + padding-right: 0; + float: left; + padding-top: 30px; +} + +.int #column2 img { + margin-left: 20px; } -#toc h2 { +#column2.featured h3 { + text-transform: none; + color: #fff; font-size: 15px; - line-height: 21px; - margin: 0 0 0.5em; + line-height: 15px; + margin-top: 10px; + margin-bottom: 0; + font-weight: normal; + font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; } -#toc h2 a { - float: right; +#column2.featured p { + font-size: 11px; + line-height: 18px; + font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; } -#toc hr { - margin: 1em 0 2em; +#column1.interior { + width: 100%; + font-size: 18px; + background: white; + padding-top: 30px; } -#toc ul, -#api-section-index #apicontent ul li, -#api-section-index #apicontent ul { +#column1.interior ul { + padding-left: 40px; +} + +#content ul li ul { + margin-top: 0; +} + +#docs #column1.interior { + width: 866px; + float: left; + padding-left: 30px; + padding-bottom: 50px; + padding-right: 30px; +} + +.row { + padding-top: 10px; + padding-bottom: 10px; +} + +.row h2 { + font-size: 24px; + color: #000000; + text-transform: none; font-family: Georgia, FreeSerif, Times, serif; - color: #666 !important; + background: url(http://nodejs.org/images/community-icons.png) no-repeat; + padding-left: 45px; + padding-top: 6px; + padding-bottom: 10px; + margin-top: 10px; +} + +.row h2.github { background-position: left -92px; } +.row h2.mailing { background-position: left -308px; } +.row h2.periodicals { background-position: left -198px; padding-top: 9px; margin-top: 7px; } +.row h2.conferences { background-position: left -522px; } +.row h2.localized { background-position: left -414px; } +.row h2.irc { background-position: left -626px; } +.row h2.installers { background-position: left -522px; } + +.block { + width: 215px; + float: left; + min-height: 420px; + margin-right: 30px; } -#toc ul a { - text-decoration: none; - border-bottom: 1px dotted #480; +/* .community .block { + width: 365px; + min-height: 270px; +} */ + +div.block:nth-of-type(4n) { + margin-right: 0; } -#toc ul a:hover, -#toc ul a:focus { - border-bottom: 1px dotted #fff; - color: #000; +.block.index_md_irc { + width: 100%; } -p tt, -p code, span.type { - background: #f8f8ff; - border: 1px solid #dedede; - padding: 0 0.2em; +.block h2 { + margin-top: 0; } -#content { - width: 953px; +#content .block ul { + list-style-type: none; + margin-top: 0; + padding-left: 0; +} + +#footer { + width: 970px; margin: 0 auto; - overflow: visible; - clear: both; - display: block; + padding: 30px 0 50px 0; } -#column1.interior { - width: 749px; - float: right; - padding-top: 7px; - padding-top: 11px; - font-size: 18px; +.foot-1 { + width: 240px; + float: left; + padding-left: 30px; + padding-bottom: 20px; } -#column2.interior { - width: 140px; +.foot-2 { + width: 620px; + margin-bottom: 50px; float: left; - margin-top: -55px; - overflow: visible; + padding-left: 20px; + border-left: 1px solid rgba(255,255,255,.3); } -#column2.interior ul { - margin-left: 0; +#footer > a { + display: block; + text-align: center; } -#column2.interior li { - list-style-type: none; +#footer img { + margin: 0 auto; + width: 162px; } -#column2.interior li a { - display: block; - padding: 0 0 0 35px; - color: #878b78; - text-transform: uppercase; +#footer a:hover { text-decoration: none; - font-size: 11px; - line-height: 23px; -} - -#column2.interior li a.home { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px 3px; } -#column2.interior li a.download { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -21px; } -#column2.interior li a.about { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -45px; } -#column2.interior li a.npm { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -69px; } -#column2.interior li a.docs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -93px; } -#column2.interior li a.blog { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -117px; } -#column2.interior li a.community { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -141px; } -#column2.interior li a.logos { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -165px; } -#column2.interior li a.jobs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -189px; } - -#column2.interior li a.home.current { background-position: 2px 3px; } -#column2.interior li a.download.current { background-position: 2px -21px; } -#column2.interior li a.about.current { background-position: 2px -45px; } -#column2.interior li a.npm.current { background-position: 2px -69px; } -#column2.interior li a.docs.current { background-position: 2px -93px; } -#column2.interior li a.blog.current { background-position: 2px -117px; } -#column2.interior li a.community.current { background-position: 2px -141px; } -#column2.interior li a.logos.current { background-position: 2px -165px; } -#column2.interior li a.jobs.current { background-position: 2px -189px; } - -#column2.interior li a.home:hover { background-position: -331px 3px; } -#column2.interior li a.download:hover { background-position: -331px -21px; } -#column2.interior li a.about:hover { background-position: -331px -45px; } -#column2.interior li a.npm:hover { background-position: -331px -69px; } -#column2.interior li a.docs:hover { background-position: -331px -93px; } -#column2.interior li a.blog:hover { background-position: -331px -117px; } -#column2.interior li a.community:hover { background-position: -331px -141px; } -#column2.interior li a.logos:hover { background-position: -331px -165px; } -#column2.interior li a.jobs:hover { background-position: -331px -189px; } - -#column2.interior li a.current { - color: #8cc84b; - font-weight: bold; } -#column2.interior li a:hover { - color: #000000; - text-decoration: none; +#footer h5 { + font-weight: 600; + font-size: 10px; + margin-bottom: 15px; + margin-top: 0; + line-height: 12px; +} + +#footer a p { + color: rgba(255,255,255,.4); + font-size: 12px; + margin-top: 0; + line-height: 14px; +} + +#footer a.getstarted { + font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + font-size: 20px; + line-height: 20px; + background-color: #6b9e00; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + -webkit-transition: .2s all ease-in-out; + -moz-transition: .2s all ease-in-out; + transition: .2s all ease-in-out; + color: #fff; + width: 120px; + display: block; + padding-top: 6px; + padding-bottom: 6px; + padding-left: 10px; + font-weight: normal; } -#column2.interior li + li { - border-top: 1px solid #c1c7ac; +#footer a.getstarted:hover { + background-color: #73a53e; } -#column2.interior p.twitter { - padding-top: 20px; +#footer p.copyright { + margin-top: 50px; + margin-bottom: 0; + color: rgba(255,255,255,.4); + font-size: 12px; } -#column2.interior p.twitter a { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 0 4px; - padding-left: 37px; - text-decoration: none; +#footer p.copyright a { + color: rgba(255,255,255,.4); } -#column2.interior p.twitter a:hover { +#footer p.copyright a:hover { text-decoration: underline; } -a.totop { - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; - font-weight: bold; - text-indent: -9999999px; - background: url(http://nodejs.org/images/anchor.png) no-repeat top left; - margin-right: 7px; - display: block; - width: 13px; - border-bottom: 1px solid #cccccc; +#footer ul { + list-style-type: none; + float: left; + margin-right: 60px; } -a.anchor { - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; - font-weight: bold; - text-indent: -9999999px; - background: url(http://nodejs.org/images/anchor.png) no-repeat top right; - display: block; - width: 13px; - border-bottom: 1px solid #cccccc; +#footer ul:last-child { + margin-right: 0; } -#footer { - width: 942px; - margin: 150px auto 55px auto; - padding: 0; +#footer ul a { + color: rgba(255,255,255,.7); +} + +#footer ul li { + font-size: 13px; + line-height: 13px; + margin-bottom: 15px; } -#footer .joyent-logo { - display:block; - position:absolute; - overflow:hidden; - text-indent:-999em; - height:100px; - width:190px; - z-index:999; +#footer ul li a { + font-weight: normal; } -#footer p { - font-size: 11px; - line-height: 1em; - padding: 0 0 0 195px; - color: #666; +pre, tt, code { + color: #d2d8ba; + font-size: 14px; + line-height: 22px; + font-family: Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; +} + +#front pre, #front tt, #front code { + font-size: 12px; + line-height: 22px; +} + +pre { + padding-left: 1em; + margin-left: -1em; + border-left-width: 1px; + border-left-style: solid; + border-left-color: #626557; +} + +.alt pre { + font-size: 14px; + margin-left: 0; + border-left: 2px solid #dadad7; + background-color: #f4f4f2; + color: #46483e; + padding: 1em 1.5em; + line-height: 2em; +} + +.alt code { + color: #996633; } -#footer p, -#footer li { - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; +dd { + margin: 1em 0; + margin-left: 1em; } -#footer a { +a { + color: #80bd01; text-decoration: none; - border: none; - color: #480; } -#footer a:hover { - color: #000; +a:hover { + text-decoration: underline; } -#footer p a { - border-bottom: 1px dotted #480; - color: #878b78; +.alt #content-wrap { + background: white; + padding-bottom: 50px; } -#footer ul { - background: url(http://nodejs.org/images/footer-logo-alt.png) left 17px no-repeat; - padding: 23px 0 0 195px; - height: 26px; - margin-left: -1px; - border-top: 1px solid #626557; +.alt #content a { } -#footer ul li { - list-style-type: none; - float: left; +.alt#logos #content a { + background-color: transparent; +} + +.highlight { + background: #733; + padding: 0.2em 0; +} +.desktops { font-size: 12px; - margin: 0 !important; - padding: 0; - height: 12px; } -#footer ul li a { - margin: 0; - padding: 0 6px 0 0; - display: block; - height: 12px; - line-height: 12px; +.release { + margin: 0 0 0 2em; } -#footer ul li + li { - margin-left: 3px; +.blog p.prev, .blog p.next { + font-size: 14px !important; + font-weight: 600; + margin-top: 0; + margin-bottom: 0; } -#footer ul li + li a { - padding: 0 6px 0 6px; - border-left: 1px solid #878b78; +.blog p.prev{ + float: left; } -#footer ul li a.twitter { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 5px 0px; - padding-left: 25px; +.blog p.next { + float: right; } /* simpler clearfix */ @@ -567,3 +754,135 @@ a.anchor { clear: both; visibility: hidden; } + +.alt#docs #content-wrap { + background: #ebebeb; +} + +#docs #content { + width: 1084px; +} + +#content h1 { + padding-bottom: 11px; + border-bottom: 1px solid #000000; +} + +#content h1 + p { + color: #333333; + font-size: 19px; + line-height: 35px; +} + +.docs-nav { + list-style-type: none; +} + +.docs-nav li { + padding-left: 20px; + padding -right: 20px; +} + +.docs-nav li.active { + background: #d9ebb3; +} + +.docs-nav li a { + color: black; + font-weight: 400; + font-size: 14px; + line-height: 25px; + text-transform: uppercase; +} + +.docs-nav li.active a { + font-weight: 600; +} + +#frame-wrap { + width: 100%; + height: 1200px; + overflow: hidden; + position: relative; +} + +#frame { + position: absolute; + top: -140px; + left: -270px; + width: 1086px; + height: 1200px; +} + +h1 a.mark, h2 a.mark, h3 a.mark { + color: rgba(0,0,0,.0); +} + +h1:hover a.mark, h2:hover a.mark, h3:hover a.mark { + color: rgba(0,0,0,.2); +} + +a.mark:hover { + text-decoration: none; +} + +.post-in-feed { + padding-bottom: 30px; + margin-bottom: 40px; + border-bottom: 1px solid rgba(0,0,0,.1); +} + +.carousel { + background: url(/images/contributing-photo-combo.jpg) no-repeat left top #80bd01; + height: 270px; + width: 100%; + text-align: center; + background-size: auto 300px; +} + +.carousel img { + height: 270px; + margin: 0 auto; +} + +.carousel .cycle-slideshow { + width: 973px; + margin: 0 auto; +} + +#Community #content h1 { + border-bottom: none; + font-weight: 600; + text-transform: uppercase; + font-size: 23px; + position: relative; + top: -160px; + margin: 0 auto; + text-align: center; + color: white; + background: rgba(0,0,0,.7); + padding: 3px 10px 3px 15px; + z-index: 999; +} + +#Community #content #column1 { + padding-top: 0; +} + +#Community #content #column1 h1 + p { + margin-top: 0; +} + +table th { + font-weight: 600; +} + +b { + font-weight: 600; +} + +table.logos td.jstm img { + width: 130px; + margin-bottom: 0; + padding-bottom: 0; +} \ No newline at end of file diff --git a/doc/template.html b/doc/template.html index 7c40bede9..b1f4463e6 100644 --- a/doc/template.html +++ b/doc/template.html @@ -6,29 +6,34 @@ + + - -
- - - + + +
- - +

Node.js __VERSION__ Manual & Documentation

@@ -52,26 +57,48 @@
+
+ + - - + +