Fixed issue with section in API, and styling

This commit is contained in:
ポール ウェッブ 2018-08-01 15:40:49 -05:00
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

View file

@ -92,24 +92,20 @@
}
.api__toc__items {
list-style-type: none;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
ul {
list-style-type: none;
&:hover {
background-color: rgba($gray, 0.3);
}
li {
padding: 0.25rem 0.5rem 0.25rem 0.75rem;
}
}
}
.tocify-focus {
background-color: rgba($gray, 0.3);
.api__toc__item {
&:hover {
background-color: rgba($gray, 0.3);
}
a {
display: block;
padding: 0.25rem 0.5rem 0.25rem 0.75rem;
}
}

View file

@ -46,7 +46,7 @@ function createApiContent(apiDetails) {
for (const apiDetail of apiDetails) {
const apiDetailsReturns = JSON.parse(JSON.stringify(apiDetail.returns));
apiContent.push(`
/* if (apiDetail.name !== "settings_set") */ apiContent.push(`
<div class="api__content__body">
<h2 id="#${apiDetail.name}">${apiDetail.name}</h2>
<p>${apiDetail.description}</p>
@ -54,7 +54,7 @@ function createApiContent(apiDetails) {
<h3>Returns</h3>
<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 class="api__content__example">
@ -99,7 +99,7 @@ function renderArguments(args) {
${arg.is_required === true ? "" : "<span>optional</span>" }<span>${arg.type}</span>
</div>
<div class="right">${arg.description}</div>
<div class="right">${arg.description.replace(/</g, "&lt;").replace(/>/g, "&gt;")}</div>
</li>
`);
}