diff options
Diffstat (limited to 'web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl')
16 files changed, 713 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/container.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/container.tmpl new file mode 100644 index 000000000..cd3e5a65d --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/container.tmpl @@ -0,0 +1,154 @@ +<?js + var self = this; + docs.forEach(function(doc, i) { +?> + +<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?> + <?js= self.partial('mainpage.tmpl', doc) ?> +<?js } else if (doc.kind === 'source') { ?> + <?js= self.partial('source.tmpl', doc) ?> +<?js } else { ?> + +<section> + +<header> + <h2><?js if (doc.ancestors && doc.ancestors.length) { ?> + <span class="ancestors"><?js= doc.ancestors.join('') ?></span> + <?js } ?> + <?js= doc.name ?> + <?js if (doc.variation) { ?> + <sup class="variation"><?js= doc.variation ?></sup> + <?js } ?></h2> + <?js if (doc.classdesc) { ?> + <div class="class-description"><?js= doc.classdesc ?></div> + <?js } ?> +</header> + +<article> + <div class="container-overview"> + <?js if (doc.kind === 'module' && doc.module) { ?> + <?js= self.partial('method.tmpl', doc.module) ?> + <?js } ?> + + <?js if (doc.kind === 'class') { ?> + <?js= self.partial('method.tmpl', doc) ?> + <?js } else { ?> + <?js if (doc.description) { ?> + <div class="description"><?js= doc.description ?></div> + <?js } ?> + + <?js= self.partial('details.tmpl', doc) ?> + + <?js if (doc.examples && doc.examples.length) { ?> + <h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3> + <?js= self.partial('examples.tmpl', doc.examples) ?> + <?js } ?> + <?js } ?> + </div> + + <?js if (doc.augments && doc.augments.length) { ?> + <h3 class="subsection-title">Extends</h3> + + <ul><?js doc.augments.forEach(function(a) { ?> + <li><?js= self.linkto(a, a) ?></li> + <?js }); ?></ul> + <?js } ?> + + <?js if (doc.mixes && doc.mixes.length) { ?> + <h3 class="subsection-title">Mixes In</h3> + + <ul><?js doc.mixes.forEach(function(a) { ?> + <li><?js= self.linkto(a, a) ?></li> + <?js }); ?></ul> + <?js } ?> + + <?js if (doc.requires && doc.requires.length) { ?> + <h3 class="subsection-title">Requires</h3> + + <ul><?js doc.requires.forEach(function(r) { ?> + <li><?js= self.linkto(r, r) ?></li> + <?js }); ?></ul> + <?js } ?> + + <?js + var classes = self.find({kind: 'class', memberof: doc.longname}); + if (doc.kind !== 'globalobj' && classes && classes.length) { + ?> + <h3 class="subsection-title">Classes</h3> + + <dl><?js classes.forEach(function(c) { ?> + <dt><?js= self.linkto(c.longname, c.name) ?></dt> + <dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd> + <?js }); ?></dl> + <?js } ?> + + <?js + var namespaces = self.find({kind: 'namespace', memberof: doc.longname}); + if (doc.kind !== 'globalobj' && namespaces && namespaces.length) { + ?> + <h3 class="subsection-title">Namespaces</h3> + + <dl><?js namespaces.forEach(function(n) { ?> + <dt><a href="namespaces.html#<?js= n.longname ?>"><?js= self.linkto(n.longname, n.name) ?></a></dt> + <dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd> + <?js }); ?></dl> + <?js } ?> + + <?js + var members = self.find({kind: 'member', memberof: title === 'Global' ? {isUndefined: true} : doc.longname}); + if (members && members.length && members.forEach) { + ?> + <h3 class="subsection-title">Members</h3> + + <dl><?js members.forEach(function(p) { ?> + <?js= self.partial('members.tmpl', p) ?> + <?js }); ?></dl> + <?js } ?> + + <?js + var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname}); + if (methods && methods.length && methods.forEach) { + ?> + <h3 class="subsection-title">Methods</h3> + + <dl><?js methods.forEach(function(m) { ?> + <?js= self.partial('method.tmpl', m) ?> + <?js }); ?></dl> + <?js } ?> + + <?js + var typedefs = self.find({kind: 'typedef', memberof: title === 'Global' ? {isUndefined: true} : doc.longname}); + if (typedefs && typedefs.length && typedefs.forEach) { + ?> + <h3 class="subsection-title">Type Definitions</h3> + + <dl><?js typedefs.forEach(function(e) { + if (e.signature) { + ?> + <?js= self.partial('method.tmpl', e) ?> + <?js + } + else { + ?> + <?js= self.partial('members.tmpl', e) ?> + <?js + } + }); ?></dl> + <?js } ?> + + <?js + var events = self.find({kind: 'event', memberof: title === 'Global' ? {isUndefined: true} : doc.longname}); + if (events && events.length && events.forEach) { + ?> + <h3 class="subsection-title">Events</h3> + + <dl><?js events.forEach(function(e) { ?> + <?js= self.partial('method.tmpl', e) ?> + <?js }); ?></dl> + <?js } ?> +</article> + +</section> +<?js } ?> + +<?js }); ?> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/details.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/details.tmpl new file mode 100644 index 000000000..941a03de1 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/details.tmpl @@ -0,0 +1,98 @@ +<?js +var data = obj; +var self = this; +?> +<dl class="details"> + <?js + var properties = data.properties; + if (properties && properties.length && properties.forEach) { + ?> + + <h5 class="subsection-title">Properties:</h5> + + <dl><?js= this.partial('properties.tmpl', properties) ?></dl> + + <?js } ?> + + <?js if (data.version) {?> + <dt class="tag-version">Version:</dt> + <dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd> + <?js } ?> + + <?js if (data.since) {?> + <dt class="tag-since">Since:</dt> + <dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd> + <?js } ?> + + <?js if (data.inherited && data.inherits) { ?> + <dt class="inherited-from">Inherited From:</dt> + <dd class="inherited-from"><ul class="dummy"><li> + <?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?> + </li></dd> + <?js } ?> + + <?js if (data.deprecated) { ?> + <dt class="important tag-deprecated">Deprecated:</dt><?js + if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js } + else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js } + ?> + <?js } ?> + + <?js if (data.author && author.length) {?> + <dt class="tag-author">Author:</dt> + <dd class="tag-author"> + <ul><?js author.forEach(function(a) { ?> + <li><?js= self.resolveAuthorLinks(a) ?></li> + <?js }); ?></ul> + </dd> + <?js } ?> + + <?js if (data.copyright) {?> + <dt class="tag-copyright">Copyright:</dt> + <dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd> + <?js } ?> + + <?js if (data.license) {?> + <dt class="tag-license">License:</dt> + <dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd> + <?js } ?> + + <?js if (data.defaultvalue) {?> + <dt class="tag-default">Default Value:</dt> + <dd class="tag-default"><ul class="dummy"><li><?js= data.defaultvalue ?></li></ul></dd> + <?js } ?> + + <?js if (data.meta) {?> + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <?js= self.linkto(meta.filename) ?>, line <?js= meta.lineno ?> + </li></ul></dd> + <?js } ?> + + <?js if (data.tutorials && tutorials.length) {?> + <dt class="tag-tutorial">Tutorials:</dt> + <dd class="tag-tutorial"> + <ul><?js tutorials.forEach(function(t) { ?> + <li><?js= self.tutoriallink(t) ?></li> + <?js }); ?></ul> + </dd> + <?js } ?> + + <?js if (data.see && see.length) {?> + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul><?js see.forEach(function(s) { ?> + <li><?js= self.linkto(s) ?></li> + <?js }); ?></ul> + </dd> + <?js } ?> + + <?js if (data.todo && todo.length) {?> + <dt class="tag-todo">To Do:</dt> + <dd class="tag-todo"> + <ul><?js todo.forEach(function(t) { ?> + <li><?js= t ?></li> + <?js }); ?></ul> + </dd> + <?js } ?> +</dl> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/example.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/example.tmpl new file mode 100644 index 000000000..e87caa5b7 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/example.tmpl @@ -0,0 +1,2 @@ +<?js var data = obj; ?> +<pre><code><?js= data ?></code></pre> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/examples.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/examples.tmpl new file mode 100644 index 000000000..23384c9d9 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/examples.tmpl @@ -0,0 +1,11 @@ +<?js + var data = obj; + data.forEach(function(example) { + if (example.caption) { + ?> + <p class="code-caption"><?js= example.caption ?></p> + <?js } ?> + <pre class="prettyprint"><code><?js= example.code ?></code></pre> +<?js + }); +?>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/exceptions.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/exceptions.tmpl new file mode 100644 index 000000000..660afa21b --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/exceptions.tmpl @@ -0,0 +1,19 @@ +<?js + var data = obj; + if (data.description) { +?> +<div class="param-desc"> + <?js= description ?> +</div> +<?js } ?> + +<?js if (data.type && data.type.names) {?> +<dl> + <dt> + Type + </dt> + <dd> + <?js= this.partial('type.tmpl', data.type.names) ?> + </dd> +</dl> +<?js } ?>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/fires.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/fires.tmpl new file mode 100644 index 000000000..21cfd229c --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/fires.tmpl @@ -0,0 +1,4 @@ +<?js var data = obj; ?> +<li> + <?js= data ?> +</li>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/layout.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/layout.tmpl new file mode 100644 index 000000000..ec1124581 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/layout.tmpl @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>JSDoc: <?js= title ?></title> + + <script src="scripts/prettify/prettify.js"> </script> + <script src="scripts/prettify/lang-css.js"> </script> + <script src="scripts/jquery-1.9.1.min.js"> </script> + <script src="scripts/oktavia-english-search.js"> </script> + <script src="scripts/oktavia-jquery-ui.js"> </script> + <script src="scripts/oktavia-jquery-highlight.js"> </script> + <script src="scripts/prettify/lang-css.js"> </script> + <!--[if lt IE 9]> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> + <link type="text/css" rel="stylesheet" href="styles/searchstyle.css"> +</head> + +<body> + +<div id="main"> + + <h1 class="page-title"><?js= title ?></h1> + + <?js= content ?> +</div> + +<nav> + <?js= this.nav ?> + <h2>Search</h2> + <div id="oktavia_search_form" data-document-root="." data-index="./scripts/searchindex.js" style="position: relative;"/> +</nav> + +<br clear="both"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a> on <?js= (new Date()) ?> +</footer> + +<script> prettyPrint(); </script> +</body> +</html> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/mainpage.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/mainpage.tmpl new file mode 100644 index 000000000..64e9e5943 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/mainpage.tmpl @@ -0,0 +1,14 @@ +<?js +var data = obj; +var self = this; +?> + +<?js if (data.kind === 'package') { ?> + <h3><?js= data.name ?> <?js= data.version ?></h3> +<?js } ?> + +<?js if (data.readme) { ?> + <section> + <article><?js= data.readme ?></article> + </section> +<?js } ?> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/members.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/members.tmpl new file mode 100644 index 000000000..c76f772cc --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/members.tmpl @@ -0,0 +1,22 @@ +<?js var data = obj; ?> +<dt> + <h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + (data.signature ? data.signature : '') ?></h4> + + <?js if (data.summary) { ?> + <p class="summary"><?js= summary ?></p> + <?js } ?> +</dt> +<dd> + <?js if (data.description) { ?> + <div class="description"> + <?js= data.description ?> + </div> + <?js } ?> + + <?js= this.partial('details.tmpl', data) ?> + + <?js if (data.examples && examples.length) { ?> + <h5>Example<?js= examples.length > 1? 's':'' ?></h5> + <?js= this.partial('examples.tmpl', examples) ?> + <?js } ?> +</dd> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl new file mode 100644 index 000000000..1eb9032d2 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl @@ -0,0 +1,76 @@ +<?js +var data = obj; +var self = this; +?> +<dt> + <h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') + name + (kind !== 'event' ? data.signature : '') ?></h4> + + <?js if (data.summary) { ?> + <p class="summary"><?js= summary ?></p> + <?js } ?> +</dt> +<dd> + + <?js if (data.description) { ?> + <div class="description"> + <?js= data.description ?> + </div> + <?js } ?> + + <?js if (kind === 'event' && data.type && data.type.names) {?> + <h5>Type:</h5> + <ul> + <li> + <?js= self.partial('type.tmpl', data.type.names) ?> + </li> + </ul> + <?js } ?> + + <?js if (data['this']) { ?> + <h5>This:</h5> + <ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul> + <?js } ?> + + <?js if (data.params && params.length) { ?> + <h5>Parameters:</h5> + <?js= this.partial('params.tmpl', params) ?> + <?js } ?> + + <?js= this.partial('details.tmpl', data) ?> + + <?js if (data.fires && fires.length) { ?> + <h5>Fires:</h5> + <ul><?js fires.forEach(function(f) { ?> + <?js= self.partial('fires.tmpl', self.linkto(f) ) ?> + <?js }); ?></ul> + <?js } ?> + + <?js if (data.exceptions && exceptions.length) { ?> + <h5>Throws:</h5> + <?js if (exceptions.length > 1) { ?><ul><?js + exceptions.forEach(function(r) { ?> + <li><?js= self.partial('exceptions.tmpl', r) ?></li> + <?js }); + ?></ul><?js } else { + exceptions.forEach(function(r) { ?> + <?js= self.partial('exceptions.tmpl', r) ?> + <?js }); + } } ?> + + <?js if (data.returns && returns.length) { ?> + <h5>Returns:</h5> + <?js if (returns.length > 1) { ?><ul><?js + returns.forEach(function(r) { ?> + <li><?js= self.partial('returns.tmpl', r) ?></li> + <?js }); + ?></ul><?js } else { + returns.forEach(function(r) { ?> + <?js= self.partial('returns.tmpl', r) ?> + <?js }); + } } ?> + + <?js if (data.examples && examples.length) { ?> + <h5>Example<?js= examples.length > 1? 's':'' ?></h5> + <?js= this.partial('examples.tmpl', examples) ?> + <?js } ?> +</dd> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/params.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/params.tmpl new file mode 100644 index 000000000..ca81f8f8f --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/params.tmpl @@ -0,0 +1,108 @@ +<?js + var params = obj; + + /* sort subparams under their parent params (like opts.classname) */ + var parentParam = null; + params.forEach(function(param, i) { + if (!param) { return; } + if ( parentParam && param.name && param.name.indexOf(parentParam.name + '.') === 0 ) { + param.name = param.name.substr(parentParam.name.length+1); + parentParam.subparams = parentParam.subparams || []; + parentParam.subparams.push(param); + params[i] = null; + } + else { + parentParam = param; + } + }); + + /* determine if we need extra columns, "attributes" and "default" */ + params.hasAttributes = false; + params.hasDefault = false; + params.hasName = false; + + params.forEach(function(param) { + if (!param) { return; } + + if (param.optional || param.nullable) { + params.hasAttributes = true; + } + + if (param.name) { + params.hasName = true; + } + + if (typeof param.defaultvalue !== 'undefined') { + params.hasDefault = true; + } + }); +?> + +<table class="params"> + <thead> + <tr> + <?js if (params.hasName) {?> + <th>Name</th> + <?js } ?> + + <th>Type</th> + + <?js if (params.hasAttributes) {?> + <th>Argument</th> + <?js } ?> + + <?js if (params.hasDefault) {?> + <th>Default</th> + <?js } ?> + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + <?js + var self = this; + params.forEach(function(param) { + if (!param) { return; } + ?> + + <tr> + <?js if (params.hasName) {?> + <td class="name"><code><?js= param.name ?></code></td> + <?js } ?> + + <td class="type"> + <?js if (param.type && param.type.names) {?> + <?js= self.partial('type.tmpl', param.type.names) ?> + <?js } ?> + </td> + + <?js if (params.hasAttributes) {?> + <td class="attributes"> + <?js if (param.optional) { ?> + <optional><br> + <?js } ?> + + <?js if (param.nullable) { ?> + <nullable><br> + <?js } ?> + </td> + <?js } ?> + + <?js if (params.hasDefault) {?> + <td class="default"> + <?js if (typeof param.defaultvalue !== 'undefined') { ?> + <?js= self.htmlsafe(param.defaultvalue) ?> + <?js } ?> + </td> + <?js } ?> + + <td class="description last"><?js= param.description ?><?js if (param.subparams) { ?> + <h6>Properties</h6> + <?js= self.partial('params.tmpl', param.subparams) ?> + <?js } ?></td> + </tr> + + <?js }); ?> + </tbody> +</table>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/properties.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/properties.tmpl new file mode 100644 index 000000000..dfa6ee0e9 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/properties.tmpl @@ -0,0 +1,107 @@ +<?js + var props = obj; + + /* sort subprops under their parent props (like opts.classname) */ + var parentProp = null; + props.forEach(function(prop, i) { + if (!prop) { return; } + if ( parentProp && prop.name.indexOf(parentProp.name + '.') === 0 ) { + prop.name = prop.name.substr(parentProp.name.length+1); + parentProp.subprops = parentProp.subprops || []; + parentProp.subprops.push(prop); + props[i] = null; + } + else { + parentProp = prop; + } + }); + + /* determine if we need extra columns, "attributes" and "default" */ + props.hasAttributes = false; + props.hasDefault = false; + props.hasName = false; + + props.forEach(function(prop) { + if (!prop) { return; } + + if (prop.optional || prop.nullable) { + props.hasAttributes = true; + } + + if (prop.name) { + props.hasName = true; + } + + if (typeof prop.defaultvalue !== 'undefined') { + props.hasDefault = true; + } + }); +?> + +<table class="props"> + <thead> + <tr> + <?js if (props.hasName) {?> + <th>Name</th> + <?js } ?> + + <th>Type</th> + + <?js if (props.hasAttributes) {?> + <th>Argument</th> + <?js } ?> + + <?js if (props.hasDefault) {?> + <th>Default</th> + <?js } ?> + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + <?js + var self = this; + props.forEach(function(prop) { + if (!prop) { return; } + ?> + + <tr> + <?js if (props.hasName) {?> + <td class="name"><code><?js= prop.name ?></code></td> + <?js } ?> + + <td class="type"> + <?js if (prop.type && prop.type.names) {?> + <?js= self.partial('type.tmpl', prop.type.names) ?> + <?js } ?> + </td> + + <?js if (props.hasAttributes) {?> + <td class="attributes"> + <?js if (prop.optional) { ?> + <optional><br> + <?js } ?> + + <?js if (prop.nullable) { ?> + <nullable><br> + <?js } ?> + </td> + <?js } ?> + + <?js if (props.hasDefault) {?> + <td class="default"> + <?js if (typeof prop.defaultvalue !== 'undefined') { ?> + <?js= self.htmlsafe(prop.defaultvalue) ?> + <?js } ?> + </td> + <?js } ?> + + <td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?> + <h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?> + <?js } ?></td> + </tr> + + <?js }); ?> + </tbody> +</table>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/returns.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/returns.tmpl new file mode 100644 index 000000000..32e059ed4 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/returns.tmpl @@ -0,0 +1,19 @@ +<?js +var data = obj; +if (data.description) { +?> +<div class="param-desc"> + <?js= description ?> +</div> +<?js } ?> + +<?js if (data.type && data.type.names) {?> +<dl> + <dt> + Type + </dt> + <dd> + <?js= this.partial('type.tmpl', data.type.names) ?> + </dd> +</dl> +<?js } ?>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/source.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/source.tmpl new file mode 100644 index 000000000..e1092ef29 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/source.tmpl @@ -0,0 +1,8 @@ +<?js + var data = obj; +?> + <section> + <article> + <pre class="prettyprint source"><code><?js= data.code ?></code></pre> + </article> + </section>
\ No newline at end of file diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/tutorial.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/tutorial.tmpl new file mode 100644 index 000000000..b0c79c1dd --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/tutorial.tmpl @@ -0,0 +1,19 @@ +<section> + +<header> + <?js if (children.length > 0) { ?> + <ul><?js + var self = this; + children.forEach(function(t) { ?> + <li><?js= self.tutoriallink(t.name) ?></li> + <?js }); ?></ul> + <?js } ?> + + <h2><?js= header ?></h2> +</header> + +<article> + <?js= content ?> +</article> + +</section> diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/type.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/type.tmpl new file mode 100644 index 000000000..db8194d6d --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/type.tmpl @@ -0,0 +1,7 @@ +<?js + var data = obj; + var self = this; + data.forEach(function(name, i) { ?> +<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span> +<?js if (i < data.length-1) { ?>|<?js } ?> +<?js }); ?>
\ No newline at end of file |