Add attributetable and add some class-level sections.

The extensions have yet to receive this treatment and CSS needs work,
but for now this is fine.
This commit is contained in:
Rapptz
2020-05-25 11:48:16 -04:00
parent 93f102ca90
commit 9b88c63163
5 changed files with 440 additions and 4 deletions

View File

@ -27,5 +27,13 @@ $(document).ready(function () {
activeLink = $('.sphinxsidebar a[href="#' + currentSection.attr('id') + '"]');
activeLink.parent().addClass('active');
}
const tables = document.querySelectorAll('.py-attribute-table[data-move-to-id]');
tables.forEach(table => {
let element = document.getElementById(table.getAttribute('data-move-to-id'));
let parent = element.parentNode;
// insert ourselves after the element
parent.insertBefore(table, element.nextSibling);
});
});
});

View File

@ -278,6 +278,12 @@ div.attention, div.warning, div.caution, div.seealso {
border: 1px solid #fbe091;
}
dl.field-list > dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 20px;
}
/* no disgusting background in the FAQ */
div.topic {
background-color: transparent;
@ -352,6 +358,25 @@ div.helpful > p.admonition-title:after {
list-style: '»' !important;
}
/* attribute tables */
.py-attribute-table {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 0 2em;
padding-top: 16px;
}
.py-attribute-table-column > span {
font-weight: bold;
}
div.body .py-attribute-table-column > ul {
list-style: none;
margin: 4px 0px;
padding-left: 12px;
}
pre {
background-color: #f5f5f5;
border: 1px solid #C6C9CB;