247 lines
3.8 KiB
SCSS
247 lines
3.8 KiB
SCSS
/*!
|
|
* API Wrapper
|
|
*
|
|
* @class .__slate
|
|
* @selector {::after}
|
|
**/
|
|
|
|
.__slate {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
|
|
&::after {
|
|
@include clearfix;
|
|
}
|
|
}
|
|
|
|
.api__header {
|
|
padding: 2rem;
|
|
position: relative;
|
|
|
|
&::after {
|
|
width: 100%; height: 1px;
|
|
bottom: -1px; left: 0;
|
|
|
|
background-color: $lbry-gray-2;
|
|
content: "";
|
|
position: absolute;
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* API | Table of Contents
|
|
*
|
|
* @class .api__toc
|
|
* @class .api__toc__search
|
|
* @class .api__toc__search__field
|
|
*
|
|
* @class .api__toc__search__clear
|
|
* @state {.active}
|
|
*
|
|
* @class .api__toc__items
|
|
*
|
|
* @class .api__toc__item
|
|
* @state {:hover}
|
|
**/
|
|
|
|
.api__toc {
|
|
width: 200px; height: calc(100vh - 4rem); // navigation is 4rem tall
|
|
bottom: 0; left: 0;
|
|
|
|
background-color: $lbry-white;
|
|
border-right: 1px solid $lbry-gray-1;
|
|
// float: left;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
position: fixed;
|
|
z-index: 3;
|
|
}
|
|
|
|
.api__toc__search {
|
|
position: relative;
|
|
}
|
|
|
|
.api__toc__search__field {
|
|
width: 100%;
|
|
padding: 0.25rem calc(2rem + 4px) 0.25rem 0.75rem;
|
|
|
|
border-bottom: 1px solid $lbry-gray-1;
|
|
font-size: 0.8rem;
|
|
line-height: 2rem;
|
|
}
|
|
|
|
.api__toc__search__clear {
|
|
width: 1.25rem; height: 1.25rem;
|
|
top: 0.6rem; right: 0.75rem;
|
|
|
|
background-color: $lbry-black;
|
|
border-radius: 50%;
|
|
color: $lbry-white;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
line-height: 1.15;
|
|
position: absolute;
|
|
text-align: center;
|
|
transition: opacity 0.2s;
|
|
|
|
&:not(.active) {
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
}
|
|
|
|
&.active {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
}
|
|
|
|
.api__toc__items {
|
|
font-size: 0.8rem;
|
|
line-height: 1.33;
|
|
list-style-type: none;
|
|
padding-top: 0.25rem;
|
|
padding-bottom: 1rem;
|
|
}
|
|
|
|
.api__toc__item {
|
|
&:hover {
|
|
background-color: $lbry-gray-2;
|
|
}
|
|
|
|
a {
|
|
padding: 0.25rem 0.5rem 0.25rem 0.75rem;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.api__content {
|
|
width: calc(100% - 200px);
|
|
float: right;
|
|
}
|
|
|
|
.api__documentation {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
|
|
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 0.8rem;
|
|
letter-spacing: 0.1rem;
|
|
margin-bottom: 0.25rem;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
p,
|
|
ol,
|
|
ul {
|
|
font-size: 1rem;
|
|
line-height: 1.5;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
pre {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
|
|
border: 1px solid rgba($lbry-white, 0.1);
|
|
border-radius: 0.3rem;
|
|
border-spacing: 0;
|
|
font-size: 0.8rem;
|
|
line-height: 1.33;
|
|
}
|
|
|
|
thead {
|
|
display: none;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding: 0.5rem 1rem 0.5rem 0.5rem;
|
|
}
|
|
|
|
th {
|
|
border-bottom: 1px solid rgba($lbry-white, 0.1);
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
background-color: rgba($lbry-white, 0.1);
|
|
}
|
|
}
|
|
|
|
.api__content__body {
|
|
padding: 2rem;
|
|
border-bottom: 1px solid $lbry-gray-1; // rgba($lbry-gray-1, 0.3);
|
|
}
|
|
|
|
.api__content__body__arguments {
|
|
border: 1px solid $lbry-gray-2;
|
|
border-radius: 3px;
|
|
list-style-type: none;
|
|
}
|
|
|
|
.api__content__body__argument {
|
|
&:not(:last-of-type) {
|
|
border-bottom: 1px solid $lbry-gray-2;
|
|
}
|
|
|
|
&:nth-child(even) {
|
|
background-color: rgba($lbry-gray-1, 0.2);
|
|
}
|
|
|
|
.left,
|
|
.right {
|
|
padding: 0.5rem 0.75rem;
|
|
}
|
|
|
|
.left {
|
|
width: 30%;
|
|
|
|
border-right: 1px solid $lbry-gray-2;
|
|
float: left;
|
|
word-wrap: break-word;
|
|
|
|
span {
|
|
color: $lbry-gray-3;
|
|
font-size: 0.8rem;
|
|
|
|
&:not(:first-of-type) {
|
|
margin-left: 0.5rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.right {
|
|
width: 70%;
|
|
float: right;
|
|
}
|
|
|
|
&::after {
|
|
@include clearfix;
|
|
}
|
|
}
|
|
|
|
.api__content__example {
|
|
padding: 2rem;
|
|
|
|
background-color: rgba($lbry-black, 0.9);
|
|
border-bottom: 1px solid rgba($lbry-white, 0.1);
|
|
color: $lbry-white;
|
|
|
|
pre {
|
|
background-color: $lbry-black;
|
|
}
|
|
}
|