Updated API stlying and structure

This commit is contained in:
ポール ウェッブ 2018-08-02 11:22:52 -05:00
parent 68a1e27881
commit c3f8c6c65b
4 changed files with 19 additions and 17 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,7 +92,7 @@
} }
h2 { h2 {
font-size: 1.25rem; font-size: 1.5rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
@ -137,7 +137,6 @@
pre { pre {
margin-bottom: 2rem; padding: 1rem; margin-bottom: 2rem; padding: 1rem;
background-color: $black;
border-radius: 0.3rem; border-radius: 0.3rem;
font-size: 0.8rem; font-size: 0.8rem;
line-height: 1.33; line-height: 1.33;
@ -146,6 +145,15 @@
} }
} }
.api__content__body {
border-bottom: 1px solid rgba($gray, 0.3);
padding: 2rem;
pre {
border: 1px solid rgba($gray, 0.3);
}
}
.api__content__body__arguments { .api__content__body__arguments {
border: 1px solid rgba($gray, 0.3); border: 1px solid rgba($gray, 0.3);
border-radius: 3px; border-radius: 3px;
@ -190,21 +198,15 @@
} }
} }
.api__content__body,
.api__content__example {
padding: 2rem;
}
.api__content__body {
border-bottom: 1px solid rgba($gray, 0.3);
pre {
color: $white;
}
}
.api__content__example { .api__content__example {
background-color: mix($gray, $black, 10%); background-color: mix($gray, $black, 10%);
border-bottom: 1px solid rgba($white, 0.1); border-bottom: 1px solid rgba($white, 0.1);
color: $white; color: $white;
padding: 2rem;
pre {
background-color: $black;
}
} }

View file

@ -56,10 +56,10 @@ function createApiContent(apiDetails) {
<h2 id="${apiDetail.name}">${apiDetail.name}</h2> <h2 id="${apiDetail.name}">${apiDetail.name}</h2>
<p>${apiDetail.description}</p> <p>${apiDetail.description}</p>
${apiDetail.arguments.length ? `<h3>Arguments</h3><ul class="api__content__body__arguments">${renderArguments(apiDetail.arguments).join("")}</ul>` : ""}
<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>` : ""}\n
</div> </div>
<div class="api__content__example"> <div class="api__content__example">