From 9b88c631639167433bfd2c244b3be04d3a52a66d Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 25 May 2020 11:48:16 -0400 Subject: 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. --- docs/_static/custom.js | 8 ++++++++ docs/_static/style.css | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'docs/_static') diff --git a/docs/_static/custom.js b/docs/_static/custom.js index 235a14ea..0f1ea7fc 100644 --- a/docs/_static/custom.js +++ b/docs/_static/custom.js @@ -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); + }); }); }); diff --git a/docs/_static/style.css b/docs/_static/style.css index 43966db8..d371518c 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -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; -- cgit v1.2.3