Fixed issue with section in API, and styling
This commit is contained in:
parent
55f345e002
commit
976f535aec
4 changed files with 15 additions and 19 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -92,24 +92,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.api__toc__items {
|
.api__toc__items {
|
||||||
|
list-style-type: none;
|
||||||
padding-top: 0.25rem;
|
padding-top: 0.25rem;
|
||||||
padding-bottom: 0.25rem;
|
padding-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
.api__toc__item {
|
||||||
list-style-type: none;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba($gray, 0.3);
|
background-color: rgba($gray, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
a {
|
||||||
|
display: block;
|
||||||
padding: 0.25rem 0.5rem 0.25rem 0.75rem;
|
padding: 0.25rem 0.5rem 0.25rem 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tocify-focus {
|
|
||||||
background-color: rgba($gray, 0.3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ function createApiContent(apiDetails) {
|
||||||
for (const apiDetail of apiDetails) {
|
for (const apiDetail of apiDetails) {
|
||||||
const apiDetailsReturns = JSON.parse(JSON.stringify(apiDetail.returns));
|
const apiDetailsReturns = JSON.parse(JSON.stringify(apiDetail.returns));
|
||||||
|
|
||||||
apiContent.push(`
|
/* if (apiDetail.name !== "settings_set") */ apiContent.push(`
|
||||||
<div class="api__content__body">
|
<div class="api__content__body">
|
||||||
<h2 id="#${apiDetail.name}">${apiDetail.name}</h2>
|
<h2 id="#${apiDetail.name}">${apiDetail.name}</h2>
|
||||||
<p>${apiDetail.description}</p>
|
<p>${apiDetail.description}</p>
|
||||||
|
@ -54,7 +54,7 @@ function createApiContent(apiDetails) {
|
||||||
<h3>Returns</h3>
|
<h3>Returns</h3>
|
||||||
<pre><code>${dedent(apiDetailsReturns)}</code></pre>
|
<pre><code>${dedent(apiDetailsReturns)}</code></pre>
|
||||||
|
|
||||||
${apiDetail.arguments.length ? `<h3>Arguments</h3><ul class="api__content__body__arguments">${renderArguments(apiDetail.arguments).join("")}</ul>` : ""}
|
${apiDetail.arguments.length ? `<h3>Arguments</h3><ul class="api__content__body__arguments">${renderArguments(apiDetail.arguments).join("")}</ul>` : ""}\n
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="api__content__example">
|
<div class="api__content__example">
|
||||||
|
@ -99,7 +99,7 @@ function renderArguments(args) {
|
||||||
${arg.is_required === true ? "" : "<span>optional</span>" }<span>${arg.type}</span>
|
${arg.is_required === true ? "" : "<span>optional</span>" }<span>${arg.type}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right">${arg.description}</div>
|
<div class="right">${arg.description.replace(/</g, "<").replace(/>/g, ">")}</div>
|
||||||
</li>
|
</li>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue