начал переделывание описания методов.

This commit is contained in:
alexey 2018-09-20 00:01:18 +03:00
parent f5e55162b8
commit 7c91932413
7 changed files with 628 additions and 280 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
.full-methods .title {
font-size: 28px;
font-weight: bold;
margin-top: 20px;
}
.full-methods .list {
padding-left: 24px;
}
.full-method {
color: #bdbdbd;
font-size: 17px;
}
.full-method > .access {
padding-right: 10px;
}
.full-method > .name {
color: #ff7801;
font-size: 17px;
font-weight: bold;
}
.full-method .params {}
.full-method > .params > .param > .name {
color: #5c8e65;
}
.full-method .param .type {}
.full-method .param .type .left-quad-bracket {}
.full-method .param .type .name {}
.full-method .param .type .right-quad-bracket {}

View File

@ -1,4 +1,5 @@
@import url("min-method.css");
@import url("full-method.css");
@font-face {
font-family: 'Open Sans';

View File

@ -46,7 +46,7 @@
}
.min-methods .list .compact-method .param .type .right-quad-bracket{}
.min-methods .list .compact-method .param .name{
color: #383838;
color: #a7a7a7;
font-size: 20px;
min-width: initial;
}

View File

@ -152,17 +152,23 @@
if (methods && methods.length && methods.forEach) {
?>
<div class="min-methods">
<div class="title">Methods list:</div>
<div class="title">Methods:</div>
<div class="list">
<?js methods.forEach(function(m) { ?>
<?js= self.partial('method_list.tmpl', m) ?>
<?js= self.partial('method_compact.tmpl', m) ?>
<?js }); ?>
</div>
</div>
<h3 class="subsection-title methods">Methods</h3>
<?js methods.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?>
<div class="full-methods">
<div class="title">Full methods description:</div>
<div class="list">
<?js methods.forEach(function(m) { ?>
<?js= self.partial('method_full.tmpl', m) ?>
<?js }); ?>
</div>
</div>
<?js } ?>
<?js

View File

@ -0,0 +1,32 @@
<?js
var data = obj;
var self = this;
//console.log(JSON.stringify(data, true, 3))
?>
<div class="full-method" id="<?js= data.id ?>">
<span class="access">(<?js= data.access ?>)</span>
<span class="name"><?js= name ?></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; }
//console.log(JSON.stringify(param,true,3))
var type = param.type.names[0];
?>
<span class="param">
<span class="name"><?js= param.name ?></span><?js if(a < data.params.length - 1) { ?>,<?js } ?>
</span>
<?js
a++;
}
}
?>
<span class="right-circle-bracket">)</span>
</span>
</div>