добавил примеры по работе с деревьями
This commit is contained in:
parent
73f3735bb6
commit
59d791e97f
12 changed files with 446 additions and 22 deletions
|
@ -87,11 +87,12 @@ var replace_type_def = function(_ln){
|
|||
return link;
|
||||
}
|
||||
|
||||
// старый кусок говна :D
|
||||
var replace_enters_to_br = function(_str){
|
||||
var out = _str;
|
||||
while(out.match("\n")) out = out.replace("\n", "<br>");
|
||||
// var out = _str;
|
||||
// while(out.match("\n")) out = out.replace("\n", "<br>");
|
||||
|
||||
return out;
|
||||
return _str;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -58,6 +58,19 @@
|
|||
.full-method > div.short > .param .type .name {}
|
||||
.full-method > div.short > .param .type .right-quad-bracket {}
|
||||
|
||||
.params-example {
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px !important;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.params-example > pre {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.params-desc {
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
|
@ -71,4 +84,18 @@
|
|||
|
||||
.params-desc > .parameter {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.description blockquote {
|
||||
-webkit-margin-before: 0;
|
||||
-webkit-margin-after: 0;
|
||||
}
|
||||
|
||||
.description blockquote p {
|
||||
-webkit-margin-before: 0;
|
||||
-webkit-margin-after: 0;
|
||||
}
|
||||
|
||||
.description blockquote br {
|
||||
height: 0;
|
||||
}
|
|
@ -67,6 +67,11 @@
|
|||
min-width: initial;
|
||||
}
|
||||
|
||||
.full-method > .description > p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.parameter > .description > p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
var self = this;
|
||||
|
||||
data.forEach(function(example) {
|
||||
var result = self.htmlsafe(example.code);
|
||||
if (example.caption) {
|
||||
?>
|
||||
<p class="code-caption"><?js= example.caption ?></p>
|
||||
<?js } ?>
|
||||
<pre class="prettyprint"><code><?js= self.htmlsafe(example.code) ?></code></pre>
|
||||
<pre class="prettyprint"><code><?js= result ?></code></pre>
|
||||
<?js
|
||||
});
|
||||
?>
|
|
@ -21,6 +21,13 @@ var ryba = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eius
|
|||
<?js= self.partial('full_method/params_compact.tmpl', method.params) ?>
|
||||
</div>
|
||||
|
||||
<?js if (method.examples && method.examples.length) { ?>
|
||||
<div class="params-desc params-example bdotted part">
|
||||
<div class="title">Examples: </div>
|
||||
<?js= self.partial('examples.tmpl', method.examples) ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if(method.params) { ?>
|
||||
<div class="params-desc bdotted part">
|
||||
<div class="title">Params</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue