add show list methods
This commit is contained in:
parent
058104b10f
commit
3478e04a63
7 changed files with 1064 additions and 121 deletions
|
@ -1,3 +1,5 @@
|
|||
@import url("min-method.css");
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: normal;
|
||||
|
@ -24,6 +26,7 @@
|
|||
url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg');
|
||||
}
|
||||
|
||||
|
||||
html
|
||||
{
|
||||
overflow: auto;
|
||||
|
@ -34,7 +37,7 @@ html
|
|||
body
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
line-height: 1.5;
|
||||
/*line-height: 1.5;*/
|
||||
color: #4d4e53;
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -428,4 +431,4 @@ article ul {
|
|||
.__end {
|
||||
color: #0037ff;
|
||||
font-size: 17px;
|
||||
}
|
||||
}
|
53
templates/initi/static/styles/min-method.css
Normal file
53
templates/initi/static/styles/min-method.css
Normal file
|
@ -0,0 +1,53 @@
|
|||
.min-methods{}
|
||||
|
||||
.min-methods .title {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.min-methods .list {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.min-methods .list .compact-method {
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
font-family: 'Open Sans', sans-serif !important;
|
||||
}
|
||||
.min-methods .list .compact-method .access{}
|
||||
.min-methods .list .compact-method .name{
|
||||
color: #0137ff;
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.min-methods .list .compact-method .param {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.min-methods .list .compact-method .param .left-circle-bracket{}
|
||||
.min-methods .list .compact-method .param .right-circle-bracket{}
|
||||
|
||||
.min-methods .list .compact-method .param .type{}
|
||||
.min-methods .list .compact-method .param .type .left-quad-bracket{}
|
||||
.min-methods .list .compact-method .param .type .name{
|
||||
color: #3d7700;
|
||||
font-size: 20px;
|
||||
}
|
||||
.min-methods .list .compact-method .param .type .right-quad-bracket{}
|
||||
.min-methods .list .compact-method .param .name{
|
||||
color: #383838;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.min-methods .list .compact-method .returns{}
|
||||
.min-methods .list .compact-method .returns .arrow{}
|
||||
.min-methods .list .compact-method .returns .left-figure-bracket{}
|
||||
.min-methods .list .compact-method .returns .right-figure-bracket{}
|
||||
.min-methods .list .compact-method .returns .name{
|
||||
color: #5aa30e;
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
}
|
|
@ -151,6 +151,14 @@
|
|||
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
|
||||
if (methods && methods.length && methods.forEach) {
|
||||
?>
|
||||
<div class="min-methods">
|
||||
<div class="title">Methods list:</div>
|
||||
<div class="list">
|
||||
<?js methods.forEach(function(m) { ?>
|
||||
<?js= self.partial('method_list.tmpl', m) ?>
|
||||
<?js }); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="subsection-title methods">Methods</h3>
|
||||
<?js methods.forEach(function(m) { ?>
|
||||
<?js= self.partial('method.tmpl', m) ?>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
console.log("!!!!!!!!!!!!!!! sdfasdfasdfasdf !!!!!!!!!!!!!!!!!");
|
||||
?>
|
||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
||||
|
|
|
@ -1,119 +1,47 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
|
||||
//console.log(JSON.stringify(data, true, 3))
|
||||
?>
|
||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<div class="compact-method">
|
||||
<span class="access"> <?js= data.access ?></span>
|
||||
<span class="name"><a href="#<?js= data.id ?>"><?js= name ?></a></span>
|
||||
|
||||
<span class="params">
|
||||
<span class="left-circle-bracket">(</span>
|
||||
<?js
|
||||
if(data.params){
|
||||
var a = 0;
|
||||
while(a < data.params.length){
|
||||
var param = data.params[a];
|
||||
if(!param) { a++; continue; }
|
||||
var type = param.type.names[0];
|
||||
?>
|
||||
<span class="param">
|
||||
<span class="type">
|
||||
<span class="left-quad-bracket">[ </span>
|
||||
<span class="name"><?js= type ?></span>
|
||||
<span class="right-quad-bracket"> ]</span>
|
||||
</span>
|
||||
<span class="name"><?js= param.name ?></span>
|
||||
</span>
|
||||
<?js
|
||||
a++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span class="right-circle-bracket">)</span>
|
||||
</span>
|
||||
|
||||
<?js if(data.returns) { ?>
|
||||
<?js var rets = data.returns[0].type.names[0]; ?>
|
||||
<span class="returns">
|
||||
<span class="arrow"> → </span>
|
||||
<span class="left-figure-bracket">{</span>
|
||||
<span class="name"><?js= rets ?></span>
|
||||
<span class="right-figure-bracket">}</span>
|
||||
</span>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'namespace') { ?>
|
||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '')
|
||||
+ "<span class='method-name'>" + name + "</span>" + (data.signature || '') ?></h4>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.summary) { ?>
|
||||
<p class="summary"><?js= summary ?></p>
|
||||
<?js } ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
|
||||
<div class="description">
|
||||
<?js= data.description ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
|
||||
<h5>Extends:</h5>
|
||||
<?js= self.partial('augments.tmpl', data) ?>
|
||||
<?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 && !data.hideconstructor) { ?>
|
||||
<h5>Parameters:</h5>
|
||||
<?js= this.partial('params.tmpl', params) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js= this.partial('details.tmpl', data) ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
|
||||
<h5>Requires:</h5>
|
||||
<ul><?js data.requires.forEach(function(r) { ?>
|
||||
<li><?js= self.linkto(r) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.fires && fires.length) { ?>
|
||||
<h5>Fires:</h5>
|
||||
<ul><?js fires.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listens && listens.length) { ?>
|
||||
<h5>Listens to Events:</h5>
|
||||
<ul><?js listens.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listeners && listeners.length) { ?>
|
||||
<h5>Listeners of This Event:</h5>
|
||||
<ul><?js listeners.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?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) { ?>
|
||||
|
||||
<?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.yields && yields.length) { ?>
|
||||
<h5>Yields:</h5>
|
||||
<?js if (yields.length > 1) { ?><ul><?js
|
||||
yields.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
yields.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 } ?>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue